mistral_tools.conversation
High-level interface to the Mistral completion API
Classes
|
High-level interface to the Mistral completion API |
- class mistral_tools.conversation.ModelConversation(*, api_key, tool_register, model, rate_limit: float | RateLimiter = 1.1, system_prompt: str | None = None)[source]
High-level interface to the Mistral completion API
Handles keeping track of a conversation with a model, and sending messages to the model, as well as automatically handling tool calls.
- simulate_assistant_message(content, *, tool_calls=None)[source]
Add an assistant message to the conversation
- send(*, tool_choice: Literal['any', 'auto', 'none'] = 'auto')[source]
Send the conversation to the model and get the response