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

File metadata

File hashes

Hashes for llama_index_storage_chat_store_postgres-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a7c938312be5a337bc557c94362ee19e9ebb06b2a6976f6de0ed0b0e2a3ead3c
MD5 bb9788190960f650f049ea98c3c1bd04
BLAKE2b-256 7b553bfa31b51057f2b3876c3d1078bdba1348ec973f520f865cd8b5474070bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_storage_chat_store_postgres-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb16aa5a451a8209176045010c6a93dc9b66416fa4d35eed76558ca344cff20
MD5 e14c9c294b2f2a79610d4c400a97981e
BLAKE2b-256 8c592d3d215be4d287513b74a8ce32d5a68c6e6f2bf52fa701c133dd9afa4053

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