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.0a1on PyPI and0.1.0-alpha.1on 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd9523ddb1d7d045e6afd2fad4d33a6ac1c6ceac81986ceb47411ab31f14ce21
|
|
| MD5 |
440272ca728738f5311781e4e69067ff
|
|
| BLAKE2b-256 |
07ab238af71c924956c7fc3d11e9c2202145b5ea69b2312964d7232854544263
|
File details
Details for the file ppx_llamaindex-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: ppx_llamaindex-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a88491299a07dc136522b65347023f39f26586278ad7d165133a1a520bee14b
|
|
| MD5 |
613c0d95d689101160da2c6a21ba17ec
|
|
| BLAKE2b-256 |
59d842d886febc63f65e079070e0a90e1c0dbfa77e8e4e715fdf6fb09ae78f59
|