Interface between LLMs and your data
Project description
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))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
llama_iris-0.3.1b5.tar.gz
(5.0 kB
view details)
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 llama_iris-0.3.1b5.tar.gz.
File metadata
- Download URL: llama_iris-0.3.1b5.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51dd58972db1e5afd75b8bac17fdf79277cfbe5894518f2f27aee78cfc1f8cc6
|
|
| MD5 |
7d7c7b173b3747247d9cebed3ed7266a
|
|
| BLAKE2b-256 |
360148323afb63c805a753f973423bb01a04f2305201ff353c60fc9a4514869d
|
File details
Details for the file llama_iris-0.3.1b5-py3-none-any.whl.
File metadata
- Download URL: llama_iris-0.3.1b5-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4ab8e7f467e9957d93245820912bb96e5a2952eeba1c43fa0c57df8369b2322
|
|
| MD5 |
e77e0570e83016f153e818fb7d3b36a1
|
|
| BLAKE2b-256 |
390d20ef814ccc08e2598b2c5ed5dacde1a709ead535717d91a32daa2973e022
|