Skip to main content

llama-index storage-chat-store aws dynamodb integration

Project description

LlamaIndex Chat_Store Integration: DynamoDB Chat Store

This enables AWS DynamoDB to be used as a chat store.

Installation

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

Usage

Assumptions

  • SessionID, a string, is used as the partition key.

  • The table used for the chat store already exists. Here is an example for that:

    import boto3
    
    dynamodb = boto3.resource("dynamodb")
    
    # Create the DynamoDB table.
    table = dynamodb.create_table(
        TableName="EXAMPLE_TABLE",
        KeySchema=[{"AttributeName": "SessionId", "KeyType": "HASH"}],
        AttributeDefinitions=[
            {"AttributeName": "SessionId", "AttributeType": "S"}
        ],
        BillingMode="PAY_PER_REQUEST",
    )
    

Using an AWS IAM Role

You can use any of the following AWS arguments to setup the required boto3 resource connection:

  • profile_name
  • aws_access_key_id
  • aws_secret_access_key
  • aws_session_token
  • botocore_session - A pre-existing existing Botocore session.
  • botocore_config

As an example, if you have already assumed an AWS profile in your local environment or within an AWS compute environment, you can simply do the following:

import os
from llama_index.storage.chat_store.dynamodb.base import DynamoDBChatStore

store = DynamoDBChatStore(
    profile_name=os.getenv("AWS_PROFILE"),
    table_name="EXAMPLE_TABLE",
    session_id="123",
)

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_dynamodb-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_storage_chat_store_dynamodb-0.5.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}

File hashes

Hashes for llama_index_storage_chat_store_dynamodb-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0dadbbe809498094c3039a24ffbbecd52e34772a406ed7b39ca975320f62ba17
MD5 c1404357906d92462cb6b4ad32dc5623
BLAKE2b-256 24d9683f34e30240e50b47a0822cc8705be020eeb6980a383ef2b4e2a5bc40d7

See more details on using hashes here.

File details

Details for the file llama_index_storage_chat_store_dynamodb-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_storage_chat_store_dynamodb-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}

File hashes

Hashes for llama_index_storage_chat_store_dynamodb-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7c57dcb894b8af44edb6c50e86a2de0110ba74d7e56f74bd5f161ca77c976fb
MD5 86b4e25788b74455710a1a65f9a771ba
BLAKE2b-256 d5361c9e534ef939fb646f3f8da1abd9a1c8abe410a75168dcd7f6e46603370c

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