107 references to User
Microsoft.Extensions.AI (4)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (3)
70CompleteAsync<T>(chatClient, [new ChatMessage(ChatRole.User, chatMessage)], options, useNativeJsonSchema, cancellationToken);
92CompleteAsync<T>(chatClient, [new ChatMessage(ChatRole.User, chatMessage)], serializerOptions, options, useNativeJsonSchema, cancellationToken);
174promptAugmentation = new ChatMessage(ChatRole.User, $$"""
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.Abstractions.Tests (15)
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.AzureAIInference.Tests (8)
AzureAIInferenceChatClientTests.cs (8)
150[new ChatMessage(ChatRole.User, "hello".Select(c => (AIContent)new TextContent(c.ToString())).ToList())] :
151[new ChatMessage(ChatRole.User, "hello")];
217[new ChatMessage(ChatRole.User, "hello".Select(c => (AIContent)new TextContent(c.ToString())).ToList())] :
218[new ChatMessage(ChatRole.User, "hello")];
507new(ChatRole.User, "hello!"),
509new(ChatRole.User, "i'm good. how are you?"),
586Assert.NotNull(await client.CompleteAsync([new(ChatRole.User,
652new(ChatRole.User, "hello!"),
Microsoft.Extensions.AI.Integration.Tests (13)
ChatClientIntegrationTests.cs (9)
61new(ChatRole.User, "Pick a city, any city"),
63new(ChatRole.User, "And another one"),
65new(ChatRole.User, "What continent are they each in?"),
80new(ChatRole.User, "Quote, word for word, Neil Armstrong's famous words.")
146new(ChatRole.User,
177new(ChatRole.User, "What is the current secret number?")
318var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
335var message = new ChatMessage(ChatRole.User, "Pick a random number, uniformly distributed between 1 and 1000000");
361var 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 (4)
Microsoft.Extensions.AI.OpenAI.Tests (12)
OpenAIChatClientTests.cs (7)
424new(ChatRole.User, "hello!"),
426new(ChatRole.User, "i'm good. how are you?"),
531new(ChatRole.User, "hello!"),
628new(ChatRole.User, "hello!"),
630new(ChatRole.User, "i'm good. how are you?"),
988new(ChatRole.User, "hello!"),
1001new(ChatRole.User, "Thanks!"),
Microsoft.Extensions.AI.Tests (34)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (11)
43Assert.Equal(ChatRole.User, message.Role);
56var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
119var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
138var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
157var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
195var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
229var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
257var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
291Assert.Equal(ChatRole.User, message.Role);
303var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
331var chatHistory = new List<ChatMessage> { new(ChatRole.User, "Hello") };
ChatCompletion\FunctionInvokingChatClientTests.cs (15)
57new ChatMessage(ChatRole.User, "hello"),
88new ChatMessage(ChatRole.User, "hello"),
140new ChatMessage(ChatRole.User, "hello"),
183new ChatMessage(ChatRole.User, "hello"),
219new ChatMessage(ChatRole.User, "hello"),
231new ChatMessage(ChatRole.User, "hello"),
271new ChatMessage(ChatRole.User, "hello"),
286new ChatMessage(ChatRole.User, "hello"),
294new ChatMessage(ChatRole.User, "hello"),
304new ChatMessage(ChatRole.User, "hello"),
337new ChatMessage(ChatRole.User, "hello"),
375List<ChatMessage> chat = [new ChatMessage(ChatRole.User, "hello")];
396new ChatMessage(ChatRole.User, "hello"),
452new ChatMessage(ChatRole.User, "hello"),
514new(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)