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