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.0a4.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.0a4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ppx_llamaindex-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 4daa638b49ea8fe29f85fe8d73642aabf049dac5a2166a912363fcf6ac18d172
MD5 9b9c706d57ccd5fb55889a666b2aad2f
BLAKE2b-256 3527e8df70c5a4ecd747cdc1eed3480caf5587dd3924c61951ae244e1b5702db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppx_llamaindex-0.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 d278dd64a95d92077afeaed0a319dcd36698b88f427abc80805e2332ccbbbbd7
MD5 9a2b2274c1cdd01e6cd6a6f42c074288
BLAKE2b-256 2eb7d5cff91a4f0a98549490f05dbe894ad38587340cc2c3b63fdef3915226fd

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