Metadata-Version: 2.1
Name: memory_bank
Version: 0.1.2
Summary: A simple Python library for managing chat message history in langchain
Home-page: https://github.com/Kaladin4/memory_bank
Author: Francisco Garófalo Jerez
Author-email: dalinargarofalo@gmail.com
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain-core
Provides-Extra: dev
Requires-Dist: langchain-anthropic ; extra == 'dev'
Requires-Dist: python-dotenv ; extra == 'dev'

# Memory Bank

Memory Bank is a simple Python library for managing chat message history in memory. It provides an easy way to create, store, and retrieve chat messages for different sessions.

## Installation

Straightforward installation with pipenv in case you want to try out the test cases. Be sure to install dependencies in development mode as well.

## Features

- Create unique memory sessions
- Store and retrieve chat messages
- Asynchronous support
- Clear message history
- Session-based memory management

## API Reference

### MemoryBank

- create_memory(): Creates a new Memory instance with a unique session ID.
- get_memory(session_id): Retrieves a Memory instance by session ID.

### Memory
- add_message(message): Adds a message to the memory.
- add_messages(messages): Adds multiple messages to the memory.
- clear(): Clears all messages from the memory.
- get_messages(): Returns all messages in the memory.
- get_session_id(): Returns the session ID of the memory.
- activate_memory(): Returns a dictionary with the session ID.
- Async versions of these methods are also available with the prefix a (e.g., aadd_messages, aclear, aget_messages).



