Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ppx-llamaindex

LlamaIndex integration for the Preference Profile Exchange (PPX).

Install

pip install ppx-llamaindex

Requires Python 3.11+. Published version: 0.1.0a1 (PyPI).

Alpha, tracking a draft specification. Expect breaking changes. The version is 0.1.0a1 on PyPI and 0.1.0-alpha.1 on npm — the same release in each ecosystem's required format.

Load claims as Documents

from ppx_client import PpxClient
from ppx_llamaindex import PpxReader
from llama_index.core import VectorStoreIndex

client = PpxClient("https://api.provider.app")
reader = PpxReader(client, grant_token=my_grant_token,
                   effective_kwargs={"requested_namespaces": ["fragrance"]})
docs = reader.load_data()

index = VectorStoreIndex.from_documents(docs)
query = index.as_query_engine().query("What scent profile suits this user?")

Use as a tool in an agent

from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI
from ppx_llamaindex import ppx_preference_tool

tool = ppx_preference_tool(client, grant_token=my_grant_token)
agent = ReActAgent.from_tools([tool], llm=OpenAI(model="gpt-4o-mini"))
agent.chat("Recommend a trip based on my core preferences.")

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ppx_llamaindex-0.1.0a2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ppx_llamaindex-0.1.0a2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file ppx_llamaindex-0.1.0a2.tar.gz.

File metadata

  • Download URL: ppx_llamaindex-0.1.0a2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for ppx_llamaindex-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 bd9523ddb1d7d045e6afd2fad4d33a6ac1c6ceac81986ceb47411ab31f14ce21
MD5 440272ca728738f5311781e4e69067ff
BLAKE2b-256 07ab238af71c924956c7fc3d11e9c2202145b5ea69b2312964d7232854544263

See more details on using hashes here.

File details

Details for the file ppx_llamaindex-0.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for ppx_llamaindex-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a88491299a07dc136522b65347023f39f26586278ad7d165133a1a520bee14b
MD5 613c0d95d689101160da2c6a21ba17ec
BLAKE2b-256 59d842d886febc63f65e079070e0a90e1c0dbfa77e8e4e715fdf6fb09ae78f59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page