149 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 (11)
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 (25)
ChatClientIntegrationTests.cs (21)
69new(ChatRole.User, "Pick a city, any city"),
71new(ChatRole.User, "And another one"),
73new(ChatRole.User, "What continent are they each in?"),
88new(ChatRole.User, []),
90new(ChatRole.User, "What is 1 + 2? Reply with a single number."),
103new(ChatRole.User, "Quote, word for word, Neil Armstrong's famous words.")
161List<ChatMessage> history = [new(ChatRole.User, "Explain in 100 words how AI works")];
184new(ChatRole.User,
202new(ChatRole.User,
232new(ChatRole.User, "What is the current secret number?")
299new(ChatRole.User, "What is the secret number for id foo?")
331new(ChatRole.User, "What is the secret number for John aged 19?")
361new(ChatRole.User, "Can you add bacon, lettuce, and tomatoes to Peter's shopping cart?")
640var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
656var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
681var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
733var message = new ChatMessage(ChatRole.User, "What is the temperature?");
772var message = new ChatMessage(ChatRole.User, "What is the temperature?");
814var message = new ChatMessage(ChatRole.User, "What is the temperature?");
842await chatClient.GetResponseAsync([new(ChatRole.User, "What's the biggest animal?")]);
941var response = await chatClient.GetResponseAsync([new(ChatRole.User, "What's the biggest animal?")]);
Microsoft.Extensions.AI.OpenAI (5)
Microsoft.Extensions.AI.OpenAI.Tests (11)
OpenAIChatClientTests.cs (8)
805new(ChatRole.User, "hello!"),
807new(ChatRole.User, "i'm good. how are you?"),
912new(ChatRole.User, "hello!"),
1008new(ChatRole.User, "hello!"),
1010new(ChatRole.User, "i'm good. how are you?"),
1450new(ChatRole.User, "hello!"),
1463new(ChatRole.User, "Thanks!"),
1569new(ChatRole.User,
Microsoft.Extensions.AI.Tests (36)
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 (18)
87new ChatMessage(ChatRole.User, "hello"),
118new ChatMessage(ChatRole.User, "hello"),
178new ChatMessage(ChatRole.User, "hello"),
222new ChatMessage(ChatRole.User, "hello"),
256new ChatMessage(ChatRole.User, "hello"),
305new ChatMessage(ChatRole.User, "hello"),
354new ChatMessage(ChatRole.User, "hello"),
432new ChatMessage(ChatRole.User, "hello"),
479new ChatMessage(ChatRole.User, "hello"),
516new ChatMessage(ChatRole.User, "hello"),
538new ChatMessage(ChatRole.User, "hello"),
594new ChatMessage(ChatRole.User, "hello"),
655new(ChatRole.User, "Hello"),
713new(ChatRole.User, "Hello"),
771new ChatMessage(ChatRole.User, "hello"),
855List<ChatMessage> messages = [new(ChatRole.User, "hello")];
927new ChatMessage(ChatRole.User, "hello"),
956new 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)