inferencesh 0.4.3__tar.gz → 0.4.4__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.3/src/inferencesh.egg-info → inferencesh-0.4.4}/PKG-INFO +1 -1
- {inferencesh-0.4.3 → inferencesh-0.4.4}/pyproject.toml +1 -1
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/base.py +11 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/llm.py +3 -1
- {inferencesh-0.4.3 → inferencesh-0.4.4/src/inferencesh.egg-info}/PKG-INFO +1 -1
- {inferencesh-0.4.3 → inferencesh-0.4.4}/LICENSE +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/README.md +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/setup.cfg +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/__init__.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/client.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/__init__.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/file.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/utils/__init__.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/utils/download.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/utils/storage.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/SOURCES.txt +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/dependency_links.txt +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/entry_points.txt +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/requires.txt +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/top_level.txt +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/tests/test_client.py +0 -0
- {inferencesh-0.4.3 → inferencesh-0.4.4}/tests/test_sdk.py +0 -0
|
@@ -7,6 +7,17 @@ from collections import OrderedDict
|
|
|
7
7
|
from inferencesh.models.file import File
|
|
8
8
|
from pydantic import Field
|
|
9
9
|
|
|
10
|
+
class Metadata(BaseModel):
|
|
11
|
+
app_id: Optional[str] = None
|
|
12
|
+
app_version_id: Optional[str] = None
|
|
13
|
+
app_variant: Optional[str] = None
|
|
14
|
+
worker_id: Optional[str] = None
|
|
15
|
+
def update(self, other: Dict[str, Any] | BaseModel) -> None:
|
|
16
|
+
update_dict = other.model_dump() if isinstance(other, BaseModel) else other
|
|
17
|
+
for key, value in update_dict.items():
|
|
18
|
+
setattr(self, key, value)
|
|
19
|
+
class Config:
|
|
20
|
+
extra = "allow"
|
|
10
21
|
|
|
11
22
|
class OrderedSchemaModel(BaseModel):
|
|
12
23
|
"""A base model that ensures the JSON schema properties and required fields are in the order of field definition."""
|
|
@@ -584,6 +584,7 @@ def stream_generate(
|
|
|
584
584
|
stop: Optional[List[str]] = None,
|
|
585
585
|
verbose: bool = False,
|
|
586
586
|
output_cls: type[BaseLLMOutput] = LLMOutput,
|
|
587
|
+
kwargs: Optional[Dict[str, Any]] = None,
|
|
587
588
|
) -> Generator[BaseLLMOutput, None, None]:
|
|
588
589
|
"""Stream generate from LLaMA.cpp model with timing and usage tracking."""
|
|
589
590
|
|
|
@@ -604,7 +605,8 @@ def stream_generate(
|
|
|
604
605
|
"stream": True,
|
|
605
606
|
"temperature": temperature,
|
|
606
607
|
"top_p": top_p,
|
|
607
|
-
"stop": stop
|
|
608
|
+
"stop": stop,
|
|
609
|
+
**kwargs
|
|
608
610
|
}
|
|
609
611
|
if tools is not None:
|
|
610
612
|
completion_kwargs["tools"] = tools
|
|
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
|