diff --git a/src/biome/literature_review.py b/src/biome/literature_review.py index fa20b40..8189b57 100644 --- a/src/biome/literature_review.py +++ b/src/biome/literature_review.py @@ -3,8 +3,6 @@ import os import logging import aiohttp -from paperqa.clients.unpaywall import UnpaywallProvider -from paperqa import Docs, Settings from pathlib import Path from typing import cast import traceback @@ -48,6 +46,7 @@ async def paperQA(self, query: str, slug: str) -> str: """ run paperQA over the downloaded corpus and returns the response """ + from paperqa import Docs, Settings docs = Docs() llm_model = os.environ.get("PAPERQA_LLM_MODEL", "gpt-4.1-mini") settings = Settings( @@ -123,6 +122,7 @@ async def fetch_from_unpaywall(self, doi: str) -> str: """ return the pdf link to a paper from unpaywall as a fallback method """ + from paperqa.clients.unpaywall import UnpaywallProvider try: async with aiohttp.ClientSession() as session: provider = UnpaywallProvider()