55 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 (8)
ChatClientIntegrationTests.cs (8)
57
var response = await ChatClient.
GetResponseAsync
("What's the biggest animal?");
122
var response = await ChatClient.
GetResponseAsync
("Explain in 10 words how AI works");
251
var response = await chatClient.
GetResponseAsync
("What is the result of SecretComputation on 42 and 84?", new()
504
var response = await chatClient.
GetResponseAsync
("Briefly, what is the most popular tower in Paris?", options);
573
var response = await chatClient.
GetResponseAsync
("How much older is Elsa than Anna? Return the age difference as a single number.", new()
605
var response = await chatClient.
GetResponseAsync
("Are birds real?", new()
626
var response = await chatClient.
GetResponseAsync
("What's the current secret number?", new()
886
await chatClient.
GetResponseAsync
(
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 (19)
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 (4)
29
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()
45
var response = await ChatClient.
GetResponseAsync
(
79
ChatResponse response = await CreateChatClient()!.
GetResponseAsync
("Which tools are available on the wiki_tools MCP server?", chatOptions);
113
await client.
GetResponseAsync
(Prompt, chatOptions);
OpenAIResponseClientTests.cs (6)
149
var response = await client.
GetResponseAsync
("hello", new()
530
var response = await client.
GetResponseAsync
("hello", new()
707
var response = await client.
GetResponseAsync
("hello", chatOptions);
803
var response = await client.
GetResponseAsync
("hello", new()
1048
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);
1516
InvalidOperationException e = await Assert.ThrowsAsync<InvalidOperationException>(() => client.
GetResponseAsync
("hello"));
Microsoft.Extensions.AI.Tests (9)
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 (1)
1007
Assert.Equal("done!", (await service.
GetResponseAsync
("hey", options)).ToString());