Skip to content

Commit

Permalink
Reverting status log message changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza committed Sep 10, 2024
1 parent 28aa2d6 commit 8d73ff0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paperqa/agents/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def paper_search(
except KeyError:
offset = self.previous_searches[search_key] = 0

logger.info(f"{self.TOOL_FN_NAME} starting for query {query!r}.")
logger.info(f"Starting paper search for {query!r}.")
index = await get_directory_index(settings=self.settings)
results = await index.query(
query,
Expand All @@ -127,7 +127,7 @@ async def paper_search(
)

status = state.status
logger.info(f"{self.TOOL_FN_NAME} new status {status}.")
logger.info(status)
# mark how far we've searched so that continuation will start at the right place
self.previous_searches[search_key] += self.settings.agent.search_count
if self.settings.agent.return_paper_metadata:
Expand Down Expand Up @@ -184,7 +184,7 @@ async def gather_evidence(self, question: str, state: EnvironmentState) -> str:
state.answer.question = original_question

status = state.status
logger.info(f"{self.TOOL_FN_NAME} new status {status}.")
logger.info(status)
sorted_contexts = sorted(
state.answer.contexts, key=lambda x: x.score, reverse=True
)
Expand Down Expand Up @@ -242,7 +242,7 @@ async def gen_answer(
else:
answer = state.answer.answer
status = state.status
logger.info(f"{self.TOOL_FN_NAME} new status {status}.")
logger.info(status)
return f"{answer} | {status}"

# NOTE: can match failure to answer or an actual answer
Expand Down

0 comments on commit 8d73ff0

Please sign in to comment.