nvidia-nat 1.4.0a20251021__py3-none-any.whl → 1.4.0a20251022__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.
- nat/runtime/runner.py +11 -3
- nat/utils/string_utils.py +16 -0
- {nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/METADATA +1 -1
- {nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/RECORD +9 -9
- {nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/WHEEL +0 -0
- {nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/entry_points.txt +0 -0
- {nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/top_level.txt +0 -0
nat/runtime/runner.py
CHANGED
|
@@ -170,7 +170,8 @@ class Runner:
|
|
|
170
170
|
IntermediateStepPayload(UUID=workflow_step_uuid,
|
|
171
171
|
event_type=IntermediateStepType.WORKFLOW_START,
|
|
172
172
|
name=workflow_name,
|
|
173
|
-
metadata=start_metadata
|
|
173
|
+
metadata=start_metadata,
|
|
174
|
+
data=StreamEventData(input=self._input_message)))
|
|
174
175
|
|
|
175
176
|
result = await self._entry_fn.ainvoke(self._input_message, to_type=to_type) # type: ignore
|
|
176
177
|
|
|
@@ -249,9 +250,15 @@ class Runner:
|
|
|
249
250
|
IntermediateStepPayload(UUID=workflow_step_uuid,
|
|
250
251
|
event_type=IntermediateStepType.WORKFLOW_START,
|
|
251
252
|
name=workflow_name,
|
|
252
|
-
metadata=start_metadata
|
|
253
|
+
metadata=start_metadata,
|
|
254
|
+
data=StreamEventData(input=self._input_message)))
|
|
255
|
+
|
|
256
|
+
# Collect preview of streaming results for the WORKFLOW_END event
|
|
257
|
+
output_preview = []
|
|
253
258
|
|
|
254
259
|
async for m in self._entry_fn.astream(self._input_message, to_type=to_type): # type: ignore
|
|
260
|
+
if len(output_preview) < 50:
|
|
261
|
+
output_preview.append(m)
|
|
255
262
|
yield m
|
|
256
263
|
|
|
257
264
|
# Emit WORKFLOW_END
|
|
@@ -265,7 +272,8 @@ class Runner:
|
|
|
265
272
|
IntermediateStepPayload(UUID=workflow_step_uuid,
|
|
266
273
|
event_type=IntermediateStepType.WORKFLOW_END,
|
|
267
274
|
name=workflow_name,
|
|
268
|
-
metadata=end_metadata
|
|
275
|
+
metadata=end_metadata,
|
|
276
|
+
data=StreamEventData(output=output_preview)))
|
|
269
277
|
self._state = RunnerState.COMPLETED
|
|
270
278
|
|
|
271
279
|
# Close the intermediate stream
|
nat/utils/string_utils.py
CHANGED
|
@@ -36,3 +36,19 @@ def convert_to_str(value: Any) -> str:
|
|
|
36
36
|
return str(value)
|
|
37
37
|
else:
|
|
38
38
|
raise ValueError(f"Unsupported type for conversion to string: {type(value)}")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def truncate_string(text: str | None, max_length: int = 100) -> str | None:
|
|
42
|
+
"""
|
|
43
|
+
Truncate a string to a maximum length, adding ellipsis if truncated.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
text: The text to truncate (can be None)
|
|
47
|
+
max_length: Maximum allowed length (default: 100)
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
The truncated text with ellipsis if needed, or None if input was None
|
|
51
|
+
"""
|
|
52
|
+
if not text or len(text) <= max_length:
|
|
53
|
+
return text
|
|
54
|
+
return text[:max_length - 3] + "..."
|
|
@@ -410,7 +410,7 @@ nat/retriever/nemo_retriever/register.py,sha256=3XdrvEJzX2Zc8wpdm__4YYlEWBW-FK3t
|
|
|
410
410
|
nat/retriever/nemo_retriever/retriever.py,sha256=gi3_qJFqE-iqRh3of_cmJg-SwzaQ3z24zA9LwY_MSLY,6930
|
|
411
411
|
nat/runtime/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
412
412
|
nat/runtime/loader.py,sha256=obUdAgZVYCPGC0R8u3wcoKFJzzSPQgJvrbU4OWygtog,7953
|
|
413
|
-
nat/runtime/runner.py,sha256=
|
|
413
|
+
nat/runtime/runner.py,sha256=oOz0m6Hx_jPISo56GgzrnRxIeiewboLaGmNyHYzxVrY,12228
|
|
414
414
|
nat/runtime/session.py,sha256=E8RTbnAhPbY5KCoSfiHzOJksmBh7xWjsoX0BC7Rn1ck,9101
|
|
415
415
|
nat/runtime/user_metadata.py,sha256=ce37NRYJWnMOWk6A7VAQ1GQztjMmkhMOq-uYf2gNCwo,3692
|
|
416
416
|
nat/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -452,7 +452,7 @@ nat/utils/metadata_utils.py,sha256=BSsiB6jIWd8oEuEynJi55qCG762UuTYFaiUH0OT9HdY,2
|
|
|
452
452
|
nat/utils/optional_imports.py,sha256=jQSVBc2fBSRw-2d6r8cEwvh5-di2EUUPakuuo9QbbwA,4039
|
|
453
453
|
nat/utils/producer_consumer_queue.py,sha256=AcSYkAMBxLx06A5Xdy960PP3AJ7YaSPGJ7rbN_hJsjI,6599
|
|
454
454
|
nat/utils/responses_api.py,sha256=ivJMEtD3AYJVGF3hUzYxddT17r6XdXkke_6AoQ9oi60,1202
|
|
455
|
-
nat/utils/string_utils.py,sha256=
|
|
455
|
+
nat/utils/string_utils.py,sha256=WL1URqyuqScaZITwCAq45UusFQAj1cHWH0CWfx0tNE0,1897
|
|
456
456
|
nat/utils/type_converter.py,sha256=vDZzrZ9ycWgZJdkWB1sHB2ivZX-E8fPfkrB-vAAxroI,10968
|
|
457
457
|
nat/utils/type_utils.py,sha256=SMo5hM4dKf2G3U_0J0wvdFX6-lzMVSh8vd-W34Oixow,14836
|
|
458
458
|
nat/utils/url_utils.py,sha256=UzDP_xaS6brWTu7vAws0B4jZyrITIK9Si3U6pZBZqDE,1028
|
|
@@ -475,10 +475,10 @@ nat/utils/reactive/base/observer_base.py,sha256=6BiQfx26EMumotJ3KoVcdmFBYR_fnAss
|
|
|
475
475
|
nat/utils/reactive/base/subject_base.py,sha256=UQOxlkZTIeeyYmG5qLtDpNf_63Y7p-doEeUA08_R8ME,2521
|
|
476
476
|
nat/utils/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
477
477
|
nat/utils/settings/global_settings.py,sha256=9JaO6pxKT_Pjw6rxJRsRlFCXdVKCl_xUKU2QHZQWWNM,7294
|
|
478
|
-
nvidia_nat-1.4.
|
|
479
|
-
nvidia_nat-1.4.
|
|
480
|
-
nvidia_nat-1.4.
|
|
481
|
-
nvidia_nat-1.4.
|
|
482
|
-
nvidia_nat-1.4.
|
|
483
|
-
nvidia_nat-1.4.
|
|
484
|
-
nvidia_nat-1.4.
|
|
478
|
+
nvidia_nat-1.4.0a20251022.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
479
|
+
nvidia_nat-1.4.0a20251022.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
480
|
+
nvidia_nat-1.4.0a20251022.dist-info/METADATA,sha256=NldY0zKIMTTaZx8RuGQEXvKgtARWXFpy-ZgtGn5I0SM,10248
|
|
481
|
+
nvidia_nat-1.4.0a20251022.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
482
|
+
nvidia_nat-1.4.0a20251022.dist-info/entry_points.txt,sha256=4jCqjyETMpyoWbCBf4GalZU8I_wbstpzwQNezdAVbbo,698
|
|
483
|
+
nvidia_nat-1.4.0a20251022.dist-info/top_level.txt,sha256=lgJWLkigiVZuZ_O1nxVnD_ziYBwgpE2OStdaCduMEGc,8
|
|
484
|
+
nvidia_nat-1.4.0a20251022.dist-info/RECORD,,
|
|
File without changes
|
{nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{nvidia_nat-1.4.0a20251021.dist-info → nvidia_nat-1.4.0a20251022.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|
|
File without changes
|