inferencesh 0.4.18__tar.gz → 0.4.19__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.18/src/inferencesh.egg-info → inferencesh-0.4.19}/PKG-INFO +1 -1
  2. {inferencesh-0.4.18 → inferencesh-0.4.19}/pyproject.toml +1 -1
  3. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/models/llm.py +11 -2
  4. {inferencesh-0.4.18 → inferencesh-0.4.19/src/inferencesh.egg-info}/PKG-INFO +1 -1
  5. {inferencesh-0.4.18 → inferencesh-0.4.19}/LICENSE +0 -0
  6. {inferencesh-0.4.18 → inferencesh-0.4.19}/README.md +0 -0
  7. {inferencesh-0.4.18 → inferencesh-0.4.19}/setup.cfg +0 -0
  8. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/__init__.py +0 -0
  9. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/client.py +0 -0
  10. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/models/__init__.py +0 -0
  11. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/models/base.py +0 -0
  12. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/models/file.py +0 -0
  13. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/utils/__init__.py +0 -0
  14. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/utils/download.py +0 -0
  15. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh/utils/storage.py +0 -0
  16. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh.egg-info/SOURCES.txt +0 -0
  17. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh.egg-info/dependency_links.txt +0 -0
  18. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh.egg-info/entry_points.txt +0 -0
  19. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh.egg-info/requires.txt +0 -0
  20. {inferencesh-0.4.18 → inferencesh-0.4.19}/src/inferencesh.egg-info/top_level.txt +0 -0
  21. {inferencesh-0.4.18 → inferencesh-0.4.19}/tests/test_client.py +0 -0
  22. {inferencesh-0.4.18 → inferencesh-0.4.19}/tests/test_sdk.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inferencesh
3
- Version: 0.4.18
3
+ Version: 0.4.19
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.18"
7
+ version = "0.4.19"
8
8
  description = "inference.sh Python SDK"
9
9
  authors = [
10
10
  {name = "Inference Shell Inc.", email = "hello@inference.sh"},
@@ -21,7 +21,6 @@ class Message(BaseAppInput):
21
21
  role: ContextMessageRole
22
22
  content: str
23
23
 
24
-
25
24
  class ContextMessage(BaseAppInput):
26
25
  role: ContextMessageRole = Field(
27
26
  description="the role of the message. user, assistant, or system",
@@ -33,6 +32,10 @@ class ContextMessage(BaseAppInput):
33
32
  description="the image file of the message",
34
33
  default=None
35
34
  )
35
+ tool_calls: Optional[List[Dict[str, Any]]] = Field(
36
+ description="the tool calls of the message",
37
+ default=None
38
+ )
36
39
 
37
40
  class BaseLLMInput(BaseAppInput):
38
41
  """Base class with common LLM fields."""
@@ -53,8 +56,12 @@ class BaseLLMInput(BaseAppInput):
53
56
  ]
54
57
  ]
55
58
  )
59
+ role: ContextMessageRole = Field(
60
+ description="the role of the input text",
61
+ default=ContextMessageRole.USER
62
+ )
56
63
  text: str = Field(
57
- description="the user prompt to use for the model",
64
+ description="the input text to use for the model",
58
65
  examples=[
59
66
  "write a haiku about artificial general intelligence"
60
67
  ]
@@ -217,6 +224,8 @@ def build_messages(
217
224
  parts.append({"type": "image_url", "image_url": {"url": image_data_uri}})
218
225
  elif msg.image.uri:
219
226
  parts.append({"type": "image_url", "image_url": {"url": msg.image.uri}})
227
+ if msg.tool_calls:
228
+ parts.append({"type": "tool_call", "tool_calls": msg.tool_calls})
220
229
  if allow_multipart:
221
230
  return parts
222
231
  if len(parts) == 1 and parts[0]["type"] == "text":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inferencesh
3
- Version: 0.4.18
3
+ Version: 0.4.19
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