Skip to main content

LlamaIndex Chat_Store Integration: Upstash Chat Store

Installation

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

Usage

from llama_index.storage.chat_store.upstash import UpstashChatStore
from llama_index.core.memory import ChatMemoryBuffer

chat_store = UpstashChatStore(
    redis_url="YOUR_UPSTASH_REDIS_URL",
    redis_token="YOUR_UPSTASH_REDIS_TOKEN",
    ttl=300,  # Optional: Time to live in seconds
)

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

UpstashChatStore supports both synchronous and asynchronous operations. Here's an example of using async methods:

import asyncio
from llama_index.core.llms import ChatMessage


async def main():
    # Add messages
    messages = [
        ChatMessage(content="Hello", role="user"),
        ChatMessage(content="Hi there!", role="assistant"),
    ]
    await chat_store.async_set_messages("conversation1", messages)

    # Retrieve messages
    retrieved_messages = await chat_store.async_get_messages("conversation1")
    print(retrieved_messages)

    # Delete last message
    deleted_message = await chat_store.async_delete_last_message(
        "conversation1"
    )
    print(f"Deleted message: {deleted_message}")


asyncio.run(main())

Metadata

Release files for llama-index-storage-chat-store-upstash 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-storage-chat-store-upstash 0.5.0
File Size Uploaded Provenance Actions
llama_index_storage_chat_store_upstash-0.5.0.tar.gz 5.3 kB Without provenance Details for llama_index_storage_chat_store_upstash-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-storage-chat-store-upstash 0.5.0
File Interpreter ABI Platform Actions
llama_index_storage_chat_store_upstash-0.5.0-py3-none-any.whl Python 3 none any Details for llama_index_storage_chat_store_upstash-0.5.0-py3-none-any.whl

Total release size: 10.3 kB

Release files / llama_index_storage_chat_store_upstash-0.5.0.tar.gz

Download URL llama_index_storage_chat_store_upstash-0.5.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fc586453c64c7ee92afebf22fde2f34d508a182e0bac9ffa4acf0d1f01bb3acb
BLAKE2b-256 checksum
How to use checksums
9ca15aa67ccdfa896cb03a36217a7daecc307aa6bc72e87bdc521da06e4941eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Release files / llama_index_storage_chat_store_upstash-0.5.0-py3-none-any.whl

Download URL llama_index_storage_chat_store_upstash-0.5.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27267c10b16a105d931a79a14e7954a6a5774fb4dd075a6b7dd95868d36a24a5
BLAKE2b-256 checksum
How to use checksums
f40dc2d3bdd5b7d50f4c83152a069b941327e8b607a28fea42665405de208c2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Security for llama-index-storage-chat-store-upstash 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page