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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ppx_llamaindex-0.1.0a1.tar.gz
  • Upload date:
  • Size: 7.1 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.0a1.tar.gz
Algorithm Hash digest
SHA256 fb8de08aa881e0330880e11d8b1c52c4bc01312e056701ec10870e08809b1811
MD5 5dae44f7da3731eeeedca49a1779104b
BLAKE2b-256 b0e1217430119251900aa9191ebd5fa0166310c759037d6bf74c2cdd424e9461

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppx_llamaindex-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 8727e4af91bebcc359a8faa5991fa9c1840b504abad7563c6044beac9365e836
MD5 62abb12193d52b6368b75cda3f989a9b
BLAKE2b-256 bc58aa8c0a4abcf5abcd414220c77bba0673cd695b4e8b74a86c40c8811d33f8

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