Update Message annotations to support tool calls (#227)

This commit is contained in:
Denis Shulyaka 2024-07-29 20:39:09 +03:00 committed by GitHub
parent cbf0887573
commit 8b694bb0f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,10 +79,10 @@ class Message(TypedDict):
Chat message.
"""
role: Literal['user', 'assistant', 'system']
"Assumed role of the message. Response messages always has role 'assistant'."
role: Literal['user', 'assistant', 'system', 'tool']
"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.'
images: NotRequired[Sequence[Any]]