Skip to content

Commit ad779b4

Browse files
feat(api): api update
1 parent c029590 commit ad779b4

File tree

3 files changed

+64
-10
lines changed

3 files changed

+64
-10
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-2d5d5f305f93d156fe32fab5f46ada4514aeba6215fea99115aa17b3b6d2f9c9.yml
3-
openapi_spec_hash: 964a5178dec5d5f4accf4dbf743853e3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-0f2236db4ff4adacf2e97ed9ad85269500786dbc4c6c83a2ac45b33fba43e259.yml
3+
openapi_spec_hash: 43ad0cbb20696a241cdc83dd5f1366e2
44
config_hash: f6ec6016df1ff072b5b60cdf7b438361
Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,44 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

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
55

66
from .._utils import PropertyInfo
7+
from .._models import BaseModel
78
from .data_content import DataContent
89
from .text_content import TextContent
10+
from .message_style import MessageStyle
11+
from .message_author import MessageAuthor
912
from .tool_request_content import ToolRequestContent
1013
from .tool_response_content import ToolResponseContent
1114

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+
1340

1441
TaskMessageContent: TypeAlias = Annotated[
15-
Union[TextContent, DataContent, ToolRequestContent, ToolResponseContent], PropertyInfo(discriminator="type")
42+
Union[TextContent, ReasoningContent, DataContent, ToolRequestContent, ToolResponseContent],
43+
PropertyInfo(discriminator="type"),
1644
]

src/agentex/types/task_message_content_param.py

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,42 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
6-
from typing_extensions import TypeAlias
5+
from typing import List, Union, Optional
6+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

8+
from .message_style import MessageStyle
9+
from .message_author import MessageAuthor
810
from .data_content_param import DataContentParam
911
from .text_content_param import TextContentParam
1012
from .tool_request_content_param import ToolRequestContentParam
1113
from .tool_response_content_param import ToolResponseContentParam
1214

13-
__all__ = ["TaskMessageContentParam"]
15+
__all__ = ["TaskMessageContentParam", "ReasoningContent"]
16+
17+
18+
class ReasoningContent(TypedDict, total=False):
19+
author: Required[MessageAuthor]
20+
"""
21+
The role of the messages author, in this case `system`, `user`, `assistant`, or
22+
`tool`.
23+
"""
24+
25+
summary: Required[List[str]]
26+
"""A list of short reasoning summaries"""
27+
28+
content: Optional[List[str]]
29+
"""The reasoning content or chain-of-thought text"""
30+
31+
style: MessageStyle
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: Literal["reasoning"]
38+
"""The type of the message, in this case `reasoning`."""
39+
1440

1541
TaskMessageContentParam: TypeAlias = Union[
16-
TextContentParam, DataContentParam, ToolRequestContentParam, ToolResponseContentParam
42+
TextContentParam, ReasoningContent, DataContentParam, ToolRequestContentParam, ToolResponseContentParam
1743
]

0 commit comments

Comments
 (0)