This example assumes using Cohere; is in scope and apiKey contains your Cohere API key.
123456789
usingvarclient=newCohereClient(apiKey);varresponse=awaitclient.ChatAsync(newChatRequest{Message="Hello, Cohere! Can you tell me a joke?",});Console.WriteLine("Cohere Response:");Console.WriteLine(response.Value1!.Text);