Skip to content

Commit 105f42d

Browse files
authored
Ensuring citation peeks aren't multimodal (#1138)
1 parent 6667baa commit 105f42d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/paperqa/docs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async def aadd( # noqa: PLR0912
281281
overlap=parse_config.overlap,
282282
page_size_limit=parse_config.page_size_limit,
283283
use_block_parsing=parse_config.pdfs_use_block_parsing,
284-
parse_images=parse_config.multimodal,
284+
parse_images=False, # Peeking is text only
285285
parse_pdf=parse_config.parse_pdf,
286286
)
287287
if not texts or not texts[0].text.strip():
@@ -300,6 +300,7 @@ async def aadd( # noqa: PLR0912
300300
or "insufficient" in citation
301301
):
302302
citation = f"Unknown, {os.path.basename(path)}, {datetime.now().year}"
303+
del result, texts # Ensure we don't reuse
303304

304305
doc = Doc(
305306
docname=self._get_unique_name(

0 commit comments

Comments
 (0)