Skip to main content

llama-index storage-chat-store postgres integration

Project description

LlamaIndex Chat_Store Integration: Postgres Chat Store

Installation

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

Usage

Using PostgresChatStore, 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.postgres import PostgresChatStore
from llama_index.core.memory import ChatMemoryBuffer

chat_store = PostgresChatStore.from_uri(
    uri="postgresql+asyncpg://postgres:password@127.0.0.1:5432/database",
)

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

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_postgres-0.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_storage_chat_store_postgres-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2ddf519726135d77479104346f98529b2154c02e1235dda475eb473245008735
MD5 d74988fea70e60c76a6e9878a9429e22
BLAKE2b-256 baf4edb161300ee055a95af8887f659db73ee3f42fc1e09a311e13f3e974dc6d

See more details on using hashes here.

File details

Details for the file llama_index_storage_chat_store_postgres-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_storage_chat_store_postgres-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b99711adbbb99021d5f5aa5f84467dfe4a6255e62d5a1d57808f80364c20cd2
MD5 3145628d4070fdbcf02347708158c60b
BLAKE2b-256 2bbe3660a5dd7ed5f24ef38a44051954b1cb8d1e31997b1c0767c2f5bc7870d7

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