LLM Dialog Manager
A Python package for managing AI chat conversation history with support for multiple LLM providers (OpenAI, Anthropic, Google, X.AI) and convenient conversation management features.
Features
- Support for multiple AI providers:
- OpenAI (GPT-3.5, GPT-4)
- Anthropic (Claude)
- Google (Gemini)
- X.AI (Grok)
- Intelligent message role management (system, user, assistant)
- Conversation history tracking and validation
- Load balancing across multiple API keys
- Error handling and retry mechanisms
- Conversation saving and loading
- Memory management options
- Conversation search and indexing
- Rich conversation display options
- Vision & Json Output enabled [20240111]
Installation
pip install llm-dialog-manager
Quick Start
Environment Variables
Create a .env file in your project root:
# OpenAI
OPENAI_API_KEY_1=your-key-1
OPENAI_API_BASE_1=https://api.openai.com/v1
# Anthropic
ANTHROPIC_API_KEY_1=your-anthropic-key
ANTHROPIC_API_BASE_1=https://api.anthropic.com
# Google
GEMINI_API_KEY=your-gemini-key
# X.AI
XAI_API_KEY=your-x-key
Basic Usage
from llm_dialog_manager import Agent
# Initialize an agent with a specific model
agent = Agent("ep-20250319212209-j6tfj-openai", memory_enabled=True)
# Add messages and generate responses
agent.add_message("system", "You are a helpful assistant")
agent.add_message("user", "What is the capital of France?")
response = agent.generate_response()
# Save conversation
agent.save_conversation()
Setup Debugging Console
python app.py
# open localhost:8000
https://github.com/user-attachments/assets/5f640029-24e6-44ea-a3a3-02eb3de0d4df
Development
Running Tests
pytest tests/
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For support, please open an issue in the GitHub repository or contact the maintainers.
Metadata
Release files for llm-dialog-manager 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_dialog_manager-0.5.3.tar.gz | 17.3 kB | Without provenance | Details for llm_dialog_manager-0.5.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_dialog_manager-0.5.3-py3-none-any.whl | Python 3 | none | any | Details for llm_dialog_manager-0.5.3-py3-none-any.whl |
Total release size: 41.5 kB
Release files / llm_dialog_manager-0.5.3.tar.gz
| Download URL | llm_dialog_manager-0.5.3.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ed89c680d96f6fefb722ab3e3254ca7f05068f6a1076f6d5aa18d3deb3688fa
|
|
BLAKE2b-256 checksum How to use checksums |
8c4da056965b30d699a91d918926b5e9d485658ff9e052b32a6dacf216ced724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / llm_dialog_manager-0.5.3-py3-none-any.whl
| Download URL | llm_dialog_manager-0.5.3-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
186396fa365be2f3dad8f34f325737afb02536d2c6a965bd1eb0916776e1b035
|
|
BLAKE2b-256 checksum How to use checksums |
7e241aef9874d06ba63426cbe07ab2bd4ad77671620f9a9137c4cbe3186bc3a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for llm-dialog-manager 0.5.3
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.