Skip to content
Merged

up #11

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/MapperAI.Core/Mappers/PdfMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public PdfMapper(IMapperSerializer serializer, IMapperClientFactory mapperClient
var isWeb = IsWebLink(pdfPath);
if (isWeb && _httpClient == null) throw new ArgumentException("HttpClient instance is required");
var iai = _mapperClientFactory.CreateClient(_clientConfiguration);
var pdfContent = isWeb ? await ExtractPdfWebContent(pdfPath) : SerializePdfContent(new PdfReader(pdfPath));
var pdfContent = isWeb ? await ExtractPdfWebContentAsync(pdfPath) : SerializePdfContent(new PdfReader(pdfPath));
var destinyObject = new T();
destinyObject.Initialize();
var prompt = CreatePrompt(pdfContent, _serializer.Serialize(destinyObject));
Expand Down Expand Up @@ -58,7 +58,7 @@ Do not include explanations or markdown formatting.
}


private async Task<string> ExtractPdfWebContent(string pdfUri)
private async Task<string> ExtractPdfWebContentAsync(string pdfUri)
{
if (pdfUri.StartsWith("https://drive.google.com") && !pdfUri.Contains("uc?export=download"))
pdfUri = ParseDriveUrl(pdfUri);
Expand Down