165 references to TextContent
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (7)
Microsoft.Extensions.AI.Abstractions.Tests (54)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (10)
683new() { Contents = [new TextContent("D") { Annotations = [new()] }] },
684new() { Contents = [new TextContent("E") { Annotations = [new()] }] },
685new() { Contents = [new TextContent("F") { Annotations = [new()] }] },
686new() { Contents = [new TextContent("G") { Annotations = [] }] },
687new() { Contents = [new TextContent("H") { Annotations = [] }] },
688new() { Contents = [new TextContent("I") { Annotations = [new()] }] },
689new() { Contents = [new TextContent("J") { Annotations = [new()] }] },
691new() { Contents = [new TextContent("L") { Annotations = [new()] }] },
694new() { Contents = [new TextContent("O") { Annotations = [new()] }] },
695new() { Contents = [new TextContent("P") { Annotations = [new()] }] },
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)
600new TextContent("Hi there!"),
669new TextContent("Hi there!"),
720new TextContent("Hello, "),
723new TextContent("World"),
724new TextContent("!"),
728new TextContent("Hi!"),
909new TextContent("I'll call a function."),
945new TextContent("Here's an image and some text."),
1014new TextContent("I'll process this complex data."),
1269new TextContent("Processing your request..."),
1511new TextContent("Third message with function call"),
1546new TextContent("I'll call a function"),
Microsoft.Extensions.AI.Tests (36)
ChatCompletion\FunctionInvokingChatClientTests.cs (5)
553new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new FunctionCallContent("callId1", "Func1"), new TextContent("stuff")]),
557new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]),
767updates = [new() { Contents = [new TextContent("OK bye")] }];
931? [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)