28 references to ChatMessage
Microsoft.Extensions.AI.Abstractions.Tests (16)
ChatCompletion\ChatClientExtensionsTests.cs (1)
51
var expectedResponse = new ChatCompletion([new
ChatMessage
()]);
ChatCompletion\ChatCompletionTests.cs (9)
23
ChatMessage message =
new
();
35
new
ChatMessage
(),
36
new
ChatMessage
(),
37
new
ChatMessage
(),
57
ChatMessage message =
new
();
67
ChatMessage first =
new
();
70
new
ChatMessage
(),
120
List<ChatMessage> newChoices = [new
ChatMessage
(), new
ChatMessage
()];
ChatCompletion\ChatMessageTests.cs (6)
17
ChatMessage message =
new
();
109
ChatMessage message =
new
()
193
Assert.IsType<List<AIContent>>(new
ChatMessage
().Contents);
199
ChatMessage message =
new
();
219
ChatMessage message =
new
();
240
ChatMessage message =
new
();
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
96
ChatMessage message =
new
()
Microsoft.Extensions.AI.OpenAI (5)
OpenAIModelMapper.ChatCompletion.cs (1)
76
ChatMessage returnMessage =
new
()
OpenAIModelMapper.ChatMessage.cs (4)
42
yield return new
ChatMessage
51
yield return new
ChatMessage
77
yield return new
ChatMessage
86
ChatMessage message =
new
()
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAISerializationTests.cs (6)
436
ChatMessage message =
new
()
533
ChatMessage message1 =
new
()
539
ChatMessage message2 =
new
()
638
await Assert.ThrowsAsync<ArgumentNullException>(() => OpenAISerializationHelpers.SerializeAsync(null!, new(new
ChatMessage
())));
658
await Assert.ThrowsAsync<TaskCanceledException>(() => OpenAISerializationHelpers.SerializeAsync(stream, new(new
ChatMessage
()), cancellationToken: canceledToken));
679
ChatCompletion completion = new(new
ChatMessage