inferencesh 0.4.17__tar.gz → 0.4.18__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.4.17/src/inferencesh.egg-info → inferencesh-0.4.18}/PKG-INFO +1 -1
- {inferencesh-0.4.17 → inferencesh-0.4.18}/pyproject.toml +1 -1
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/models/llm.py +4 -1
- {inferencesh-0.4.17 → inferencesh-0.4.18/src/inferencesh.egg-info}/PKG-INFO +1 -1
- {inferencesh-0.4.17 → inferencesh-0.4.18}/LICENSE +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/README.md +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/setup.cfg +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/__init__.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/client.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/models/__init__.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/models/base.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/models/file.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/utils/__init__.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/utils/download.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh/utils/storage.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh.egg-info/SOURCES.txt +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh.egg-info/dependency_links.txt +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh.egg-info/entry_points.txt +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh.egg-info/requires.txt +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/src/inferencesh.egg-info/top_level.txt +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/tests/test_client.py +0 -0
- {inferencesh-0.4.17 → inferencesh-0.4.18}/tests/test_sdk.py +0 -0
|
@@ -650,6 +650,7 @@ def stream_generate(
|
|
|
650
650
|
last_activity = time.time()
|
|
651
651
|
init_timeout = 30.0 # 30 seconds for initial response
|
|
652
652
|
chunk_timeout = 10.0 # 10 seconds between chunks
|
|
653
|
+
chunks_begun = False
|
|
653
654
|
|
|
654
655
|
try:
|
|
655
656
|
# Wait for initial setup
|
|
@@ -680,7 +681,7 @@ def stream_generate(
|
|
|
680
681
|
pass
|
|
681
682
|
|
|
682
683
|
# Check for timeout
|
|
683
|
-
if time.time() - last_activity > chunk_timeout:
|
|
684
|
+
if chunks_begun and time.time() - last_activity > chunk_timeout:
|
|
684
685
|
raise RuntimeError(f"No response from model for {chunk_timeout} seconds")
|
|
685
686
|
|
|
686
687
|
# Get next chunk
|
|
@@ -705,6 +706,8 @@ def stream_generate(
|
|
|
705
706
|
if not timing.first_token_time:
|
|
706
707
|
timing.mark_first_token()
|
|
707
708
|
|
|
709
|
+
chunks_begun = True
|
|
710
|
+
|
|
708
711
|
# Update response state from chunk
|
|
709
712
|
response.update_from_chunk(chunk, timing)
|
|
710
713
|
|
|
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
|
|
File without changes
|