70 references to GetResponseAsync
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureOpenAIClientBuilderChatClientExtensionsTests.cs (1)
217
var completion = await client.
GetResponseAsync
("Whatever");
Aspire.OpenAI.Tests (2)
AspireOpenAIClientBuilderChatClientExtensionsTests.cs (2)
220
var completion = await client.
GetResponseAsync
("Whatever");
254
var completion = await client.
GetResponseAsync
("Whatever");
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatClientExtensionsTests.cs (2)
77
_ = ChatClientExtensions.
GetResponseAsync
(null!, "hello");
123
ChatResponse response = await client.
GetResponseAsync
("hello", expectedOptions, cts.Token);
Microsoft.Extensions.AI.AzureAIInference.Tests (11)
AzureAIInferenceChatClientTests.cs (11)
42
await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.
GetResponseAsync
("hello"));
45
await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.
GetResponseAsync
("hello", new ChatOptions { ModelId = null }));
254
var response = await client.
GetResponseAsync
("hello", new ChatOptions
368
var response = await client.
GetResponseAsync
("hello", chatOptions);
535
var response = await client.
GetResponseAsync
("hello", chatOptions);
684
Assert.NotNull(await client.
GetResponseAsync
("hello", new()
743
Assert.NotNull(await client.
GetResponseAsync
("hello", new()
794
Assert.NotNull(await client.
GetResponseAsync
("hello", new()
830
Assert.NotNull(await client.
GetResponseAsync
("hello", new()
887
Assert.NotNull(await client.
GetResponseAsync
("hello", new()
1249
var response = await client.
GetResponseAsync
("How old is Alice?", new()
Microsoft.Extensions.AI.Integration.Tests (9)
ChatClientIntegrationTests.cs (9)
66
var response = await ChatClient.
GetResponseAsync
("What's the biggest animal?");
131
var response = await ChatClient.
GetResponseAsync
("Explain in 10 words how AI works");
260
var response = await chatClient.
GetResponseAsync
("What is the result of SecretComputation on 42 and 84?", new()
513
var response = await chatClient.
GetResponseAsync
("Briefly, what is the most popular tower in Paris?", options);
582
var response = await chatClient.
GetResponseAsync
("How much older is Elsa than Anna? Return the age difference as a single number.", new()
614
var response = await chatClient.
GetResponseAsync
("Are birds real?", new()
635
var response = await chatClient.
GetResponseAsync
("What's the current secret number?", new()
895
await chatClient.
GetResponseAsync
(
1681
var response = await ChatClient!.
GetResponseAsync
(analysisPrompt);
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (3)
OllamaSharpChatClientIntegrationTests.cs (3)
43
var response = await chatClient.
GetResponseAsync
("What is the current secret number? Answer with digits only.", new ChatOptions
78
var response = await chatClient.
GetResponseAsync
("What's the stock price for Microsoft in British pounds?", new ChatOptions
100
ex = await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.
GetResponseAsync
("Hello, world!"));
Microsoft.Extensions.AI.OpenAI.Tests (32)
OpenAIAssistantChatClientIntegrationTests.cs (1)
54
var response = await ChatClient.
GetResponseAsync
("Use the code interpreter to calculate the square root of 42.", new()
OpenAIChatClientTests.cs (8)
153
var response = await client.
GetResponseAsync
("hello", new()
330
var response = await client.
GetResponseAsync
("hello", new()
416
var response = await client.
GetResponseAsync
("hello", chatOptions);
574
var response = await client.
GetResponseAsync
("hello", chatOptions);
726
Assert.NotNull(await client.
GetResponseAsync
("hello", new()
1139
var response = await client.
GetResponseAsync
("How old is Alice?", new()
1223
var response = await client.
GetResponseAsync
("What day is it?", new()
1629
InvalidOperationException e = await Assert.ThrowsAsync<InvalidOperationException>(() => client.
GetResponseAsync
("hello"));
OpenAIResponseClientIntegrationTests.cs (6)
30
var response = await ChatClient.
GetResponseAsync
("Use the code interpreter to calculate the square root of 42. Return only the nearest integer value and no other text.", new()
74
var response = await ChatClient.
GetResponseAsync
(
108
ChatResponse response = await CreateChatClient()!.
GetResponseAsync
("Which tools are available on the wiki_tools MCP server?", chatOptions);
142
await client.
GetResponseAsync
(Prompt, chatOptions);
233
var response = await ChatClient.
GetResponseAsync
("What's the biggest animal?", chatOptions);
266
var response = await chatClient.
GetResponseAsync
("What time is it?", chatOptions);
OpenAIResponseClientTests.cs (17)
152
var response = await client.
GetResponseAsync
("hello", new()
533
var response = await client.
GetResponseAsync
("hello", new()
710
var response = await client.
GetResponseAsync
("hello", chatOptions);
806
var response = await client.
GetResponseAsync
("hello", new()
942
var response = await client.
GetResponseAsync
(
1322
var response = await client.
GetResponseAsync
("Tell me the path to the README.md file for Microsoft.Extensions.AI.Abstractions in the dotnet/extensions repository", chatOptions);
1839
var response = await client.
GetResponseAsync
("hello", new()
1989
await client.
GetResponseAsync
("Please book hotel as well", options);
2348
var response = await client.
GetResponseAsync
("Calculate the sum of numbers from 1 to 5", new()
2605
InvalidOperationException e = await Assert.ThrowsAsync<InvalidOperationException>(() => client.
GetResponseAsync
("hello"));
2657
var response = await client.
GetResponseAsync
("hello", new()
2715
var response = await client.
GetResponseAsync
("hello", new()
2774
var response = await client.
GetResponseAsync
("hello", new()
2835
var response = await client.
GetResponseAsync
("hello", new()
2897
var response = await client.
GetResponseAsync
("hello", new()
2960
var response = await client.
GetResponseAsync
("hello", new()
3345
var response = await client.
GetResponseAsync
("hello", new()
Microsoft.Extensions.AI.Tests (10)
ChatCompletion\DistributedCachingChatClientTest.cs (8)
96
var result1 = await outer.
GetResponseAsync
("some input", options);
101
var result2 = await outer.
GetResponseAsync
("some input", options);
116
await outer.
GetResponseAsync
("some modified input", options);
149
var result1 = outer.
GetResponseAsync
("some input");
150
var result2 = outer.
GetResponseAsync
("some input");
161
var result3 = outer.
GetResponseAsync
("some input");
719
var result1 = await outer.
GetResponseAsync
("some input");
723
var result2 = await outer.
GetResponseAsync
("some input");
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
1007
Assert.Equal("done!", (await service.
GetResponseAsync
("hey", options)).ToString());
1228
await chatClient.
GetResponseAsync
("hi", originalChatOptions);