6 references to new
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
585ChatMessage message = new(ChatRole.Tool, contents);
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
98new(default, new List<AIContent>());
Microsoft.Extensions.AI.Abstractions.Tests (3)
ChatCompletion\ChatMessageTests.cs (3)
60Assert.Throws<ArgumentNullException>("contents", () => new ChatMessage(ChatRole.User, (IList<AIContent>)null!)); 75ChatMessage message = new(ChatRole.System, content); 293var chatMessageJson = JsonSerializer.Serialize(new ChatMessage(ChatRole.User, contents: items)
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
254return new ChatMessage(new(message.Role), contents);