lm-deluge 0.0.64__py3-none-any.whl → 0.0.65__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 lm-deluge might be problematic. Click here for more details.

lm_deluge/tool.py CHANGED
@@ -602,7 +602,8 @@ class Tool(BaseModel):
602
602
  def _add_additional_properties_recursive(
603
603
  schema: dict | list | Any, remove_defaults: bool = False
604
604
  ) -> dict | list | Any:
605
- """Recursively add additionalProperties: false to all object-type schemas."""
605
+ """Recursively add additionalProperties: false to all object-type schemas.
606
+ In strict mode (when remove_defaults=True), also makes all properties required."""
606
607
  if isinstance(schema, dict):
607
608
  # Copy the dictionary to avoid modifying the original
608
609
  new_schema = schema.copy()
@@ -618,6 +619,10 @@ class Tool(BaseModel):
618
619
  if new_schema.get("type") == "object":
619
620
  new_schema["additionalProperties"] = False
620
621
 
622
+ # In strict mode, all properties must be required
623
+ if remove_defaults and "properties" in new_schema:
624
+ new_schema["required"] = list(new_schema["properties"].keys())
625
+
621
626
  # Remove default values if requested (for strict mode)
622
627
  if remove_defaults and "default" in new_schema:
623
628
  del new_schema["default"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lm_deluge
3
- Version: 0.0.64
3
+ Version: 0.0.65
4
4
  Summary: Python utility for using LLM API models.
5
5
  Author-email: Benjamin Anderson <ben@trytaylor.ai>
6
6
  Requires-Python: >=3.10
@@ -11,7 +11,7 @@ lm_deluge/image.py,sha256=5AMXmn2x47yXeYNfMSMAOWcnlrOxxOel-4L8QCJwU70,8928
11
11
  lm_deluge/prompt.py,sha256=RsKgvAbcG_-cHfgR9pyrl9tEIo7rIlVxlPpCgZbbj3E,63005
12
12
  lm_deluge/request_context.py,sha256=cBayMFWupWhde2OjRugW3JH-Gin-WFGc6DK2Mb4Prdc,2576
13
13
  lm_deluge/rerank.py,sha256=-NBAJdHz9OB-SWWJnHzkFmeVO4wR6lFV7Vw-SxG7aVo,11457
14
- lm_deluge/tool.py,sha256=9VJp8RLXXCYRNytSx3c7P7QW6nWo9fRAmSTviwEKFPg,28588
14
+ lm_deluge/tool.py,sha256=Kp2O5lDq_WVo_ASxjLQSHzVRbaxZkS6J0JIIskBjux0,28909
15
15
  lm_deluge/tracker.py,sha256=aeS9GUJpgOSQRVXAnGDvlMO8qYpSxpTNLYj2hrMg0m8,14757
16
16
  lm_deluge/usage.py,sha256=xz9tAw2hqaJvv9aAVhnQ6N1Arn7fS8Shb28VwCW26wI,5136
17
17
  lm_deluge/warnings.py,sha256=nlDJMCw30VhDEFxqLO2-bfXH_Tv5qmlglzUSbokCSw8,1498
@@ -65,8 +65,8 @@ lm_deluge/util/logprobs.py,sha256=UkBZakOxWluaLqHrjARu7xnJ0uCHVfLGHJdnYlEcutk,11
65
65
  lm_deluge/util/spatial.py,sha256=BsF_UKhE-x0xBirc-bV1xSKZRTUhsOBdGqsMKme20C8,4099
66
66
  lm_deluge/util/validation.py,sha256=hz5dDb3ebvZrZhnaWxOxbNSVMI6nmaOODBkk0htAUhs,1575
67
67
  lm_deluge/util/xml.py,sha256=Ft4zajoYBJR3HHCt2oHwGfymGLdvp_gegVmJ-Wqk4Ck,10547
68
- lm_deluge-0.0.64.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
69
- lm_deluge-0.0.64.dist-info/METADATA,sha256=2nIYMRTK6gYHd4T98ePgG-OJWqMWkHfM0THgz8PHyHw,13443
70
- lm_deluge-0.0.64.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
- lm_deluge-0.0.64.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
72
- lm_deluge-0.0.64.dist-info/RECORD,,
68
+ lm_deluge-0.0.65.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
69
+ lm_deluge-0.0.65.dist-info/METADATA,sha256=zor34vGq-ZDgO7iKHOjf-pDqym6ADGXBIjVAPYOV0PI,13443
70
+ lm_deluge-0.0.65.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
+ lm_deluge-0.0.65.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
72
+ lm_deluge-0.0.65.dist-info/RECORD,,