11 writes to Text
Microsoft.Extensions.AI.Abstractions.Tests (6)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.OpenAI.Tests (2)
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 (1)
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 (29)
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);
189Assert.Equal("Hello", Assert.Single(messages).Text);
208Assert.Equal("Hello", Assert.Single(chatHistory).Text);
242Assert.Equal("Hello", Assert.Single(chatHistory).Text);
270Assert.Equal("Hello", Assert.Single(chatHistory).Text);
288message => Assert.Equal("Hello", message.Text),
292Assert.Contains("Respond with a JSON value", message.Text);
293Assert.Contains("https://json-schema.org/draft/2020-12/schema", message.Text);
294Assert.DoesNotContain(nameof(Animal.FullName), message.Text); // The JSO uses snake_case
295Assert.Contains("full_name", message.Text); // The JSO uses snake_case
296Assert.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)