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.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_storage_chat_store_yugabytedb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dce7936430d595479d9b5b37d60af93741916e1b2f40aa90bd183651b9f9ccb6
MD5 bef9ffbdb0dd1efa20c7be73876eeb8d
BLAKE2b-256 28ccb3cedd4bfd0605615af6586f2214280f954fae988205f99f4e3c306bc9a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_storage_chat_store_yugabytedb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50e980b81c57783e18e9ed5f9cae36333ca0766cf6812df9b952d82bbed77176
MD5 791f3a26badfcae591e541dda5500a72
BLAKE2b-256 80657c54e403c40013ff6b2561fd42ab167c61e9ed4c23009e52c8ecf711401f

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