Repository navigation
Changelog v2.0.0
User-Focused Changes
π New Features
- Image Understanding in Private Chats
- Description: You can now send images directly to the bot in private chats, and it will analyze and describe them or answer questions about the content.
- Usage: Simply send an image to the bot in a private message, optionally with a caption containing your question or request.
π€ Improved Interaction
-
Contextual Conversations with Chat History
- Description: The bot now maintains a history of your recent messages in private chats, allowing for more natural and context-aware conversations.
- Benefit: This means you can refer to previous messages without needing to repeat information, making your interactions smoother and more intuitive.
-
Enhanced Audio Processing
- Description: The bot's speech-to-text capabilities have been improved, allowing for more accurate transcription of audio messages.
- Usage: Send audio messages to the bot, and it will respond to the transcribed content.
π Streaming Support for Premium Models
- Live Response Streaming
- Description: Premium models now support response streaming, providing real-time answers as they process your queries.
- Benefit: Enjoy faster and more dynamic interactions, especially with complex queries or large data processing.
Developer-Focused Changes
ποΈ New Integrations
- Mistral AI Vision API Integration
- Details: Integrated the Mistral AI Vision API to enable image analysis capabilities.
- Files Affected:
config/constants.py: AddedMISTRAL_API_KEY,MISTRAL_BASE_URL, andVISION_MODEL.handlers/dm_handlers/chat.py: Updateddm_chat_handlerto process image messages.config/prompts.py: Addedvision_limitations_v1prompt for image processing.
π‘ Streaming Implementation
- OpenAI Streaming API
- Details: Implemented streaming support for premium models, allowing the bot to send responses in real-time chunks.
- Files Affected:
utils/api/openai.py: Added theopenai_streamfunction for handling streaming responses.handlers/dm_handlers/chat.py: Utilized streaming indm_chat_handlerfor premium models.
ποΈ Chat History Implementation
- Persistent Conversation History
- Details: Implemented chat history storage to maintain conversation context over multiple messages.
- Files Affected:
utils/database/users.py: Addedchat_historytable and functionsget_chat_history,update_chat_history.utils/helpers/chat_history.py: Created to manage chat history functionalities.handlers/dm_handlers/chat.py: Updated to utilize chat history in message handling.config/constants.py: AddedMAX_CHAT_HISTORYandCHAT_ROLESfor managing chat history and message roles.
π οΈ Code Improvements
-
Constants and Configuration Adjustments
- Updates:
- Corrected typos in
DEFAULT_TEXT_GEN_MODELandDEFAULT_IMG_GEN_MODELinconfig/constants.py. - Added
MAX_CHAT_HISTORYandCHAT_ROLESconstants for better configuration management.
- Corrected typos in
- Updates:
-
Error Handling Enhancements
- Improvements: Enhanced error handling mechanisms, especially when dealing with image processing, audio transcription, and API integrations, to ensure more robust performance.
π Other Changes
-
Updated Prompts
- Details: Added a new system prompt
vision_limitations_v1inconfig/prompts.pyfor guiding the AI's behavior when processing images.
- Details: Added a new system prompt
-
Adjusted Handler Functions
- Details: Updated
dm_chat_handlerinhandlers/dm_handlers/chat.pyto support image messages and chat history, ensuring more seamless interactions.
- Details: Updated
-
Updated Requirements
- Details: Ensured that
requirements.txtincludes any new dependencies required for Mistral AI integration or other new features.
- Details: Ensured that
Note to Users and Developers:
This version brings significant improvements to the bot's capabilities, especially in terms of interacting with images, maintaining conversation context, and real-time response streaming. Users can enjoy a more interactive and responsive experience, while developers can explore the new integrations and enhancements made under the hood.
For any questions or support, feel free to reach out to the maintainer or contribute to the project on GitHub.