agentex-sdk 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentex/_version.py +1 -1
- agentex/lib/core/services/adk/providers/openai.py +26 -0
- agentex/types/__init__.py +2 -0
- agentex/types/reasoning_content_delta.py +16 -0
- agentex/types/reasoning_summary_delta.py +16 -0
- agentex/types/task_message_delta.py +4 -1
- {agentex_sdk-0.3.0.dist-info → agentex_sdk-0.4.0.dist-info}/METADATA +2 -1
- {agentex_sdk-0.3.0.dist-info → agentex_sdk-0.4.0.dist-info}/RECORD +11 -9
- {agentex_sdk-0.3.0.dist-info → agentex_sdk-0.4.0.dist-info}/WHEEL +0 -0
- {agentex_sdk-0.3.0.dist-info → agentex_sdk-0.4.0.dist-info}/entry_points.txt +0 -0
- {agentex_sdk-0.3.0.dist-info → agentex_sdk-0.4.0.dist-info}/licenses/LICENSE +0 -0
agentex/_version.py
CHANGED
@@ -29,6 +29,7 @@ from agentex.lib.types.task_message_updates import (
|
|
29
29
|
)
|
30
30
|
from agentex.types.task_message_content import (
|
31
31
|
TextContent,
|
32
|
+
ReasoningContent,
|
32
33
|
ToolRequestContent,
|
33
34
|
ToolResponseContent,
|
34
35
|
)
|
@@ -647,6 +648,31 @@ class OpenAIService:
|
|
647
648
|
content=tool_response_content,
|
648
649
|
),
|
649
650
|
)
|
651
|
+
|
652
|
+
elif event.item.type == "reasoning_item":
|
653
|
+
# Handle reasoning items
|
654
|
+
reasoning_item = event.item.raw_item
|
655
|
+
|
656
|
+
reasoning_content = ReasoningContent(
|
657
|
+
author="agent",
|
658
|
+
summary=[summary.text for summary in reasoning_item.summary],
|
659
|
+
content=[content.text for content in reasoning_item.content] if reasoning_item.content else None,
|
660
|
+
)
|
661
|
+
|
662
|
+
# Create reasoning content using streaming context (immediate completion)
|
663
|
+
async with (
|
664
|
+
self.streaming_service.streaming_task_message_context(
|
665
|
+
task_id=task_id,
|
666
|
+
initial_content=reasoning_content,
|
667
|
+
) as streaming_context
|
668
|
+
):
|
669
|
+
# The message has already been persisted, but we still need to send an update
|
670
|
+
await streaming_context.stream_update(
|
671
|
+
update=StreamTaskMessageFull(
|
672
|
+
parent_task_message=streaming_context.task_message,
|
673
|
+
content=reasoning_content,
|
674
|
+
),
|
675
|
+
)
|
650
676
|
|
651
677
|
elif event.type == "raw_response_event":
|
652
678
|
if isinstance(event.data, ResponseTextDeltaEvent):
|
agentex/types/__init__.py
CHANGED
@@ -51,7 +51,9 @@ from .message_update_params import MessageUpdateParams as MessageUpdateParams
|
|
51
51
|
from .tool_response_content import ToolResponseContent as ToolResponseContent
|
52
52
|
from .tracker_list_response import TrackerListResponse as TrackerListResponse
|
53
53
|
from .tracker_update_params import TrackerUpdateParams as TrackerUpdateParams
|
54
|
+
from .reasoning_content_delta import ReasoningContentDelta as ReasoningContentDelta
|
54
55
|
from .reasoning_content_param import ReasoningContentParam as ReasoningContentParam
|
56
|
+
from .reasoning_summary_delta import ReasoningSummaryDelta as ReasoningSummaryDelta
|
55
57
|
from .agent_rpc_by_name_params import AgentRpcByNameParams as AgentRpcByNameParams
|
56
58
|
from .task_message_content_param import TaskMessageContentParam as TaskMessageContentParam
|
57
59
|
from .tool_request_content_param import ToolRequestContentParam as ToolRequestContentParam
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
|
8
|
+
__all__ = ["ReasoningContentDelta"]
|
9
|
+
|
10
|
+
|
11
|
+
class ReasoningContentDelta(BaseModel):
|
12
|
+
content_index: int
|
13
|
+
|
14
|
+
content_delta: Optional[str] = None
|
15
|
+
|
16
|
+
type: Optional[Literal["reasoning_content"]] = None
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
|
8
|
+
__all__ = ["ReasoningSummaryDelta"]
|
9
|
+
|
10
|
+
|
11
|
+
class ReasoningSummaryDelta(BaseModel):
|
12
|
+
summary_index: int
|
13
|
+
|
14
|
+
summary_delta: Optional[str] = None
|
15
|
+
|
16
|
+
type: Optional[Literal["reasoning_summary"]] = None
|
@@ -8,9 +8,12 @@ from .data_delta import DataDelta
|
|
8
8
|
from .text_delta import TextDelta
|
9
9
|
from .tool_request_delta import ToolRequestDelta
|
10
10
|
from .tool_response_delta import ToolResponseDelta
|
11
|
+
from .reasoning_content_delta import ReasoningContentDelta
|
12
|
+
from .reasoning_summary_delta import ReasoningSummaryDelta
|
11
13
|
|
12
14
|
__all__ = ["TaskMessageDelta"]
|
13
15
|
|
14
16
|
TaskMessageDelta: TypeAlias = Annotated[
|
15
|
-
Union[TextDelta, DataDelta, ToolRequestDelta, ToolResponseDelta],
|
17
|
+
Union[TextDelta, DataDelta, ToolRequestDelta, ToolResponseDelta, ReasoningSummaryDelta, ReasoningContentDelta],
|
18
|
+
PropertyInfo(discriminator="type"),
|
16
19
|
]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: agentex-sdk
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: The official Python library for the agentex API
|
5
5
|
Project-URL: Homepage, https://github.com/scaleapi/agentex-python
|
6
6
|
Project-URL: Repository, https://github.com/scaleapi/agentex-python
|
@@ -32,6 +32,7 @@ Requires-Dist: kubernetes<29.0.0,>=25.0.0
|
|
32
32
|
Requires-Dist: litellm<2,>=1.66.0
|
33
33
|
Requires-Dist: mcp[cli]>=1.4.1
|
34
34
|
Requires-Dist: openai-agents!=0.2.3,>=0.0.7
|
35
|
+
Requires-Dist: openai>=1.99.9
|
35
36
|
Requires-Dist: pydantic<3,>=2.0.0
|
36
37
|
Requires-Dist: pytest-asyncio>=1.0.0
|
37
38
|
Requires-Dist: pytest>=8.4.0
|
@@ -11,7 +11,7 @@ agentex/_resource.py,sha256=S1t7wmR5WUvoDIhZjo_x-E7uoTJBynJ3d8tPJMQYdjw,1106
|
|
11
11
|
agentex/_response.py,sha256=Tb9zazsnemO2rTxWtBjAD5WBqlhli5ZaXGbiKgdu5DE,28794
|
12
12
|
agentex/_streaming.py,sha256=FNGJExRCF-vTRUZHFKUfoAWFhDGOB3XbioVCF37Jr7E,10104
|
13
13
|
agentex/_types.py,sha256=KyKYySGIfHPod2hho1fPxssk5NuVn8C4MeMTtA-lg80,6198
|
14
|
-
agentex/_version.py,sha256=
|
14
|
+
agentex/_version.py,sha256=CXKkCgnAp9MvMYadHVymbnJuQa97_ituLGeUp9fx-FI,159
|
15
15
|
agentex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
agentex/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
agentex/_utils/_logs.py,sha256=LUjFPc3fweSChBUmjhQD8uYmwQAmFMNDuVFKfjYBQfM,777
|
@@ -133,7 +133,7 @@ agentex/lib/core/services/adk/acp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
|
|
133
133
|
agentex/lib/core/services/adk/acp/acp.py,sha256=Ei6r5CcM1RA7DqfTRpAWCmP7Buw97b3ajQuE4DsdSaQ,7559
|
134
134
|
agentex/lib/core/services/adk/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
135
135
|
agentex/lib/core/services/adk/providers/litellm.py,sha256=7RIVqQ5XaCP2cEL1pr4nl5jfG_0FDMvDTZVKu1iaN3M,9864
|
136
|
-
agentex/lib/core/services/adk/providers/openai.py,sha256=
|
136
|
+
agentex/lib/core/services/adk/providers/openai.py,sha256=NLTE4MLSvKeiQ--puuBWaz97C7BbkFtn9n1uxYlkiyg,33203
|
137
137
|
agentex/lib/core/services/adk/providers/sgp.py,sha256=9gm-sPNQ_OSTaBzL0onerKhokPk_ZHndaKNO-z16wyQ,3676
|
138
138
|
agentex/lib/core/services/adk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
139
139
|
agentex/lib/core/services/adk/utils/templating.py,sha256=eaXSFq31Y9p5pRD6J6SL4QdTFtxy81dilbF2XXc2JYQ,1889
|
@@ -237,7 +237,7 @@ agentex/resources/tracker.py,sha256=YxSeiloMwIqrS9nY7SlHclauRA7142qrKw34xgwqYbA,
|
|
237
237
|
agentex/resources/messages/__init__.py,sha256=_J1eusFtr_k6zrAntJSuqx6LWEUBSTrV1OZZh7MaDPE,1015
|
238
238
|
agentex/resources/messages/batch.py,sha256=pegCmnjK_J0jek5ChX1pKpq5RmCucTYLbK69H6qGVS4,9629
|
239
239
|
agentex/resources/messages/messages.py,sha256=fuFmmGNOjRJVzmYHcfP2trg0yii0n9MPPCpt7F8fDs4,17930
|
240
|
-
agentex/types/__init__.py,sha256=
|
240
|
+
agentex/types/__init__.py,sha256=_tsP_hk7b8V3b2wCIw1jjdIsedgmtlI5Jd0ijFtk6NA,3834
|
241
241
|
agentex/types/acp_type.py,sha256=Fj-4SzmM6m95ck_ZXtNbcWggHiD9F49bxBLPbl1fxe4,208
|
242
242
|
agentex/types/agent.py,sha256=t6CUsKSaK6Gs_X9g0YxSi5G3Hh21FrGVGnAD6MytVBk,981
|
243
243
|
agentex/types/agent_list_params.py,sha256=81IWnRZ2rLfHH7GB6VkXShYjb44DO0guG1znJcV3tuI,316
|
@@ -260,7 +260,9 @@ agentex/types/message_list_response.py,sha256=YYDf-57zLS-E1eX3EZxz7c6XCuBcRBws01
|
|
260
260
|
agentex/types/message_style.py,sha256=nuoXzoDyP3KAQsQeKHaiby1EMxeY-8TJjWr8eMMpQEE,219
|
261
261
|
agentex/types/message_update_params.py,sha256=_KpnJ56FNeoIcwodQmAgsweqH1YAeIgYVT2jo9ahUhY,502
|
262
262
|
agentex/types/reasoning_content.py,sha256=ieA_EmFlHHo5suNnY6_7Qq3u34h8ehZ0E-vhp32Am1o,915
|
263
|
+
agentex/types/reasoning_content_delta.py,sha256=tU-ndHhj9x8Mmn3BWwSouqViYHWzVOlZGYL_QF17wC4,386
|
263
264
|
agentex/types/reasoning_content_param.py,sha256=qpuwnaQK-ofl8OtvwxpSSiHCwL7nIY0knX10EgGl0W4,942
|
265
|
+
agentex/types/reasoning_summary_delta.py,sha256=J2VY9VF1tLCNTIoN0qQmvZgGX35P9Ndmv1fRbcMl6R4,386
|
264
266
|
agentex/types/span.py,sha256=OfNLddf5qjwv52ZrxLmgbXDDkBBovMeG7ovc4sRJReg,1045
|
265
267
|
agentex/types/span_create_params.py,sha256=o-M8rzB_6yoLrn3gQJ9Ecc6ZrsKp7uVyILam_wsGrgc,1392
|
266
268
|
agentex/types/span_list_params.py,sha256=b7gnqK17rE-UK7bUBSR9xsskI_jgmvGw9SuTsIIna9s,297
|
@@ -277,7 +279,7 @@ agentex/types/task_list_response.py,sha256=8Q-RIanLmUC9vOuDXoW5gjpZeE-HR6IrBugG7
|
|
277
279
|
agentex/types/task_message.py,sha256=hoLAkiQJd1Fl7EjLof-vZq6zVnDw9SKmnV6V74Po58A,918
|
278
280
|
agentex/types/task_message_content.py,sha256=3itFPfk9V3AHggZFpHKHkkzostFpyZ8O4vMnwZjXLis,646
|
279
281
|
agentex/types/task_message_content_param.py,sha256=IZxdUJWkUynteRQa-y743fCyum54IR6nqr0uybfUTO4,675
|
280
|
-
agentex/types/task_message_delta.py,sha256=
|
282
|
+
agentex/types/task_message_delta.py,sha256=3i1Qw2CcZYxXhofbCJnQDO0QrIIQsLX6P-UAynvc4fs,716
|
281
283
|
agentex/types/task_message_update.py,sha256=gevnU4UW67qTzN_OGT-S3E5zbS9KQNehJZF3XhiirtU,2247
|
282
284
|
agentex/types/text_content.py,sha256=i6ksdQXIyWosXAm-O_26m_eZA-4x26dgoNdzWnhue9k,1347
|
283
285
|
agentex/types/text_content_param.py,sha256=5xtCBUJj6xKGlmpNuWVnBG3BBFQS3HyrKjq6KfpfVz0,1439
|
@@ -298,8 +300,8 @@ agentex/types/messages/batch_update_params.py,sha256=Ug5CThbD49a8j4qucg04OdmVrp_
|
|
298
300
|
agentex/types/messages/batch_update_response.py,sha256=TbSBe6SuPzjXXWSj-nRjT1JHGBooTshHQQDa1AixQA8,278
|
299
301
|
agentex/types/shared/__init__.py,sha256=IKs-Qn5Yja0kFh1G1kDqYZo43qrOu1hSoxlPdN-85dI,149
|
300
302
|
agentex/types/shared/delete_response.py,sha256=8qH3zvQXaOHYQSHyXi7UQxdR4miTzR7V9K4zXVsiUyk,215
|
301
|
-
agentex_sdk-0.
|
302
|
-
agentex_sdk-0.
|
303
|
-
agentex_sdk-0.
|
304
|
-
agentex_sdk-0.
|
305
|
-
agentex_sdk-0.
|
303
|
+
agentex_sdk-0.4.0.dist-info/METADATA,sha256=5on23JG2ehjAa2mOlvhXNoJgQXoh0MmikrAeaLusAhg,15067
|
304
|
+
agentex_sdk-0.4.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
305
|
+
agentex_sdk-0.4.0.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
|
306
|
+
agentex_sdk-0.4.0.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
|
307
|
+
agentex_sdk-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|