Skip to content

Test

This example assumes using Mistral; is in scope and apiKey contains your Mistral API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
using var client = new MistralClient(apiKey);

ChatCompletionResponse response = await client.Chat.ChatCompletionAsync(
    model: "mistral-small-latest",
    messages: new List<MessagesItem>
    {
        new UserMessage
        {
            Content = "Hello",
        },
    });