Produciton Ready LangChain
Project description
LongTrainer - Production-Ready LangChain
Features 🌟
- ✅ Long Memory: Retains context effectively for extended interactions.
- ✅ Unique Bots/Chat Management: Sophisticated management of multiple chatbots.
- ✅ Enhanced Customization: Tailor the behavior to fit specific needs.
- ✅ Memory Management: Efficient handling of chat histories and contexts.
- ✅ GPT Vision Support: Integration Context Aware GPT-powered visual models.
- ✅ Different Data Formats: Supports various data input formats.
- ✅ VectorStore Management: Advanced management of vector storage for efficient retrieval.
Usage Example 🚀
pip install longtrainer
Here's a quick start guide on how to use LongTrainer:
from longtrainer.trainer import LongTrainer
import os
# Set your OpenAI API key
os.environ["OPENAI_API_KEY"] = "sk-"
# Initialize LongTrainer
trainer = LongTrainer(redis_endpoint='redis://localhost:6379', mongo_endpoint='mongodb://localhost:27017/')
bot_id = trainer.initialize_bot_id()
print('Bot ID: ', bot_id)
# Add Data
path = 'path/to/your/data'
trainer.add_document_from_path(path, bot_id)
# Initialize Bot
trainer.create_bot(bot_id)
# Start a New Chat
chat_id = trainer.new_chat(bot_id)
# Send a Query and Get a Response
query = 'Your query here'
response = trainer.get_response(query, chat_id, bot_id)
print('Response: ', response)
Maintainer 🛠️
This project is proudly maintained by ENDEVSOLS.
📧 Contact us at: technology@endevsols.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
longtrainer-0.1.5.tar.gz
(10.9 kB
view hashes)
Built Distribution
Close
Hashes for longtrainer-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f34d661b8b743e1cc15ddad6ab9f9e99a1cabbdb69369553c0e0297537883f8 |
|
MD5 | 4cc8943335db505f8b043fa960c41745 |
|
BLAKE2b-256 | 67eacff3ff03ec38715178c11c5397fe0746d1e409a35b1976b502579b613da5 |