216 references to TextContent
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (8)
Microsoft.Extensions.AI.Abstractions.Tests (70)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (10)
767new() { Contents = [new TextContent("D") { Annotations = [new()] }] },
768new() { Contents = [new TextContent("E") { Annotations = [new()] }] },
769new() { Contents = [new TextContent("F") { Annotations = [new()] }] },
770new() { Contents = [new TextContent("G") { Annotations = [] }] },
771new() { Contents = [new TextContent("H") { Annotations = [] }] },
772new() { Contents = [new TextContent("I") { Annotations = [new()] }] },
773new() { Contents = [new TextContent("J") { Annotations = [new()] }] },
775new() { Contents = [new TextContent("L") { Annotations = [new()] }] },
778new() { Contents = [new TextContent("O") { Annotations = [new()] }] },
779new() { 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 (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
Microsoft.Extensions.AI.Integration.Tests (4)
Microsoft.Extensions.AI.OpenAI (15)
Microsoft.Extensions.AI.OpenAI.Tests (30)
OpenAIConversionTests.cs (13)
730new TextContent("Hi there!"),
799new TextContent("Hi there!"),
850new TextContent("Hello, "),
853new TextContent("World"),
854new TextContent("!"),
858new TextContent("Hi!"),
1219new TextContent("I'll call a function."),
1490var mcpToolResult = new McpServerToolResultContent("call_123") { Outputs = isError ? [new ErrorContent("error")] : [new TextContent("sunny")] };
1521new TextContent("Here's an image and some text."),
1590new TextContent("I'll process this complex data."),
1845new TextContent("Processing your request..."),
2086new TextContent("Third message with function call"),
2121new TextContent("I'll call a function"),
Microsoft.Extensions.AI.Stabilization.Tests (8)
Microsoft.Extensions.AI.Tests (56)
ChatCompletion\FunctionInvokingChatClientTests.cs (5)
984new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new FunctionCallContent("callId1", "Func1"), new TextContent("stuff")]),
988new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]),
1198updates = [new() { Contents = [new TextContent("OK bye")] }];
1362? [new TextContent($"The search results were '{string.Join(", ", frcs.Select(frc => frc.Result))}'")]
Functions\AIFunctionFactoryTest.cs (18)
1162AIFunctionFactory.Create(() => (AIContent)new TextContent("text")),
1163AIFunctionFactory.Create(async () => (AIContent)new TextContent("text")),
1164AIFunctionFactory.Create(async ValueTask<AIContent> () => (AIContent)new TextContent("text")),
1165AIFunctionFactory.Create(() => new TextContent("text")),
1166AIFunctionFactory.Create(async () => new TextContent("text")),
1167AIFunctionFactory.Create(async ValueTask<AIContent> () => new TextContent("text")),
1179AIFunctionFactory.Create(() => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1180AIFunctionFactory.Create(async () => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1181AIFunctionFactory.Create(async ValueTask<IEnumerable<AIContent>> () => (IEnumerable<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1186AIFunctionFactory.Create(() => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1187AIFunctionFactory.Create(async () => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1188AIFunctionFactory.Create(async ValueTask<AIContent[]> () => (AIContent[])[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1193AIFunctionFactory.Create(() => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1194AIFunctionFactory.Create(async () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1195AIFunctionFactory.Create(async ValueTask<List<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1200AIFunctionFactory.Create(() => (IList<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1201AIFunctionFactory.Create(async () => (IList<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1202AIFunctionFactory.Create(async ValueTask<IList<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
Microsoft.Extensions.DataIngestion (1)