98 instantiations of DataContent
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\ChatResponseExtensions.cs (1)
247return new DataContent(new ReadOnlyMemory<byte>(ms.GetBuffer(), 0, (int)ms.Length), first.MediaType) { Name = first.Name };
Image\ImageGeneratorExtensions.cs (1)
195var dataContent = new DataContent(originalImageData, mediaType) { Name = fileName };
Microsoft.Extensions.AI.Abstractions.Tests (49)
ChatCompletion\ChatMessageTests.cs (4)
146new DataContent("data:text/image;base64,aGVsbG8="), 147new DataContent("data:text/plain;base64,aGVsbG8="), 259new DataContent(new Uri("data:text/plain;base64,aGVsbG8="), "mime-type/2") 263new DataContent(new BinaryData(new[] { 1, 2, 3 }, options: TestJsonSerializerContext.Default.Options), "mime-type/3")
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (1)
576updates.Add(new() { Contents = [new DataContent("data:image/png;base64,aGVsbG8=")] });
ChatCompletion\ChatResponseUpdateTests.cs (4)
92new DataContent("data:image/audio;base64,aGVsbG8="), 93new DataContent("data:image/image;base64,aGVsbG8="), 122new DataContent("data:image/png;base64,aGVsbG8="), 124new DataContent("data"u8.ToArray(), "text/plain"),
Contents\AIContentTests.cs (1)
65new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream"),
Contents\CodeInterpreterToolCallContentTests.cs (1)
57new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")
Contents\CodeInterpreterToolResultContentTests.cs (1)
57new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream"),
Contents\DataContentTests.cs (19)
46Assert.Throws(exception, () => new DataContent(path)); 58Assert.Throws<ArgumentException>("mediaType", () => new DataContent("data:image/png;base64,aGVsbG8=", type)); 68var content = new DataContent("data:image/png;base64,aGVsbG8=", mediaType); 72content = new DataContent("data:,", mediaType); 76content = new DataContent("data:text/plain,", mediaType); 80content = new DataContent(new Uri("data:text/plain,"), mediaType); 84content = new DataContent(new byte[] { 0, 1, 2 }, mediaType); 88content = new DataContent(content.Uri); 98content = new DataContent("data:image/png;base64,aGVsbG8="); 103content = new DataContent(new Uri("data:image/png;base64,aGVsbG8=")); 115new DataContent(uri: "data:application/octet-stream;base64,AQIDBA=="), 121new DataContent(new ReadOnlyMemory<byte>([0x01, 0x02, 0x03, 0x04]), "application/octet-stream"), 127new DataContent(new ReadOnlyMemory<byte>([0x01, 0x02, 0x03, 0x04]), "application/octet-stream") { Name = "test.bin" }, 216DataContent c = new("data:,", mediaType); 229var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType); 242var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType); 255var content = new DataContent(data, "application/octet-stream"); 265var content = new DataContent("data:text/plain,hello world"); 274DataContent content = new(new byte[] { 1, 2, 3 }, "application/octet-stream");
Image\ImageGenerationResponseTests.cs (3)
74new DataContent(imageData, "image/jpeg") 100new DataContent((byte[])[1, 2, 3, 4], "image/jpeg") 138new DataContent((byte[])[255, 216, 255, 224], "image/jpeg"),
Image\ImageGeneratorExtensionsTests.cs (3)
64var dataContent = new DataContent(imageData, "image/png") { Name = "test.png" }; 92var dataContent = new DataContent(new byte[] { 1, 2, 3 }, "image/png"); 202var dataContent = new DataContent(imageData, "image/png");
Image\ImageGeneratorTests.cs (1)
139AIContent[] originalImages = [new DataContent((byte[])[1, 2, 3, 4], "image/png")];
SpeechToText\SpeechToTextClientExtensionsTests.cs (3)
28var content = new DataContent("data:audio/wav;base64,AQIDBA=="); 42var content = new DataContent("data:audio/wav;base64,AQIDBA=="); 73new DataContent("data:audio/wav;base64,AQIDBA=="),
SpeechToText\SpeechToTextClientTests.cs (2)
34new DataContent("data:audio/wav;base64,AQIDBA=="), 62new DataContent("data:audio/wav;base64,AQIDBA=="),
SpeechToText\SpeechToTextResponseTests.cs (1)
211new DataContent("data:image/png;base64,AQIDBA==", mediaType: "image/png"),
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (1)
117updates.Add(new() { Contents = [new DataContent("data:image/png;base64,aGVsbG8=")] });
SpeechToText\SpeechToTextResponseUpdateTests.cs (3)
62new DataContent("data:audio/wav;base64,AQIDBA==", "application/octet-stream"), 63new DataContent("data:image/wav;base64,AQIDBA==", "application/octet-stream"), 94new DataContent("data:audio/wav;base64,AQIDBA==", "application/octet-stream")
Tools\HostedCodeInterpreterToolTests.cs (1)
29new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceImageEmbeddingGeneratorTests.cs (2)
72DataContent dotnetPng = new(ImageDataUri.GetImageDataUri()); 132DataContent dotnetPng = new(ImageDataUri.GetImageDataUri());
Microsoft.Extensions.AI.Evaluation.Integration.Tests (2)
SafetyEvaluatorTests.cs (2)
379new DataContent(ImageDataUri.GetImageDataUri())], 413new DataContent(ImageDataUri.GetImageDataUri())],
Microsoft.Extensions.AI.Integration.Tests (4)
ChatClientIntegrationTests.cs (2)
196new DataContent(ImageDataUri.GetImageDataUri(), "image/png"), 214new DataContent(ImageDataUri.GetPdfDataUri(), "application/pdf") { Name = "sample.pdf" },
ImageGeneratorIntegrationTests.cs (1)
96AIContent[] originalImages = [new DataContent(imageData, "image/png") { Name = "dotnet.png" }];
ToolReductionTests.cs (1)
311new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream"),
Microsoft.Extensions.AI.OpenAI (8)
OpenAIAssistantsChatClient.cs (1)
205Inputs = [new DataContent(Encoding.UTF8.GetBytes(details.CodeInterpreterInput), "text/x-python")],
OpenAIChatClient.cs (4)
368responseUpdate.Contents.Add(new DataContent(audioUpdate.AudioBytesUpdate.ToMemory(), GetOutputAudioMimeType(options)) 486returnMessage.Contents.Add(new DataContent(audio.AudioBytes.ToMemory(), GetOutputAudioMimeType(chatCompletionOptions)) 713contentPart.ImageBytes is not null ? new DataContent(contentPart.ImageBytes.ToMemory(), contentPart.ImageBytesMediaType) : 726contentPart.FileBytes is not null ? new DataContent(contentPart.FileBytes.ToMemory(), contentPart.FileBytesMediaType) { Name = contentPart.Filename } :
OpenAIImageGenerator.cs (1)
151contents.Add(new DataContent(image.ImageBytes.ToMemory(), contentType));
OpenAIResponsesChatClient.cs (2)
1100results.Add(new DataContent(part.InputFileBytes, part.InputFileBytesMediaType ?? "application/octet-stream") 1202Inputs = !string.IsNullOrWhiteSpace(cicri.Code) ? [new DataContent(Encoding.UTF8.GetBytes(cicri.Code), "text/x-python")] : null,
Microsoft.Extensions.AI.OpenAI.Tests (9)
OpenAIChatClientTests.cs (1)
1587new DataContent(ImageDataUri.GetImageDataUri(), "image/png")
OpenAIConversionTests.cs (1)
789new DataContent(new byte[] { 1, 2, 3, 4 }, "application/octet-stream")
OpenAIResponseClientIntegrationTests.cs (3)
484Tools = [AIFunctionFactory.Create(() => new DataContent(ImageDataUri.GetImageDataUri(), "image/png"), "GetDotnetLogo", "Returns the .NET logo image")] 509Tools = [AIFunctionFactory.Create(() => new DataContent(ImageDataUri.GetPdfDataUri(), "application/pdf") { Name = "document.pdf" }, "GetDocument", "Returns a PDF document")] 535new DataContent(imageBytes, "image/png"),
OpenAIResponseClientTests.cs (4)
3655new FunctionResultContent("call_789", new DataContent(imageData, "image/png")) 3891new FunctionResultContent("call_pdf", new DataContent(pdfData, "application/pdf") { Name = "report.pdf" }) 4281new DataContent(imageData, "image/png"), 4282new DataContent(pdfData, "application/pdf") { Name = "doc.pdf" },
Microsoft.Extensions.AI.Tests (20)
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
359new DataContent(Convert.FromBase64String("aGVsbG8gd29ybGQ="), "image/png"), 375yield return new() { Contents = [new DataContent(Convert.FromBase64String("aGVsbG8gd29ybGQ="), "image/png")] }; 395new DataContent(Convert.FromBase64String("ZGF0YSBjb250ZW50"), "audio/mp3"),
Functions\AIFunctionFactoryTest.cs (15)
941AIFunctionFactory.Create(() => new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")), 942AIFunctionFactory.Create(async () => new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")), 943AIFunctionFactory.Create(async ValueTask<DataContent> () => new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")), 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")]),
Image\LoggingImageGeneratorTests.cs (1)
116AIContent[] originalImages = [new DataContent((byte[])[1, 2, 3, 4], "image/png")];
Image\OpenTelemetryImageGeneratorTests.cs (1)
46new DataContent(new byte[] { 1, 2, 3, 4 }, "image/png") { Name = "moreOutput.png" },
Microsoft.Extensions.DataIngestion (1)
Processors\ImageAlternativeTextEnricher.cs (1)
93contents.Add(new DataContent(image.Content!.Value, image.MediaType!));
Microsoft.Extensions.DataIngestion.Tests (1)
IngestionPipelineTests.cs (1)
182content: new(image.Content.GetValueOrDefault(), image.MediaType!),
127 references to DataContent
Microsoft.Extensions.AI (2)
ChatCompletion\OpenTelemetryChatClient.cs (1)
278case DataContent dc:
Image\LoggingImageGenerator.cs (1)
80if (_logger.IsEnabled(LogLevel.Trace) && response.Contents.All(c => c is not DataContent))
Microsoft.Extensions.AI.Abstractions (24)
ChatCompletion\ChatResponseExtensions.cs (5)
222Coalesce<DataContent>( 233var current = (DataContent)contents[i]; 246var first = (DataContent)contents[start];
Contents\AIContent.cs (1)
11[JsonDerivedType(typeof(DataContent), typeDiscriminator: "data")]
Contents\CodeInterpreterToolCallContent.cs (2)
36/// <see cref="DataContent"/> for binary data, or other <see cref="AIContent"/> types as supported 37/// by the service. Typically <see cref="Inputs"/> includes a <see cref="DataContent"/> with a "text/x-python"
Contents\CodeInterpreterToolResultContent.cs (1)
32/// <see cref="DataContent"/> for binary data, <see cref="TextContent"/> for standard output text,
Contents\DataContent.cs (4)
53/// Initializes a new instance of the <see cref="DataContent"/> class. 70/// Initializes a new instance of the <see cref="DataContent"/> class. 113/// Initializes a new instance of the <see cref="DataContent"/> class. 140/// <summary>Gets the data URI for this <see cref="DataContent"/>.</summary>
Contents\HostedFileContent.cs (1)
14/// Unlike <see cref="DataContent"/> which contains the data for a file or blob, this class represents a file that is hosted
Contents\UriContent.cs (1)
16/// For data URIs, use <see cref="DataContent"/> instead.
Image\ImageGenerationResponse.cs (1)
40/// Content is typically <see cref="DataContent"/> for images streamed from the generator, or <see cref="UriContent"/> for remotely hosted images, but
Image\ImageGeneratorExtensions.cs (2)
155DataContent originalImage, 195var dataContent = new DataContent(originalImageData, mediaType) { Name = fileName };
SpeechToText\SpeechToTextClientExtensions.cs (4)
34/// <summary>Generates text from speech providing a single audio speech <see cref="DataContent"/>.</summary> 42DataContent audioSpeechContent, 56/// <summary>Generates text from speech providing a single audio speech <see cref="DataContent"/>.</summary> 64DataContent audioSpeechContent,
Tools\HostedCodeInterpreterTool.cs (1)
26/// represented via <see cref="HostedFileContent"/>. Some also support binary data, represented via <see cref="DataContent"/>.
Tools\HostedFileSearchTool.cs (1)
27/// others might support binary data uploaded as part of the request in <see cref="DataContent"/>, and others might support
Microsoft.Extensions.AI.Abstractions.Tests (42)
ChatCompletion\ChatMessageTests.cs (3)
303var dataContent = deserializedMessage.Contents[1] as DataContent; 311dataContent = deserializedMessage.Contents[2] as DataContent;
ChatCompletion\ChatResponseFormatTests.cs (2)
121ChatResponseFormat.ForJsonSchema<DataContent>() : 122ChatResponseFormat.ForJsonSchema(typeof(DataContent));
ChatCompletion\ChatResponseUpdateTests.cs (4)
145Assert.IsType<DataContent>(result.Contents[1]); 146Assert.Equal("data:image/png;base64,aGVsbG8=", ((DataContent)result.Contents[1]).Uri); 151Assert.IsType<DataContent>(result.Contents[3]); 152Assert.Equal("data"u8.ToArray(), ((DataContent)result.Contents[3]).Data.ToArray());
Contents\CodeInterpreterToolCallContentTests.cs (1)
65Assert.IsType<DataContent>(c.Inputs[2]);
Contents\CodeInterpreterToolResultContentTests.cs (1)
66Assert.IsType<DataContent>(c.Outputs[2]);
Contents\DataContentTests.cs (15)
68var content = new DataContent("data:image/png;base64,aGVsbG8=", mediaType); 96DataContent content; 136Assert.Throws<ArgumentNullException>("uri", () => JsonSerializer.Deserialize<DataContent>(json, TestJsonSerializerContext.Default.Options)!); 143var content = JsonSerializer.Deserialize<DataContent>("""{"uri":"data:application/octet-stream;base64,AQIDBA=="}""", TestJsonSerializerContext.Default.Options)!; 151content = JsonSerializer.Deserialize<DataContent>("""{"uri":"data:application/octet-stream;base64,AQIDBA=="}""", TestJsonSerializerContext.Default.Options)!; 157content = JsonSerializer.Deserialize<DataContent>(""" 184var content = JsonSerializer.Deserialize<DataContent>(serialized, TestJsonSerializerContext.Default.Options)!; 216DataContent c = new("data:,", mediaType); 229var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType); 242var content = new DataContent("data:application/octet-stream;base64,AQIDBA==", mediaType); 255var content = new DataContent(data, "application/octet-stream"); 265var content = new DataContent("data:text/plain,hello world"); 274DataContent content = new(new byte[] { 1, 2, 3 }, "application/octet-stream");
Image\ImageGenerationResponseTests.cs (3)
116DataContent dataContent = Assert.IsType<DataContent>(deserialized.Contents[1]); 151Assert.IsType<DataContent>(deserialized.Contents[1]);
Image\ImageGeneratorExtensionsTests.cs (7)
64var dataContent = new DataContent(imageData, "image/png") { Name = "test.png" }; 92var dataContent = new DataContent(new byte[] { 1, 2, 3 }, "image/png"); 120var dataContent = Assert.IsType<DataContent>(Assert.Single(request.OriginalImages)); 187var dataContent = Assert.IsType<DataContent>(Assert.Single(request.OriginalImages)); 202var dataContent = new DataContent(imageData, "image/png");
SpeechToText\SpeechToTextClientExtensionsTests.cs (4)
28var content = new DataContent("data:audio/wav;base64,AQIDBA=="); 33DataContent? nullContent = null; 42var content = new DataContent("data:audio/wav;base64,AQIDBA=="); 47DataContent? nullContent = null;
SpeechToText\SpeechToTextResponseTests.cs (1)
237Assert.Equal("image/png", Assert.IsType<DataContent>(update.Contents[1]).MediaType);
Tools\HostedCodeInterpreterToolTests.cs (1)
36Assert.IsType<DataContent>(tool.Inputs[1]);
Microsoft.Extensions.AI.AzureAIInference (6)
AzureAIInferenceChatClient.cs (2)
517case DataContent dataContent when dataContent.HasTopLevelMediaType("image"): 525case DataContent dataContent when dataContent.HasTopLevelMediaType("audio"):
AzureAIInferenceExtensions.cs (1)
33public static IEmbeddingGenerator<DataContent, Embedding<float>> AsIEmbeddingGenerator(
AzureAIInferenceImageEmbeddingGenerator.cs (3)
20IEmbeddingGenerator<DataContent, Embedding<float>> 84IEnumerable<DataContent> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) 118private ImageEmbeddingsOptions ToAzureAIOptions(IEnumerable<DataContent> inputs, EmbeddingGenerationOptions? options)
Microsoft.Extensions.AI.AzureAIInference.Tests (12)
AzureAIInferenceImageEmbeddingGeneratorTests.cs (12)
39IEmbeddingGenerator<DataContent, Embedding<float>> embeddingGenerator = client.AsIEmbeddingGenerator(model); 52Assert.Same(embeddingGenerator, embeddingGenerator.GetService<IEmbeddingGenerator<DataContent, Embedding<float>>>()); 55using IEmbeddingGenerator<DataContent, Embedding<float>> pipeline = embeddingGenerator 61Assert.NotNull(pipeline.GetService<DistributedCachingEmbeddingGenerator<DataContent, Embedding<float>>>()); 62Assert.NotNull(pipeline.GetService<CachingEmbeddingGenerator<DataContent, Embedding<float>>>()); 63Assert.NotNull(pipeline.GetService<OpenTelemetryEmbeddingGenerator<DataContent, Embedding<float>>>()); 66Assert.IsType<OpenTelemetryEmbeddingGenerator<DataContent, Embedding<float>>>(pipeline.GetService<IEmbeddingGenerator<DataContent, Embedding<float>>>()); 72DataContent dotnetPng = new(ImageDataUri.GetImageDataUri()); 106using IEmbeddingGenerator<DataContent, Embedding<float>> generator = new ImageEmbeddingsClient( 132DataContent dotnetPng = new(ImageDataUri.GetImageDataUri()); 167using IEmbeddingGenerator<DataContent, Embedding<float>> generator = new ImageEmbeddingsClient(
Microsoft.Extensions.AI.Evaluation (1)
EvaluationContext.cs (1)
59/// <see cref="TextContent"/> objects for text, <see cref="DataContent"/> or <see cref="UriContent"/> objects for
Microsoft.Extensions.AI.Evaluation.Safety (4)
AIContentExtensions.cs (1)
15(content is DataContent dataContent && IsSupportedImageFormat(dataContent.MediaType));
ContentSafetyServicePayloadUtilities.cs (3)
340else if (content is DataContent dataContent && dataContent.HasTopLevelMediaType("image")) 515$"The current evaluation being performed by {evaluatorName} only supports content of type '{nameof(TextContent)}', '{nameof(UriContent)}' and '{nameof(DataContent)}'. " + 516$"For '{nameof(UriContent)}' and '{nameof(DataContent)}', only content with media type 'image/png', 'image/jpeg' and 'image/gif' are supported. " +
Microsoft.Extensions.AI.Integration.Tests (7)
ImageGeneratorIntegrationTests.cs (7)
54case DataContent dc: 83Assert.IsType<DataContent>(content); 84var dataContent = (DataContent)content; 110Assert.IsType<DataContent>(content); 111var dataContent = (DataContent)content;
Microsoft.Extensions.AI.OpenAI (9)
MicrosoftExtensionsAIChatExtensions.cs (1)
82outputAudio: lastMessage?.Contents.OfType<DataContent>().Where(dc => dc.HasTopLevelMediaType("audio")).Select(a => OpenAIChatModelFactory.ChatOutputAudio(new(a.Data))).FirstOrDefault(),
OpenAIChatClient.cs (3)
284case DataContent dataContent when dataContent.HasTopLevelMediaType("image"): 287case DataContent dataContent when dataContent.HasTopLevelMediaType("audio"): 300case DataContent dataContent when dataContent.MediaType.StartsWith("application/pdf", StringComparison.OrdinalIgnoreCase):
OpenAIImageGenerator.cs (1)
70if (originalImage is DataContent dataContent)
OpenAIResponsesChatClient.cs (4)
803case DataContent dataContent when dataContent.HasTopLevelMediaType("image"): 807case DataContent dataContent when dataContent.MediaType.StartsWith("application/pdf", StringComparison.OrdinalIgnoreCase): 867case DataContent dc when dc.HasTopLevelMediaType("image"): 875case DataContent dc:
Microsoft.Extensions.AI.OpenAI.Tests (7)
OpenAIAssistantChatClientIntegrationTests.cs (1)
75if (toolCallContent.Inputs.OfType<DataContent>().FirstOrDefault() is { } codeInput)
OpenAIResponseClientIntegrationTests.cs (2)
48var codeInput = toolCallContent.Inputs.OfType<DataContent>().FirstOrDefault();
OpenAIResponseClientTests.cs (4)
2362var codeInput = Assert.IsType<DataContent>(Assert.Single(codeCall.Inputs)); 2582var codeInput = Assert.IsType<DataContent>(Assert.Single(codeCall.Inputs));
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (2)
939await ValidateAsync<DataContent>( 943AIFunctionFactory.Create(async ValueTask<DataContent> () => new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")),
Microsoft.Extensions.DataIngestion.Tests (11)
IngestionPipelineTests.cs (7)
152TestEmbeddingGenerator<DataContent> embeddingGenerator = new(); 154using VectorStoreWriter<DataContent> vectorStoreWriter = new(testVectorStore, dimensionCount: TestEmbeddingGenerator<DataContent>.DimensionCount); 155using IngestionPipeline<DataContent> pipeline = new(CreateReader(), new ImageChunker(), vectorStoreWriter); 176internal class ImageChunker : IngestionChunker<DataContent> 178public override IAsyncEnumerable<IngestionChunk<DataContent>> ProcessAsync(IngestionDocument document, CancellationToken cancellationToken = default) 181.Select(image => new IngestionChunk<DataContent>(
Processors\AlternativeTextEnricherTests.cs (4)
54DataContent dataContent = Assert.IsType<DataContent>(content); 141DataContent dataContent = Assert.IsType<DataContent>(content);