Skip to content

v2.0.0

Latest

Choose a tag to compare

@SreejanPersonal SreejanPersonal released this 31 Dec 02:17
c7e2512

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: Added MISTRAL_API_KEY, MISTRAL_BASE_URL, and VISION_MODEL.
      • handlers/dm_handlers/chat.py: Updated dm_chat_handler to process image messages.
      • config/prompts.py: Added vision_limitations_v1 prompt 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 the openai_stream function for handling streaming responses.
      • handlers/dm_handlers/chat.py: Utilized streaming in dm_chat_handler for 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: Added chat_history table and functions get_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: Added MAX_CHAT_HISTORY and CHAT_ROLES for managing chat history and message roles.

πŸ› οΈ Code Improvements

  • Constants and Configuration Adjustments

    • Updates:
      • Corrected typos in DEFAULT_TEXT_GEN_MODEL and DEFAULT_IMG_GEN_MODEL in config/constants.py.
      • Added MAX_CHAT_HISTORY and CHAT_ROLES constants for better configuration management.
  • 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_v1 in config/prompts.py for guiding the AI's behavior when processing images.
  • Adjusted Handler Functions

    • Details: Updated dm_chat_handler in handlers/dm_handlers/chat.py to support image messages and chat history, ensuring more seamless interactions.
  • Updated Requirements

    • Details: Ensured that requirements.txt includes any new dependencies required for Mistral AI integration or other new features.

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.