MistralAILLMClient
open class MistralAILLMClient @JvmOverloads constructor(settings: MistralAIClientSettings = MistralAIClientSettings(), httpClient: KoogHttpClient, clock: Clock = Clock.System, toolsConverter: OpenAICompatibleToolDescriptorSchemaGenerator = OpenAICompatibleToolDescriptorSchemaGenerator()) : AbstractOpenAILLMClient<MistralAIChatCompletionResponse, MistralAIChatCompletionStreamResponse> (source)
Implementation of LLMClient for Mistral AI.
Parameters
settings
The base URL, chat completion path, and timeouts for the Mistral AI
httpClient
A fully configured KoogHttpClient for making API requests. Use the secondary constructor to create a Ktor-backed client configured with an API key.
clock
Clock instance used for tracking response metadata timestamps
Constructors
Link copied to clipboard
constructor(settings: MistralAIClientSettings = MistralAIClientSettings(), httpClient: KoogHttpClient, clock: Clock = Clock.System, toolsConverter: OpenAICompatibleToolDescriptorSchemaGenerator = OpenAICompatibleToolDescriptorSchemaGenerator())
constructor(apiKey: String, settings: MistralAIClientSettings = MistralAIClientSettings(), baseClient: HttpClient = HttpClient(), clock: Clock = Clock.System, toolsConverter: OpenAICompatibleToolDescriptorSchemaGenerator = OpenAICompatibleToolDescriptorSchemaGenerator())
Functions
Link copied to clipboard
Link copied to clipboard
open suspend override fun execute(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>): List<Message.Response>
Link copied to clipboard
open suspend override fun executeMultipleChoices(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>): List<LLMChoice>
Link copied to clipboard
open override fun executeStreaming(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>): Flow<StreamFrame>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns the specific implementation of the LLMProvider associated with this client
Link copied to clipboard
Moderates text and image content based on the provided model's capabilities.