Skip to content

Commit

Permalink
Documenting PromptCollection.pre (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza authored Jun 27, 2024
1 parent 47ee1ac commit fc842b3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion paperqa/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,16 @@ class PromptCollection(BaseModel):
qa: str = qa_prompt
select: str = select_paper_prompt
cite: str = citation_prompt
pre: str | None = None
pre: str | None = Field(
default=None,
description=(
"Opt-in pre-prompt (templated with just the original question) to append"
" information before a qa prompt. For example:"
" 'Summarize all scientific terms in the following question:\n{question}'."
" This pre-prompt can enable injection of question-specific guidance later"
" used by the qa prompt, without changing the qa prompt's template."
),
)
post: str | None = None
system: str = default_system_prompt
skip_summary: bool = False
Expand Down

0 comments on commit fc842b3

Please sign in to comment.