144 references to User
Microsoft.Extensions.AI (4)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (3)
74GetResponseAsync<T>(chatClient, new ChatMessage(ChatRole.User, chatMessage), options, useJsonSchemaResponseFormat, cancellationToken);
114GetResponseAsync<T>(chatClient, new ChatMessage(ChatRole.User, chatMessage), serializerOptions, options, useJsonSchemaResponseFormat, cancellationToken);
213promptAugmentation = 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)
145[new ChatMessage(ChatRole.User, "hello".Select(c => (AIContent)new TextContent(c.ToString())).ToList())] :
146[new ChatMessage(ChatRole.User, "hello")];
218[new ChatMessage(ChatRole.User, "hello".Select(c => (AIContent)new TextContent(c.ToString())).ToList())] :
219[new ChatMessage(ChatRole.User, "hello")];
987new(ChatRole.User, "hello!"),
989new(ChatRole.User, "i'm good. how are you?"),
1067Assert.NotNull(await client.GetResponseAsync([new(ChatRole.User,
1133new(ChatRole.User, "hello!"),
Microsoft.Extensions.AI.Evaluation (7)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (4)
Microsoft.Extensions.AI.Evaluation.Quality (9)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (5)
Microsoft.Extensions.AI.Evaluation.Safety (4)
Microsoft.Extensions.AI.Evaluation.Tests (1)
Microsoft.Extensions.AI.Integration.Tests (24)
ChatClientIntegrationTests.cs (20)
62new(ChatRole.User, "Pick a city, any city"),
64new(ChatRole.User, "And another one"),
66new(ChatRole.User, "What continent are they each in?"),
81new(ChatRole.User, []),
83new(ChatRole.User, "What is 1 + 2? Reply with a single number."),
96new(ChatRole.User, "Quote, word for word, Neil Armstrong's famous words.")
154List<ChatMessage> history = [new(ChatRole.User, "Explain in 100 words how AI works")];
177new(ChatRole.User,
195new(ChatRole.User,
225new(ChatRole.User, "What is the current secret number?")
292new(ChatRole.User, "What is the secret number for id foo?")
324new(ChatRole.User, "What is the secret number for John aged 19?")
479var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
495var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
520var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
572var message = new ChatMessage(ChatRole.User, "What is the temperature?");
611var message = new ChatMessage(ChatRole.User, "What is the temperature?");
653var message = new ChatMessage(ChatRole.User, "What is the temperature?");
681await chatClient.GetResponseAsync([new(ChatRole.User, "What's the biggest animal?")]);
780var response = await chatClient.GetResponseAsync([new(ChatRole.User, "What's the biggest animal?")]);
Microsoft.Extensions.AI.Ollama.Tests (3)
Microsoft.Extensions.AI.OpenAI (4)
Microsoft.Extensions.AI.OpenAI.Tests (8)
OpenAIChatClientTests.cs (8)
764new(ChatRole.User, "hello!"),
766new(ChatRole.User, "i'm good. how are you?"),
871new(ChatRole.User, "hello!"),
967new(ChatRole.User, "hello!"),
969new(ChatRole.User, "i'm good. how are you?"),
1409new(ChatRole.User, "hello!"),
1422new(ChatRole.User, "Thanks!"),
1528new(ChatRole.User,
Microsoft.Extensions.AI.Tests (35)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (10)
81var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
129Assert.Equal(ChatRole.User, message.Role);
142var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
207var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
226var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
245var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
273var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
301var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
369var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
397var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
ChatCompletion\FunctionInvokingChatClientTests.cs (17)
57new ChatMessage(ChatRole.User, "hello"),
88new ChatMessage(ChatRole.User, "hello"),
148new ChatMessage(ChatRole.User, "hello"),
192new ChatMessage(ChatRole.User, "hello"),
232new ChatMessage(ChatRole.User, "hello"),
281new ChatMessage(ChatRole.User, "hello"),
359new ChatMessage(ChatRole.User, "hello"),
406new ChatMessage(ChatRole.User, "hello"),
443new ChatMessage(ChatRole.User, "hello"),
465new ChatMessage(ChatRole.User, "hello"),
521new ChatMessage(ChatRole.User, "hello"),
582new(ChatRole.User, "Hello"),
640new(ChatRole.User, "Hello"),
698new ChatMessage(ChatRole.User, "hello"),
782List<ChatMessage> messages = [new(ChatRole.User, "hello")];
854new ChatMessage(ChatRole.User, "hello"),
883new 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)