inferencesh 0.2.20__tar.gz → 0.2.21__tar.gz
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.
Potentially problematic release.
This version of inferencesh might be problematic. Click here for more details.
- {inferencesh-0.2.20/src/inferencesh.egg-info → inferencesh-0.2.21}/PKG-INFO +1 -1
- {inferencesh-0.2.20 → inferencesh-0.2.21}/pyproject.toml +1 -1
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/models/llm.py +9 -3
- {inferencesh-0.2.20 → inferencesh-0.2.21/src/inferencesh.egg-info}/PKG-INFO +1 -1
- {inferencesh-0.2.20 → inferencesh-0.2.21}/LICENSE +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/README.md +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/setup.cfg +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/setup.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/__init__.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/models/__init__.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/models/base.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/models/file.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/utils/__init__.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/utils/download.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh/utils/storage.py +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh.egg-info/SOURCES.txt +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh.egg-info/dependency_links.txt +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh.egg-info/entry_points.txt +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh.egg-info/requires.txt +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/src/inferencesh.egg-info/top_level.txt +0 -0
- {inferencesh-0.2.20 → inferencesh-0.2.21}/tests/test_sdk.py +0 -0
|
@@ -416,7 +416,7 @@ def stream_generate(
|
|
|
416
416
|
if "message" in delta:
|
|
417
417
|
message = delta["message"]
|
|
418
418
|
content = message.get("content", "")
|
|
419
|
-
if "tool_calls"
|
|
419
|
+
if message.get("tool_calls"):
|
|
420
420
|
for tool in message["tool_calls"]:
|
|
421
421
|
if tool.get("id") not in {t.get("id") for t in tool_calls}:
|
|
422
422
|
tool_calls.append(tool)
|
|
@@ -426,7 +426,7 @@ def stream_generate(
|
|
|
426
426
|
content = delta_content.get("content", "")
|
|
427
427
|
|
|
428
428
|
# Handle streaming tool calls
|
|
429
|
-
if "tool_calls"
|
|
429
|
+
if delta_content.get("tool_calls"):
|
|
430
430
|
for tool_delta in delta_content["tool_calls"]:
|
|
431
431
|
tool_id = tool_delta.get("id")
|
|
432
432
|
|
|
@@ -451,7 +451,13 @@ def stream_generate(
|
|
|
451
451
|
|
|
452
452
|
finish_reason = delta.get("finish_reason")
|
|
453
453
|
|
|
454
|
-
|
|
454
|
+
has_update = bool(content)
|
|
455
|
+
has_tool_update = bool(
|
|
456
|
+
(delta.get("message", {}) or {}).get("tool_calls") or
|
|
457
|
+
(delta.get("delta", {}) or {}).get("tool_calls")
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
if has_update or has_tool_update:
|
|
455
461
|
if not timing.first_token_time:
|
|
456
462
|
timing.mark_first_token()
|
|
457
463
|
response_queue.put((content, {}, tool_calls[:] if tool_calls else None))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|