169 references to TextContent
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (7)
Microsoft.Extensions.AI.Abstractions.Tests (54)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (10)
682new() { Contents = [new TextContent("D") { Annotations = [new()] }] },
683new() { Contents = [new TextContent("E") { Annotations = [new()] }] },
684new() { Contents = [new TextContent("F") { Annotations = [new()] }] },
685new() { Contents = [new TextContent("G") { Annotations = [] }] },
686new() { Contents = [new TextContent("H") { Annotations = [] }] },
687new() { Contents = [new TextContent("I") { Annotations = [new()] }] },
688new() { Contents = [new TextContent("J") { Annotations = [new()] }] },
690new() { Contents = [new TextContent("L") { Annotations = [new()] }] },
693new() { Contents = [new TextContent("O") { Annotations = [new()] }] },
694new() { Contents = [new TextContent("P") { Annotations = [new()] }] },
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.AzureAIInference.Tests (3)
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (6)
Microsoft.Extensions.AI.Evaluation.NLP (2)
Microsoft.Extensions.AI.Evaluation.Quality (4)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
Microsoft.Extensions.AI.Integration.Tests (6)
Microsoft.Extensions.AI.OpenAI (11)
Microsoft.Extensions.AI.OpenAI.Tests (28)
OpenAIConversionTests.cs (12)
442new TextContent("Hi there!"),
511new TextContent("Hi there!"),
562new TextContent("Hello, "),
565new TextContent("World"),
566new TextContent("!"),
570new TextContent("Hi!"),
751new TextContent("I'll call a function."),
787new TextContent("Here's an image and some text."),
856new TextContent("I'll process this complex data."),
1111new TextContent("Processing your request..."),
1353new TextContent("Third message with function call"),
1388new TextContent("I'll call a function"),
Microsoft.Extensions.AI.Tests (36)
ChatCompletion\FunctionInvokingChatClientTests.cs (5)
552new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new FunctionCallContent("callId1", "Func1"), new TextContent("stuff")]),
556new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]),
766updates = [new() { Contents = [new TextContent("OK bye")] }];
930? [new TextContent($"The search results were '{string.Join(", ", frcs.Select(frc => frc.Result))}'")]
Functions\AIFunctionFactoryTest.cs (18)
931AIFunctionFactory.Create(() => (AIContent)new TextContent("text")),
932AIFunctionFactory.Create(async () => (AIContent)new TextContent("text")),
933AIFunctionFactory.Create(async ValueTask<AIContent> () => (AIContent)new TextContent("text")),
934AIFunctionFactory.Create(() => new TextContent("text")),
935AIFunctionFactory.Create(async () => new TextContent("text")),
936AIFunctionFactory.Create(async ValueTask<AIContent> () => new TextContent("text")),
948AIFunctionFactory.Create(() => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
949AIFunctionFactory.Create(async () => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
950AIFunctionFactory.Create(async ValueTask<IEnumerable<AIContent>> () => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
955AIFunctionFactory.Create(() => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
956AIFunctionFactory.Create(async () => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
957AIFunctionFactory.Create(async ValueTask<AIContent[]> () => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
962AIFunctionFactory.Create(() => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
963AIFunctionFactory.Create(async () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
964AIFunctionFactory.Create(async ValueTask<List<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
969AIFunctionFactory.Create(() => (IList<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
970AIFunctionFactory.Create(async () => (IList<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
971AIFunctionFactory.Create(async ValueTask<IList<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
Microsoft.Extensions.DataIngestion (1)