Skip to main content

llama-index storage-chat-store yugabytedb integration

Project description

LlamaIndex Chat_Store Integration: YugabyteDB Chat Store

Prerequisites

Before using this integration, you'll need to have a YugabyteDB instance running. You can set up a local YugabyteDB instance by following the YugaByteDB Quick Start Guide.

Installation

pip install llama-index-storage-chat-store-yugabytedb

Usage

Using YugabyteDBChatStore, you can store your chat history remotely, without having to worry about manually persisting and loading the chat history.

from llama_index.storage.chat_store.yugabytedb import YugabyteDBChatStore
from llama_index.core.memory import ChatMemoryBuffer

chat_store = YugabyteDBChatStore.from_uri(
    uri="yugabytedb+psycopg2://yugabyte:password@127.0.0.1:5433/yugabyte?load_balance=true",
)

chat_memory = ChatMemoryBuffer.from_defaults(
    token_limit=3000,
    chat_store=chat_store,
    chat_store_key="user1",
)

Connection String Parameters

The connection string passed to YugabyteDBChatStore.from_uri() supports various parameters that can be used to configure the connection to your YugabyteDB cluster. You can find a complete list of supported parameters in the YugabyteDB psycopg2 Driver Documentation.

The YugabyteDB specific parameters include:

  • load_balance: Enable/disable load balancing (default: false)
  • topology_keys: Specify preferred nodes for connection routing
  • yb_servers_refresh_interval: Interval (in seconds) to refresh the list of available servers
  • fallback_to_topology_keys_only: Whether to only connect to nodes specified in topology_keys
  • failed_host_ttl_seconds: Time (in seconds) to wait before trying to connect to failed nodes

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_storage_chat_store_yugabytedb-0.1.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_storage_chat_store_yugabytedb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1f7cac485a629dafb87812fe413daa08ba0bbe2c7d7c9a1a73fbb41e77db1d69
MD5 0ffd3e76c6267f51e9f120ac534c5f90
BLAKE2b-256 78d92248293f9dec1f02669df1eeee67bf4a494a4216e1cbc752aeff078c329a

See more details on using hashes here.

File details

Details for the file llama_index_storage_chat_store_yugabytedb-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_storage_chat_store_yugabytedb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bc23de994df69fdcba7b36fc253a2d6bcf0d354c768bb83396e15eee29d7f69
MD5 da5c89eca76d9c1c0df6878d944c7b5e
BLAKE2b-256 4c3c3d4767c219dcbc4785151d0a881909fdc8f513477aca5d61d8db6aff627e

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