Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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))

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.1b3.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_iris-0.3.1b3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file llama_iris-0.3.1b3.tar.gz.

File metadata

  • Download URL: llama_iris-0.3.1b3.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

Hashes for llama_iris-0.3.1b3.tar.gz
Algorithm Hash digest
SHA256 5687f77d8e0a026dac5e39cfabbeab446728ae19194c18d4c9d43e3402de37be
MD5 a0c0498edabbca7bc3c6071f304e17a3
BLAKE2b-256 87047ee3670a4c8132369ee3ca7f1d5b6c740a6ee4f3395f047b2b97709648ab

See more details on using hashes here.

File details

Details for the file llama_iris-0.3.1b3-py3-none-any.whl.

File metadata

  • Download URL: llama_iris-0.3.1b3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for llama_iris-0.3.1b3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a26373f429376c2d15858aecb896fbac00fde4b44c8e477dc06fae919c2d179
MD5 af5afe8837a8104699a05ea5c66976a0
BLAKE2b-256 7cec56e8b4ba533ebcad89a9bfa97c3493347b9659644af07190172c10567e85

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