Skip to main content

llama-index managed postgresml integration

Project description

LlamaIndex Managed Integration: PostgresML

PostgresML provides an all in one platform for production ready RAG applications.

Setup

First, make sure you have the latest LlamaIndex version installed and a connection string to your PostgresML database.

If you don't already have a connection string, you can get one on postgresml.org.

pip install llama-index-indices-managed-postgresml

Usage

Getting started is easy!

import os

os.environ[
    "PGML_DATABASE_URL"
] = "..."  # Can provide in the environment or constructor later on

from llama_index.core import Document
from llama_index.indices.managed.postgresml import PostgresMLIndex

# Create an index
index = PostgresMLIndex.from_documents(
    "llama-index-test-1", [Document.example()]
)

# Connect to an index
index = PostgresMLIndex("llama-index-test-1")

You can use the index as a retriever

# Create a retriever from an index
retriever = index.as_retriever()

results = retriever.retrieve("What managed index is the best?")
print(results)

You can also use the index as a query engine

# Create an engine from an index
query_engine = index.as_query_engine()

response = retriever.retrieve("What managed index is the best?")
print(response)

Project details


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

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

File details

Details for the file llama_index_indices_managed_postgresml-0.6.0.tar.gz.

File metadata

  • Download URL: llama_index_indices_managed_postgresml-0.6.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_indices_managed_postgresml-0.6.0.tar.gz
Algorithm Hash digest
SHA256 d98a0223be33c4143f92ff7288714bd19e6e37bd02c3b991de1c828e92ff1559
MD5 4121207af2134419dc2b7041c939830b
BLAKE2b-256 7c1993ef21e03feb400aec361e735ae4a2e81d450d4794b4884c48d81a65e9ae

See more details on using hashes here.

File details

Details for the file llama_index_indices_managed_postgresml-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_indices_managed_postgresml-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_indices_managed_postgresml-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5496b0c91e045438c01956387632372c8acc8f035e989cc5a97aa79c999e5537
MD5 00b93e041d352130aca30b6ae45f19c0
BLAKE2b-256 f17bec0dc98733237e18a95fd37c0b7f1b5b4d3ed75de847664ef6572c90cef1

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 Pingdom Monitoring Sentry Error logging StatusPage Status page