Llama-index with InterSystems IRIS
Llama-index with support for InterSystems IRIS
Install
pip install llama-iris
Example
import os
from dotenv import load_dotenv
from llama_index import SimpleDirectoryReader, StorageContext, ServiceContext
from llama_index.indices.vector_store import VectorStoreIndex
import openai
from llama_iris import IRISVectorStore
load_dotenv(override=True)
documents = SimpleDirectoryReader("./data/paul_graham").load_data()
print("Document ID:", documents[0].doc_id)
vector_store = IRISVectorStore.from_params(
connection_string=CONNECTION_STRING,
table_name="paul_graham_essay",
embed_dim=1536, # openai embedding dimension
)
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
documents,
storage_context=storage_context,
show_progress=True,
)
query_engine = index.as_query_engine()
response = query_engine.query("What did the author do?")
import textwrap
print(textwrap.fill(str(response), 100))
Metadata
Release files for llama-iris 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_iris-0.5.0.tar.gz | 5.0 kB | Without provenance | Details for llama_iris-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_iris-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for llama_iris-0.5.0-py3-none-any.whl |
Total release size: 10.7 kB
Release files / llama_iris-0.5.0.tar.gz
| Download URL | llama_iris-0.5.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0898205dcaa24800cde45cdb64ad457633c636367c2d6558035d7d748356e34
|
|
BLAKE2b-256 checksum How to use checksums |
828752ab1a46bc3a306cc45a748e88584d3e2d9e2b14883a56db3eca4cbee443
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / llama_iris-0.5.0-py3-none-any.whl
| Download URL | llama_iris-0.5.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40d9e28e24301e433d0777426c909be05cd271d20e72700826284db33a028686
|
|
BLAKE2b-256 checksum How to use checksums |
46c15b7eca5788e850727737446f651f91383b28c13844458c345c1e78b95b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Security for llama-iris 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.