CompleteHistory

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

var response = await client.CreateMessageAsync(
    model: CreateMessageRequestModel.Claude35Sonnet20240620,
    messages: [
        "What's the weather like today?",
        "Sure! Could you please provide me with your location?".AsAssistantMessage(),
        "Dubai, UAE",
    ],
    maxTokens: 300,
    metadata: null,
    stopSequences: null,
    system: null,
    temperature: 0,
    toolChoice: null,
    tools: null,
    topK: 0,
    topP: 0,
    stream: false);

Console.WriteLine(response.AsSimpleText());