Update Message annotations to support tool calls (#227)

This commit is contained in:
Denis Shulyaka
2024-07-29 10:39:09 -07:00
committed by GitHub
parent cbf0887573
commit 8b694bb0f4
+3 -3
View File
@@ -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]]