Skip to content

Commit cb81f52

Browse files
authored
Merge pull request #154 from ollama/done-reason
add done reason to generate type responses
2 parents 5dc857e + eaab477 commit cb81f52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ollama/_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ class BaseGenerateResponse(TypedDict):
1919
done: bool
2020
'True if response is complete, otherwise False. Useful for streaming to detect the final response.'
2121

22+
done_reason: str
23+
'Reason for completion. Only present when done is True.'
24+
2225
total_duration: int
2326
'Total duration in nanoseconds.'
2427

0 commit comments

Comments
 (0)