10 references to ChatCompletion
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureOpenAIClientBuilderChatClientExtensionsTests.cs (1)
221
=> Task.FromResult(new
ChatCompletion
(new ChatMessage(ChatRole.Assistant, "Hello from middleware")));
Aspire.OpenAI.Tests (1)
AspireOpenAIClientBuilderChatClientExtensionsTests.cs (1)
222
=> Task.FromResult(new
ChatCompletion
(new ChatMessage(ChatRole.Assistant, "Hello from middleware")));
Microsoft.Extensions.AI.Abstractions.Tests (3)
ChatCompletion\ChatCompletionTests.cs (3)
16
Assert.Throws<ArgumentNullException>("message", () => new
ChatCompletion
((ChatMessage)null!));
25
ChatCompletion completion =
new
(message);
208
ChatCompletion completion =
new
(new ChatMessage(new ChatRole("customRole"), "Text"))
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
520
return new
ChatCompletion
(new ChatMessage(ChatRole.Assistant, [.. plan[contents.Count].Contents]));
587
return YieldAsync(new
ChatCompletion
(new ChatMessage(ChatRole.Assistant, [.. plan[contents.Count].Contents])).ToStreamingChatCompletionUpdates());
ChatCompletion\UseDelegateChatClientTests.cs (3)
50
return Task.FromResult(new
ChatCompletion
(new ChatMessage(ChatRole.Assistant, "hello")));
99
return Task.FromResult(new
ChatCompletion
(new ChatMessage(ChatRole.Assistant, "hello")));
192
return Task.FromResult(new
ChatCompletion
(new ChatMessage(ChatRole.Assistant, "non-streaming hello")));