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