Skip to content

Commit 8b694bb

Browse files
authored
Update Message annotations to support tool calls (#227)
1 parent cbf0887 commit 8b694bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ollama/_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ class Message(TypedDict):
7979
Chat message.
8080
"""
8181

82-
role: Literal['user', 'assistant', 'system']
83-
"Assumed role of the message. Response messages always has role 'assistant'."
82+
role: Literal['user', 'assistant', 'system', 'tool']
83+
"Assumed role of the message. Response messages always has role 'assistant' or 'tool'."
8484

85-
content: str
85+
content: NotRequired[str]
8686
'Content of the message. Response messages contains message fragments when streaming.'
8787

8888
images: NotRequired[Sequence[Any]]

0 commit comments

Comments
 (0)