diff --git a/paperqa/types.py b/paperqa/types.py index fd203589..d0255aca 100644 --- a/paperqa/types.py +++ b/paperqa/types.py @@ -34,14 +34,21 @@ class LLMResult(BaseModel): id: UUID = Field(default_factory=uuid4) answer_id: UUID | None = None name: str | None = None - prompt: str | list[dict] | None = None + prompt: str | list[dict] | None = Field( + default=None, + description="Optional prompt (str) or list of serialized prompts (list[dict]).", + ) text: str = "" prompt_count: int = 0 completion_count: int = 0 model: str date: str - seconds_to_first_token: float = 0 - seconds_to_last_token: float = 0 + seconds_to_first_token: float = Field( + default=0.0, description="Delta time (sec) to first response token's arrival." + ) + seconds_to_last_token: float = Field( + default=0.0, description="Delta time (sec) to last response token's arrival." + ) def __str__(self): return self.text