Devika is an Agentic AI Software Engineer that can understand high-level human instructions, break them down into steps, research relevant information, and write code to achieve the given objective. Devika aims to be a competitive open-source alternative to Devin by Cognition AI.
Refactor: Update to new version of Mistral library
This pull request updates the MistralAi class to be compatible with the latest version of the Mistral Python library. The changes include:
_Refactored Imports: Updated imports from mistralai.client and mistralai.models.chat_completion to mistralai. Specifically, Mistral is used instead of MistralClient, and message formatting has been changed._
Client Initialization: Replaced MistralClient with Mistral for creating the client instance. This change aligns with the new library structure.
Message Formatting: Modified the message structure from using ChatMessage to a dictionary format, which is now the standard for the new library version.
Chat Completion Method: Updated the method call from client.chat() to client.chat.complete() for generating chat completions.
Explain what existing problem does the pull request solve?
Problem Solved: This refactor ensures compatibility with the new version of the Mistral library, addressing deprecated classes and methods from the previous version.
Description
Refactor: Update to new version of Mistral library
This pull request updates the MistralAi class to be compatible with the latest version of the Mistral Python library. The changes include:
_Refactored Imports: Updated imports from mistralai.client and mistralai.models.chat_completion to mistralai. Specifically, Mistral is used instead of MistralClient, and message formatting has been changed._
Client Initialization: Replaced MistralClient with Mistral for creating the client instance. This change aligns with the new library structure.
Message Formatting: Modified the message structure from using ChatMessage to a dictionary format, which is now the standard for the new library version.
Chat Completion Method: Updated the method call from client.chat() to client.chat.complete() for generating chat completions.
Explain what existing problem does the pull request solve?
Problem Solved: This refactor ensures compatibility with the new version of the Mistral library, addressing deprecated classes and methods from the previous version.