61
61
llm_parse_json ,
62
62
map_fxn_summary ,
63
63
)
64
- from paperqa .prompts import CANNOT_ANSWER_PHRASE
64
+ from paperqa .prompts import CANNOT_ANSWER_PHRASE , summary_json_multimodal_system_prompt
65
65
from paperqa .prompts import qa_prompt as default_qa_prompt
66
66
from paperqa .readers import PDFParserFn , parse_image , read_doc
67
67
from paperqa .settings import AsyncContextSerializer
@@ -1594,6 +1594,7 @@ async def test_images(stub_data_dir: Path) -> None:
1594
1594
# We don't support image embeddings yet, so disable embedding
1595
1595
settings .answer .evidence_retrieval = False
1596
1596
settings .parsing .defer_embedding = True
1597
+ settings .prompts .summary_json_system = summary_json_multimodal_system_prompt
1597
1598
1598
1599
docs = Docs ()
1599
1600
districts_docname = await docs .aadd (
@@ -1625,7 +1626,7 @@ async def test_images(stub_data_dir: Path) -> None:
1625
1626
if c .id in session .used_contexts and c .text .doc == districts_doc
1626
1627
]
1627
1628
assert contexts_used
1628
- assert all (c .used_images for c in contexts_used ) # type: ignore[attr-defined]
1629
+ assert all (bool ( c .used_images ) for c in contexts_used ) # type: ignore[attr-defined]
1629
1630
1630
1631
1631
1632
@pytest .mark .asyncio
@@ -1636,6 +1637,7 @@ async def test_images_corrupt(stub_data_dir: Path) -> None:
1636
1637
# We don't support image embeddings yet, so disable embedding
1637
1638
settings .answer .evidence_retrieval = False
1638
1639
settings .parsing .defer_embedding = True
1640
+ settings .prompts .summary_json_system = summary_json_multimodal_system_prompt
1639
1641
1640
1642
docs = Docs ()
1641
1643
districts_docname = await docs .aadd (
@@ -1687,7 +1689,7 @@ async def test_images_corrupt(stub_data_dir: Path) -> None:
1687
1689
if c .id in session .used_contexts and c .text .doc == districts_doc
1688
1690
]
1689
1691
assert contexts_used
1690
- assert all (not c .used_images for c in contexts_used ) # type: ignore[attr-defined]
1692
+ assert all (not bool ( c .used_images ) for c in contexts_used ) # type: ignore[attr-defined]
1691
1693
1692
1694
1693
1695
def test_zotero () -> None :
0 commit comments