FiveRandomWords

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
using var client = new AnthropicClient(apiKey);

var response = await client.Messages.MessagesPostAsync(
    model: ModelVariant2.Claude37SonnetLatest,
    messages: ["Generate 5 random words."],
    maxTokens: 300,
    metadata: null,
    stopSequences: null,
    system: null,
    temperature: 0,
    toolChoice: null,
    tools: null,
    topK: 0,
    topP: 0,
    stream: false);

Console.WriteLine(response.AsSimpleText());