mirror of
https://github.com/ollama/ollama-python.git
synced 2026-10-12 11:57:27 +00:00
Update Message annotations to support tool calls (#227)
This commit is contained in:
+3
-3
@@ -79,10 +79,10 @@ class Message(TypedDict):
|
|||||||
Chat message.
|
Chat message.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
role: Literal['user', 'assistant', 'system']
|
role: Literal['user', 'assistant', 'system', 'tool']
|
||||||
"Assumed role of the message. Response messages always has role 'assistant'."
|
"Assumed role of the message. Response messages always has role 'assistant' or 'tool'."
|
||||||
|
|
||||||
content: str
|
content: NotRequired[str]
|
||||||
'Content of the message. Response messages contains message fragments when streaming.'
|
'Content of the message. Response messages contains message fragments when streaming.'
|
||||||
|
|
||||||
images: NotRequired[Sequence[Any]]
|
images: NotRequired[Sequence[Any]]
|
||||||
|
|||||||
Reference in New Issue
Block a user