MistralAIClient
MistralAIClient(**kwargs)
Client for Mistral.AI’s API.
Requires api_key or environment variable to be set
Parameters:
Instance Methods
cost(self, response) -> float
Parameters:
create(self, params: dict[str, Any]) -> ChatCompletionExtended
Parameters:
Name | Description |
---|
params | Type: dict[str, typing.Any] |
get_usage
get_usage(response:Â ChatCompletionExtended) -> dict
Parameters:
Name | Description |
---|
response | Type: autogen.oai.oai_models.chat_completion.ChatCompletionExtended |
message_retrieval
message_retrieval(self, response:Â ChatCompletionExtended) -> list[str]Â |Â list[ChatCompletionMessage]
Retrieve the messages from the response.
Parameters:
Name | Description |
---|
response | Type: autogen.oai.oai_models.chat_completion.ChatCompletionExtended |
parse_params
parse_params(self, params: dict[str, Any]) -> dict[str, Any]
Loads the parameters for Mistral.AI API from the passed in parameters and returns a validated set. Checks types, ranges, and sets defaults
Parameters:
Name | Description |
---|
params | Type: dict[str, typing.Any] |