Skip to content

Commit

Permalink
Fixed agent prompt names and contents after #681 mess up (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza authored Nov 13, 2024
1 parent 3c63433 commit 59dd4a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions paperqa/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
where `summary` is relevant information from text - {summary_length} words and `relevance_score` is the relevance of `summary` to answer question (out of 10).
""" # noqa: E501

agent_system_prompt = (
env_system_prompt = (
# Matching https://github.com/langchain-ai/langchain/blob/langchain%3D%3D0.2.3/libs/langchain/langchain/agents/openai_functions_agent/base.py#L213-L215
"Optional system prompt message to precede the below agent_prompt."
"You are a helpful AI assistant."
)
agent_env_prompt = (
env_reset_prompt = (
"Use the tools to answer the question: {question}"
"\n\nThe {gen_answer_tool_name} tool output is visible to the user,"
" so you do not need to restate the answer"
Expand Down
8 changes: 4 additions & 4 deletions paperqa/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
from paperqa.prompts import (
CONTEXT_INNER_PROMPT,
CONTEXT_OUTER_PROMPT,
agent_env_prompt,
agent_system_prompt,
citation_prompt,
default_system_prompt,
env_reset_prompt,
env_system_prompt,
qa_prompt,
select_paper_prompt,
structured_citation_prompt,
Expand Down Expand Up @@ -446,10 +446,10 @@ class AgentSettings(BaseModel):
description="Optional kwarg for AGENT constructor",
)
agent_system_prompt: str | None = Field(
default=agent_system_prompt,
default=env_system_prompt,
description="Optional system prompt message to precede the below agent_prompt.",
)
agent_prompt: str = agent_env_prompt
agent_prompt: str = env_reset_prompt
return_paper_metadata: bool = Field(
default=False,
description=(
Expand Down

0 comments on commit 59dd4a7

Please sign in to comment.