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.CreateMessageAsync(
    model: CreateMessageRequestModel.Claude35Sonnet20240620,
    messages: ["Generate 5 random words."],
    maxTokens: 250,
    metadata: null,
    stopSequences: null,
    system: null,
    temperature: 0,
    toolChoice: null,
    tools: null,
    topK: 0,
    topP: 0,
    stream: false);

Console.WriteLine(response.AsSimpleText());