Azure-Samples / azure-search-openai-demo-csharp

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
MIT License
551 stars 345 forks source link

PDF upload will not generate or index sections if the number of characters on the page is less than 1000 #304

Open tonybaloney opened 3 months ago

tonybaloney commented 3 months ago

I noticed this whilst testing, but EmbedPDFBlobAsync will not generate sections for pages in the page map that have under 1000 characters.

This is a logic flaw in the CreateSections method that's missing a conditional statement before the while loop and never yields a value (section).