27 references to System
Microsoft.Extensions.AI (2)
ChatCompletion\OpenTelemetryChatClient.cs (2)
435Log(new(1, message.Role == ChatRole.System ? OpenTelemetryConsts.GenAI.System.Message : OpenTelemetryConsts.GenAI.User.Message), 438Role = message.Role != ChatRole.System && message.Role != ChatRole.User && !string.IsNullOrWhiteSpace(message.Role.Value) ? message.Role.Value : null,
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatCompletion\ChatCompletionTests.cs (1)
249new ChatMessage(ChatRole.System,
ChatCompletion\ChatMessageTests.cs (2)
75ChatMessage message = new(ChatRole.System, content); 77Assert.Equal(ChatRole.System, message.Role);
ChatCompletion\ChatRoleTests.cs (1)
49Assert.Equal("system", ChatRole.System.Value);
ChatCompletion\StreamingChatCompletionUpdateExtensionsTests.cs (2)
45new() { ChoiceIndex = 1, Text = ", ", AuthorName = "Else", Role = ChatRole.System, AdditionalProperties = new() { ["g"] = "h" } }, 80Assert.Equal(ChatRole.System, message.Role);
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
272role.Equals(global::Azure.AI.Inference.ChatRole.System) ? ChatRole.System : 415if (input.Role == ChatRole.System)
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
309new(ChatRole.System, "You are a really nice friend."),
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
157existingToolPrompt = new ChatMessage(ChatRole.System, (string?)null);
Microsoft.Extensions.AI.OpenAI (3)
OpenAIChatClient.cs (3)
377ChatMessageRole.System => ChatRole.System, 584if (input.Role == ChatRole.System || input.Role == ChatRole.User) 587yield return input.Role == ChatRole.System ?
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIChatClientTests.cs (4)
355new(ChatRole.System, "You are a really nice friend."), 456new(ChatRole.System, [new TextContent("You are a really nice friend."), new TextContent("Really nice.")]), 547new(ChatRole.System, "You are a really nice friend."), 887new(ChatRole.System, "You are a really nice friend."),
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
100new(ChatRole.System, "You are a close friend."),
Microsoft.ML.GenAI.Core.Tests (1)
CasualLMDatasetTest.cs (1)
86new ChatMessage(ChatRole.System, "You are a helpful contoso assistant"),
Microsoft.ML.GenAI.LLaMA (2)
Llama3_1ChatTemplateBuilder.cs (2)
93var availableRoles = new[] { ChatRole.System, ChatRole.User, ChatRole.Assistant }; 112_ when message.Role == ChatRole.System => $"<|start_header_id|>system<|end_header_id|>{Newline}{content.Trim()}<|eot_id|>{Newline}",
Microsoft.ML.GenAI.LLaMA.Tests (1)
LLaMA3_1Tests.cs (1)
134new ChatMessage(ChatRole.System, "You are a helpful AI assistant."),
Microsoft.ML.GenAI.Phi (2)
Phi3\Phi3ChatTemplateBuilder.cs (2)
94var availableRoles = new[] { ChatRole.System, ChatRole.User, ChatRole.Assistant }; 115_ when message.Role == ChatRole.System => $"<|system|>{Newline}{content}<|end|>{Newline}",
Microsoft.ML.GenAI.Samples (1)
Llama\SFT_Llama_3_2_1B.cs (1)
107new ChatMessage(ChatRole.System, "You are a helpful contoso assistant"),