Skip to content

Commit

Permalink
Expanded explanatory comment on Answer.token_counts (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza committed Mar 5, 2024
1 parent a16f5d9 commit 72aa100
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paperqa/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ class Answer(BaseModel):
answer_length: str = "about 100 words"
# just for convenience you can override this
cost: float | None = None
# key is model name, value is (prompt, completion) token counts
# Map model name to a two-item list of LLM prompt token counts
# and LLM completion token counts
token_counts: dict[str, list[int]] = Field(default_factory=dict)
model_config = ConfigDict(extra="ignore")

Expand Down

0 comments on commit 72aa100

Please sign in to comment.