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)
16Assert.Throws<ArgumentNullException>("message", () => new ChatCompletion((ChatMessage)null!)); 25ChatCompletion completion = new(message); 208ChatCompletion completion = new(new ChatMessage(new ChatRole("customRole"), "Text"))
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
520return new ChatCompletion(new ChatMessage(ChatRole.Assistant, [.. plan[contents.Count].Contents])); 587return YieldAsync(new ChatCompletion(new ChatMessage(ChatRole.Assistant, [.. plan[contents.Count].Contents])).ToStreamingChatCompletionUpdates());
ChatCompletion\UseDelegateChatClientTests.cs (3)
50return Task.FromResult(new ChatCompletion(new ChatMessage(ChatRole.Assistant, "hello"))); 99return Task.FromResult(new ChatCompletion(new ChatMessage(ChatRole.Assistant, "hello"))); 192return Task.FromResult(new ChatCompletion(new ChatMessage(ChatRole.Assistant, "non-streaming hello")));