118 references to User
Microsoft.Extensions.AI (4)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (3)
68GetResponseAsync<T>(chatClient, new ChatMessage(ChatRole.User, chatMessage), options, useNativeJsonSchema, cancellationToken);
110GetResponseAsync<T>(chatClient, new ChatMessage(ChatRole.User, chatMessage), serializerOptions, options, useNativeJsonSchema, cancellationToken);
212promptAugmentation = new ChatMessage(ChatRole.User, $$"""
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Abstractions.Tests (12)
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.AzureAIInference.Tests (8)
AzureAIInferenceChatClientTests.cs (8)
156[new ChatMessage(ChatRole.User, "hello".Select(c => (AIContent)new TextContent(c.ToString())).ToList())] :
157[new ChatMessage(ChatRole.User, "hello")];
228[new ChatMessage(ChatRole.User, "hello".Select(c => (AIContent)new TextContent(c.ToString())).ToList())] :
229[new ChatMessage(ChatRole.User, "hello")];
536new(ChatRole.User, "hello!"),
538new(ChatRole.User, "i'm good. how are you?"),
615Assert.NotNull(await client.GetResponseAsync([new(ChatRole.User,
681new(ChatRole.User, "hello!"),
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
Microsoft.Extensions.AI.Evaluation.Quality (4)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (5)
Microsoft.Extensions.AI.Integration.Tests (16)
ChatClientIntegrationTests.cs (12)
62new(ChatRole.User, "Pick a city, any city"),
64new(ChatRole.User, "And another one"),
66new(ChatRole.User, "What continent are they each in?"),
80new(ChatRole.User, []),
81new(ChatRole.User, "What is 1 + 2? Reply with a single number."),
94new(ChatRole.User, "Quote, word for word, Neil Armstrong's famous words.")
152List<ChatMessage> history = [new(ChatRole.User, "Explain in 100 words how AI works")];
175new(ChatRole.User,
205new(ChatRole.User, "What is the current secret number?")
343var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
359var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
384var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
Microsoft.Extensions.AI.Ollama.Tests (3)
Microsoft.Extensions.AI.OpenAI (5)
Microsoft.Extensions.AI.OpenAI.Tests (13)
OpenAIChatClientTests.cs (7)
442new(ChatRole.User, "hello!"),
444new(ChatRole.User, "i'm good. how are you?"),
551new(ChatRole.User, "hello!"),
650new(ChatRole.User, "hello!"),
652new(ChatRole.User, "i'm good. how are you?"),
1015new(ChatRole.User, "hello!"),
1028new(ChatRole.User, "Thanks!"),
Microsoft.Extensions.AI.Tests (30)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (11)
44Assert.Equal(ChatRole.User, message.Role);
57var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
120var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
139var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
158var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
196var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
230var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
258var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
292Assert.Equal(ChatRole.User, message.Role);
304var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
332var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
ChatCompletion\FunctionInvokingChatClientTests.cs (11)
56new ChatMessage(ChatRole.User, "hello"),
87new ChatMessage(ChatRole.User, "hello"),
140new ChatMessage(ChatRole.User, "hello"),
184new ChatMessage(ChatRole.User, "hello"),
218new ChatMessage(ChatRole.User, "hello"),
255new ChatMessage(ChatRole.User, "hello"),
277new ChatMessage(ChatRole.User, "hello"),
333new ChatMessage(ChatRole.User, "hello"),
394new(ChatRole.User, "Hello"),
452new(ChatRole.User, "Hello"),
510new ChatMessage(ChatRole.User, "hello"),
Microsoft.ML.GenAI.Core.Tests (1)
Microsoft.ML.GenAI.LLaMA (2)
Microsoft.ML.GenAI.LLaMA.Tests (1)
Microsoft.ML.GenAI.Phi (2)
Microsoft.ML.GenAI.Samples (3)