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.

Files changed (22) hide show
  1. {inferencesh-0.4.3/src/inferencesh.egg-info → inferencesh-0.4.4}/PKG-INFO +1 -1
  2. {inferencesh-0.4.3 → inferencesh-0.4.4}/pyproject.toml +1 -1
  3. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/base.py +11 -0
  4. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/llm.py +3 -1
  5. {inferencesh-0.4.3 → inferencesh-0.4.4/src/inferencesh.egg-info}/PKG-INFO +1 -1
  6. {inferencesh-0.4.3 → inferencesh-0.4.4}/LICENSE +0 -0
  7. {inferencesh-0.4.3 → inferencesh-0.4.4}/README.md +0 -0
  8. {inferencesh-0.4.3 → inferencesh-0.4.4}/setup.cfg +0 -0
  9. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/__init__.py +0 -0
  10. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/client.py +0 -0
  11. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/__init__.py +0 -0
  12. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/models/file.py +0 -0
  13. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/utils/__init__.py +0 -0
  14. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/utils/download.py +0 -0
  15. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh/utils/storage.py +0 -0
  16. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/SOURCES.txt +0 -0
  17. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/dependency_links.txt +0 -0
  18. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/entry_points.txt +0 -0
  19. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/requires.txt +0 -0
  20. {inferencesh-0.4.3 → inferencesh-0.4.4}/src/inferencesh.egg-info/top_level.txt +0 -0
  21. {inferencesh-0.4.3 → inferencesh-0.4.4}/tests/test_client.py +0 -0
  22. {inferencesh-0.4.3 → inferencesh-0.4.4}/tests/test_sdk.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inferencesh
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: inference.sh Python SDK
5
5
  Author-email: "Inference Shell Inc." <hello@inference.sh>
6
6
  Project-URL: Homepage, https://github.com/inference-sh/sdk
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "inferencesh"
7
- version = "0.4.3"
7
+ version = "0.4.4"
8
8
  description = "inference.sh Python SDK"
9
9
  authors = [
10
10
  {name = "Inference Shell Inc.", email = "hello@inference.sh"},
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inferencesh
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: inference.sh Python SDK
5
5
  Author-email: "Inference Shell Inc." <hello@inference.sh>
6
6
  Project-URL: Homepage, https://github.com/inference-sh/sdk
File without changes
File without changes
File without changes