Skip to content

Commit

Permalink
Merge pull request #154 from ollama/done-reason
Browse files Browse the repository at this point in the history
add done reason to generate type responses
  • Loading branch information
mxyng committed May 10, 2024
2 parents 5dc857e + eaab477 commit cb81f52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ollama/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class BaseGenerateResponse(TypedDict):
done: bool
'True if response is complete, otherwise False. Useful for streaming to detect the final response.'

done_reason: str
'Reason for completion. Only present when done is True.'

total_duration: int
'Total duration in nanoseconds.'

Expand Down

0 comments on commit cb81f52

Please sign in to comment.