Skip to content

Commit 46898c1

Browse files
committed
Changes so container builds
1 parent 806e19f commit 46898c1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

App/kernel-memory/service/Core/DataFormats/Pdf/PdfMarkdownDecoder.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ public async Task<FileContent> DecodeAsync(string filename, CancellationToken ca
3838

3939
public async Task<FileContent> DecodeAsync(BinaryData data, CancellationToken cancellationToken = default)
4040
{
41-
var content = new AnalyzeDocumentContent() { Base64Source = data };
41+
var analyzeDocumentOptions = new AnalyzeDocumentOptions("prebuilt-layout", data)
42+
{
43+
OutputContentFormat = DocumentContentFormat.Markdown
44+
};
4245

4346
//this invocation should be blocking during process
4447
DocumentIntelligenceClientOptions options = new()
@@ -49,7 +52,7 @@ public async Task<FileContent> DecodeAsync(BinaryData data, CancellationToken ca
4952
this._client = new DocumentIntelligenceClient(new Uri(this._endpoint), new AzureKeyCredential(this._apiKey), options);
5053

5154
Operation<AnalyzeResult> operation = null;
52-
operation = await this._client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout", content, outputContentFormat: ContentFormat.Markdown, cancellationToken: cancellationToken).ConfigureAwait(false);
55+
operation = await this._client.AnalyzeDocumentAsync(WaitUntil.Completed, analyzeDocumentOptions, cancellationToken).ConfigureAwait(false);
5356

5457
AnalyzeResult result = operation.Value;
5558

0 commit comments

Comments
 (0)