inferencesh 0.4.15__py3-none-any.whl → 0.4.16__py3-none-any.whl

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/client.py CHANGED
@@ -366,7 +366,8 @@ class Inference:
366
366
  task_id = task["id"]
367
367
 
368
368
  # Stream updates
369
- for update in client.run(params, stream=True):
369
+ stream = client.run(params, stream=True)
370
+ for update in stream:
370
371
  print(f"Status: {update.get('status')}")
371
372
  if update.get('status') == TaskStatus.COMPLETED:
372
373
  print(f"Result: {update.get('output')}")
@@ -794,7 +795,8 @@ class AsyncInference:
794
795
  task_id = task["id"]
795
796
 
796
797
  # Stream updates
797
- async for update in await client.run(params, stream=True):
798
+ stream = await client.run(params, stream=True)
799
+ for update in stream:
798
800
  print(f"Status: {update.get('status')}")
799
801
  if update.get('status') == TaskStatus.COMPLETED:
800
802
  print(f"Result: {update.get('output')}")
@@ -266,11 +266,15 @@ class File(BaseModel):
266
266
  ) -> dict[str, Any]:
267
267
  """Generate a simple JSON schema that accepts either a string or an object"""
268
268
  json_schema = handler(schema)
269
- # Don't resolve refs here - that's what was causing the recursion
269
+ if "$ref" in json_schema:
270
+ # If we got a ref, resolve it to the actual schema
271
+ json_schema = handler.resolve_ref_schema(json_schema)
272
+
273
+ # Add string as an alternative without recursion
270
274
  return {
271
275
  "$id": "/schemas/File",
272
276
  "oneOf": [
273
- json_schema,
277
+ {k: v for k, v in json_schema.items() if k != "$ref"}, # Remove any $ref to prevent recursion
274
278
  {"type": "string"}
275
279
  ]
276
280
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inferencesh
3
- Version: 0.4.15
3
+ Version: 0.4.16
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
@@ -1,15 +1,15 @@
1
1
  inferencesh/__init__.py,sha256=dY3l3yCkWoMtGX0gNXgxFnrprFRl6PPWjH8V7Qedx5g,772
2
- inferencesh/client.py,sha256=6wTCLqLq-QapvjCjMg8ZE3BQyg8iTL8hv8UU7t-oxmE,39360
2
+ inferencesh/client.py,sha256=sMgr6vVPD84P3LpQfjmuKqlRpbgOUmWLFQ9IJM5kWzc,39410
3
3
  inferencesh/models/__init__.py,sha256=FDwcdtT6c4hbRitymjmN-hZMlQa8RbKSftkZZyjtUXA,536
4
4
  inferencesh/models/base.py,sha256=eTwRvXAjMGh6b8AUXWKSGpRyeScAkPs6bNYY8AXKSz8,5505
5
- inferencesh/models/file.py,sha256=35bnHcBB4Whi7Pg7HcmKUSm2FhRO6RPbmgXfhT0Op6Y,11506
5
+ inferencesh/models/file.py,sha256=H4s-A2RWfNTMCcLqSLpqNHvGfSvYEnbZaJj-rWftrL0,11743
6
6
  inferencesh/models/llm.py,sha256=N5eP549tWYh5qlbAwMbMTcHwx-bET7OCvxJ2SlSLfVk,27948
7
7
  inferencesh/utils/__init__.py,sha256=-xiD6uo2XzcrPAWFb_fUbaimmnW4KFKc-8IvBzaxNd4,148
8
8
  inferencesh/utils/download.py,sha256=DRGBudiPVa5bDS35KfR-DYeGRk7gO03WOelnisecwMo,1815
9
9
  inferencesh/utils/storage.py,sha256=E4J8emd4eFKdmdDgAqzz3TpaaDd3n0l8gYlMHuY8yIU,519
10
- inferencesh-0.4.15.dist-info/licenses/LICENSE,sha256=OsgqEWIh2el_QMj0y8O1A5Q5Dl-dxqqYbFE6fszuR4s,1086
11
- inferencesh-0.4.15.dist-info/METADATA,sha256=DRHSLO6_-kedTgY0KBsZlPts1AfWL0bwie36dJkPKS0,5406
12
- inferencesh-0.4.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- inferencesh-0.4.15.dist-info/entry_points.txt,sha256=6IC-fyozAqW3ljsMLGCXxJ0_ui2Jb-2fLHtoH1RTnEE,45
14
- inferencesh-0.4.15.dist-info/top_level.txt,sha256=TSMHg3T1ThMl1HGAWmzBClwOYH1ump5neof9BfHIwaA,12
15
- inferencesh-0.4.15.dist-info/RECORD,,
10
+ inferencesh-0.4.16.dist-info/licenses/LICENSE,sha256=OsgqEWIh2el_QMj0y8O1A5Q5Dl-dxqqYbFE6fszuR4s,1086
11
+ inferencesh-0.4.16.dist-info/METADATA,sha256=uGxSDfljhrZy_IQG83Y9E09gbuu-cbNSikBP7TjI9rI,5406
12
+ inferencesh-0.4.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
+ inferencesh-0.4.16.dist-info/entry_points.txt,sha256=6IC-fyozAqW3ljsMLGCXxJ0_ui2Jb-2fLHtoH1RTnEE,45
14
+ inferencesh-0.4.16.dist-info/top_level.txt,sha256=TSMHg3T1ThMl1HGAWmzBClwOYH1ump5neof9BfHIwaA,12
15
+ inferencesh-0.4.16.dist-info/RECORD,,