|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | 2 |
|
3 | | -from typing import Union |
4 | | -from typing_extensions import Annotated, TypeAlias |
| 3 | +from typing import List, Union, Optional |
| 4 | +from typing_extensions import Literal, Annotated, TypeAlias |
5 | 5 |
|
6 | 6 | from .._utils import PropertyInfo |
| 7 | +from .._models import BaseModel |
7 | 8 | from .data_content import DataContent |
8 | 9 | from .text_content import TextContent |
| 10 | +from .message_style import MessageStyle |
| 11 | +from .message_author import MessageAuthor |
9 | 12 | from .tool_request_content import ToolRequestContent |
10 | 13 | from .tool_response_content import ToolResponseContent |
11 | 14 |
|
12 | | -__all__ = ["TaskMessageContent"] |
| 15 | +__all__ = ["TaskMessageContent", "ReasoningContent"] |
| 16 | + |
| 17 | + |
| 18 | +class ReasoningContent(BaseModel): |
| 19 | + author: MessageAuthor |
| 20 | + """ |
| 21 | + The role of the messages author, in this case `system`, `user`, `assistant`, or |
| 22 | + `tool`. |
| 23 | + """ |
| 24 | + |
| 25 | + summary: List[str] |
| 26 | + """A list of short reasoning summaries""" |
| 27 | + |
| 28 | + content: Optional[List[str]] = None |
| 29 | + """The reasoning content or chain-of-thought text""" |
| 30 | + |
| 31 | + style: Optional[MessageStyle] = None |
| 32 | + """The style of the message. |
| 33 | +
|
| 34 | + This is used by the client to determine how to display the message. |
| 35 | + """ |
| 36 | + |
| 37 | + type: Optional[Literal["reasoning"]] = None |
| 38 | + """The type of the message, in this case `reasoning`.""" |
| 39 | + |
13 | 40 |
|
14 | 41 | TaskMessageContent: TypeAlias = Annotated[ |
15 | | - Union[TextContent, DataContent, ToolRequestContent, ToolResponseContent], PropertyInfo(discriminator="type") |
| 42 | + Union[TextContent, ReasoningContent, DataContent, ToolRequestContent, ToolResponseContent], |
| 43 | + PropertyInfo(discriminator="type"), |
16 | 44 | ] |
0 commit comments