9 writes to Text
Microsoft.Extensions.AI.Abstractions.Tests (6)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Tests (2)
65 references to Text
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.OpenAI.Tests (1)
Microsoft.Extensions.AI.Abstractions.Tests (18)
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
Microsoft.Extensions.AI.Integration.Tests (4)
Microsoft.Extensions.AI.Ollama.Tests (1)
Microsoft.Extensions.AI.OpenAI.Tests (4)
Microsoft.Extensions.AI.Tests (28)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (16)
40message => Assert.Equal("Hello", message.Text),
44Assert.Contains("Respond with a JSON value", message.Text);
45Assert.Contains("https://json-schema.org/draft/2020-12/schema", message.Text);
48Assert.Contains(v.ToString(), message.Text); // All enum values are described as strings
74Assert.Equal("Hello", Assert.Single(chatHistory).Text);
87var suppliedSchemaMatch = Regex.Match(messages[1].Text!, "```(.*?)```", RegexOptions.Singleline);
187Assert.Equal("Hello", Assert.Single(messages).Text);
206Assert.Equal("Hello", Assert.Single(chatHistory).Text);
240Assert.Equal("Hello", Assert.Single(chatHistory).Text);
268Assert.Equal("Hello", Assert.Single(chatHistory).Text);
286message => Assert.Equal("Hello", message.Text),
290Assert.Contains("Respond with a JSON value", message.Text);
291Assert.Contains("https://json-schema.org/draft/2020-12/schema", message.Text);
292Assert.DoesNotContain(nameof(Animal.FullName), message.Text); // The JSO uses snake_case
293Assert.Contains("full_name", message.Text); // The JSO uses snake_case
294Assert.DoesNotContain(nameof(Species.Tiger), message.Text); // The JSO doesn't use enum-to-string conversion
Microsoft.ML.GenAI.LLaMA (2)
Microsoft.ML.GenAI.Phi (2)