mbxai 0.6.15__py3-none-any.whl → 0.6.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.
mbxai/tools/types.py
CHANGED
@@ -54,21 +54,42 @@ class Tool(BaseModel):
|
|
54
54
|
input_schema = schema.get("$defs", {}).get(ref, {})
|
55
55
|
schema = input_schema
|
56
56
|
|
57
|
-
#
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
57
|
+
# Create a new schema object to ensure we have all required fields
|
58
|
+
strict_schema = {
|
59
|
+
"type": "object",
|
60
|
+
"properties": {},
|
61
|
+
"required": []
|
62
|
+
}
|
63
|
+
|
64
|
+
# Copy over properties, ensuring each has type and description
|
65
|
+
if "properties" in schema:
|
66
|
+
for prop_name, prop in schema["properties"].items():
|
67
|
+
# Create a new property object with required fields
|
68
|
+
new_prop = {
|
69
|
+
"type": prop.get("type", "string"),
|
70
|
+
"description": prop.get("description", f"The {prop_name} parameter")
|
71
|
+
}
|
72
|
+
|
73
|
+
# Copy over any additional fields that might be useful
|
74
|
+
for key, value in prop.items():
|
75
|
+
if key not in new_prop:
|
76
|
+
new_prop[key] = value
|
77
|
+
|
78
|
+
strict_schema["properties"][prop_name] = new_prop
|
79
|
+
|
80
|
+
# Copy over required fields
|
81
|
+
if "required" in schema:
|
82
|
+
strict_schema["required"] = schema["required"]
|
83
|
+
|
84
|
+
# Ensure all required fields are actually in properties
|
85
|
+
strict_schema["required"] = [
|
86
|
+
req for req in strict_schema["required"]
|
87
|
+
if req in strict_schema["properties"]
|
88
|
+
]
|
66
89
|
|
67
|
-
#
|
68
|
-
for
|
69
|
-
if
|
70
|
-
|
71
|
-
if "description" not in prop:
|
72
|
-
prop["description"] = f"The {prop_name} parameter"
|
90
|
+
# Add any additional fields from the original schema
|
91
|
+
for key, value in schema.items():
|
92
|
+
if key not in strict_schema:
|
93
|
+
strict_schema[key] = value
|
73
94
|
|
74
|
-
return
|
95
|
+
return strict_schema
|
@@ -11,8 +11,8 @@ mbxai/openrouter/models.py,sha256=b3IjjtZAjeGOf2rLsdnCD1HacjTnS8jmv_ZXorc-KJQ,26
|
|
11
11
|
mbxai/tools/__init__.py,sha256=QUFaXhDm-UKcuAtT1rbKzhBkvyRBVokcQIOf9cxIuwc,160
|
12
12
|
mbxai/tools/client.py,sha256=qOf8MiQ8_flPUNiMioOyjeEaV8rN1EBWb98T8qTC3D4,17582
|
13
13
|
mbxai/tools/example.py,sha256=1HgKK39zzUuwFbnp3f0ThyWVfA_8P28PZcTwaUw5K78,2232
|
14
|
-
mbxai/tools/types.py,sha256=
|
15
|
-
mbxai-0.6.
|
16
|
-
mbxai-0.6.
|
17
|
-
mbxai-0.6.
|
18
|
-
mbxai-0.6.
|
14
|
+
mbxai/tools/types.py,sha256=pFSV59rebWASnIQb27wVg1kFYbCGZmPlOjrLNfNuvrc,3245
|
15
|
+
mbxai-0.6.16.dist-info/METADATA,sha256=d9Bpi8hqAYZZRz301NfXWU7A-50ZWSZqMTfbxvcMUbw,4108
|
16
|
+
mbxai-0.6.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
mbxai-0.6.16.dist-info/licenses/LICENSE,sha256=hEyhc4FxwYo3NQ40yNgZ7STqwVk-1_XcTXOnAPbGJAw,1069
|
18
|
+
mbxai-0.6.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|