polos-sdk 0.1.4__py3-none-any.whl → 0.1.5__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.
polos/llm/stream.py
CHANGED
|
@@ -86,7 +86,7 @@ async def _stream_from_provider(
|
|
|
86
86
|
Returns:
|
|
87
87
|
Dictionary with chunk_index, response_content, response_tool_calls, usage, raw_output
|
|
88
88
|
"""
|
|
89
|
-
from ..features.events import publish as publish_event
|
|
89
|
+
from ..features.events import publish as publish_event, EventData
|
|
90
90
|
|
|
91
91
|
chunk_index = 0
|
|
92
92
|
response_content = None
|
|
@@ -103,8 +103,10 @@ async def _stream_from_provider(
|
|
|
103
103
|
await publish_event(
|
|
104
104
|
client=polos_client,
|
|
105
105
|
topic=topic,
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
event_data=EventData(
|
|
107
|
+
event_type="stream_start",
|
|
108
|
+
data={"step": agent_step},
|
|
109
|
+
),
|
|
108
110
|
)
|
|
109
111
|
|
|
110
112
|
# Stream from provider
|
|
@@ -157,18 +159,20 @@ async def _stream_from_provider(
|
|
|
157
159
|
await publish_event(
|
|
158
160
|
client=polos_client,
|
|
159
161
|
topic=topic,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
162
|
+
event_data=EventData(
|
|
163
|
+
event_type=event_type,
|
|
164
|
+
data={
|
|
165
|
+
"step": agent_step,
|
|
166
|
+
"chunk_index": chunk_index,
|
|
167
|
+
"content": normalized_chunk.get("data", {}).get("content"),
|
|
168
|
+
"tool_call": normalized_chunk.get("data", {}).get("tool_call"),
|
|
169
|
+
"usage": normalized_chunk.get("data", {}).get("usage"),
|
|
170
|
+
"_metadata": {
|
|
171
|
+
"execution_id": agent_run_id,
|
|
172
|
+
"workflow_id": ctx.workflow_id,
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
),
|
|
172
176
|
)
|
|
173
177
|
chunk_index += 1
|
|
174
178
|
|
|
@@ -16,7 +16,7 @@ polos/features/tracing.py,sha256=xOaj9WLqK7B9IwRUDyCDVZ7IGhVPDxQ1YB1UQ3aFK2w,227
|
|
|
16
16
|
polos/features/wait.py,sha256=c2NUz1BPG56EGIdxQwuDhydnyztqD5B9KBTlaimdofE,2504
|
|
17
17
|
polos/llm/__init__.py,sha256=SYLl5KdW3ah2lF5kpNsAuT-86MrNtsUDKXmznNsW8Fk,170
|
|
18
18
|
polos/llm/generate.py,sha256=FuuY2vPeka7q8cpQ4pHzygmkO_pnvAadLP65xyFgESI,6491
|
|
19
|
-
polos/llm/stream.py,sha256=
|
|
19
|
+
polos/llm/stream.py,sha256=XUH3_AF2fCgAEIeu5DNxaKDWePIQfC00HkzX6u-YHEg,6920
|
|
20
20
|
polos/llm/providers/__init__.py,sha256=xFiGlL4P1_3IxVXYFIphXWLBEnillFcRVmpa34YEysk,192
|
|
21
21
|
polos/llm/providers/anthropic.py,sha256=1aAbDIG8pYhTD2aOFBKK87Qh_LZDmZU5nGqqDh29opQ,26488
|
|
22
22
|
polos/llm/providers/azure.py,sha256=-_IxZhu6tCgoQ9TdmltUrimKVC6kw4DsU6eDIsitzOQ,1487
|
|
@@ -50,6 +50,6 @@ polos/utils/retry.py,sha256=Igz4degC0IUWnsJsRKVIrkNjYm57DG467EcLbmMOMuM,1398
|
|
|
50
50
|
polos/utils/serializer.py,sha256=XfnZ7vIbTk_xly116De1xJiNncJdb1GIjAERys7ZV10,6554
|
|
51
51
|
polos/utils/tracing.py,sha256=SkBktU12KyIQcl8q1wjyTX7QfGwyzdzEcBY8QTX_t6Y,1021
|
|
52
52
|
polos/utils/worker_singleton.py,sha256=7-MOx9VFlyC-8waB7OMg6xER5NB7Ld7ofMku9yoitDo,1081
|
|
53
|
-
polos_sdk-0.1.
|
|
54
|
-
polos_sdk-0.1.
|
|
55
|
-
polos_sdk-0.1.
|
|
53
|
+
polos_sdk-0.1.5.dist-info/METADATA,sha256=TTWW8dETmBvCjhJptx-lEUrnmAb5Q3cje3E8Q5GmiNs,3870
|
|
54
|
+
polos_sdk-0.1.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
55
|
+
polos_sdk-0.1.5.dist-info/RECORD,,
|
|
File without changes
|