From eaab4778c7c1261695e69bf97c62a779a6adf547 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Thu, 9 May 2024 16:47:56 -0700 Subject: [PATCH] add done reason to generate type responses --- ollama/_types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ollama/_types.py b/ollama/_types.py index 73cf4b8..846fd2a 100644 --- a/ollama/_types.py +++ b/ollama/_types.py @@ -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.'