mbxai 0.6.20__py3-none-any.whl → 0.6.22__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/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
  MBX AI package.
3
3
  """
4
4
 
5
- __version__ = "0.6.20"
5
+ __version__ = "0.6.22"
mbxai/mcp/client.py CHANGED
@@ -20,6 +20,7 @@ class MCPTool(Tool):
20
20
  input_schema: dict[str, Any]
21
21
  internal_url: str
22
22
  strict: bool = True
23
+ function: Callable[..., Any] | None = None # Make function optional during initialization
23
24
 
24
25
  def to_openai_function(self) -> dict[str, Any]:
25
26
  """Convert the tool to an OpenAI function definition."""
mbxai/mcp/server.py CHANGED
@@ -31,7 +31,7 @@ class MCPServer:
31
31
  self.app = FastAPI(
32
32
  title=self.name,
33
33
  description=self.description,
34
- version="0.6.20",
34
+ version="0.6.22",
35
35
  )
36
36
 
37
37
  # Initialize MCP server
mbxai/tools/types.py CHANGED
@@ -61,17 +61,12 @@ def convert_to_strict_schema(schema: dict[str, Any], strict: bool = True) -> dic
61
61
  # Copy over input properties
62
62
  if "properties" in input_schema:
63
63
  for prop_name, prop in input_schema["properties"].items():
64
- # Create a new property object with required fields
64
+ # Create a new property object with only allowed fields
65
65
  new_prop = {
66
66
  "type": prop.get("type", "string"),
67
67
  "description": prop.get("description", f"The {prop_name} parameter")
68
68
  }
69
69
 
70
- # Copy over any additional fields that might be useful
71
- for key, value in prop.items():
72
- if key not in new_prop:
73
- new_prop[key] = value
74
-
75
70
  input_prop_schema["properties"][prop_name] = new_prop
76
71
  logger.info(f"Added property {prop_name}: {json.dumps(new_prop, indent=2)}")
77
72
 
@@ -101,7 +96,7 @@ class Tool(BaseModel):
101
96
  """A tool that can be used by the model."""
102
97
  name: str
103
98
  description: str
104
- function: Callable[..., Any]
99
+ function: Callable[..., Any] | None = None # Make function optional
105
100
  schema: dict[str, Any]
106
101
 
107
102
  def to_openai_function(self) -> dict[str, Any]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbxai
3
- Version: 0.6.20
3
+ Version: 0.6.22
4
4
  Summary: MBX AI SDK
5
5
  Project-URL: Homepage, https://www.mibexx.de
6
6
  Project-URL: Documentation, https://www.mibexx.de
@@ -1,9 +1,9 @@
1
- mbxai/__init__.py,sha256=k5Jl-pIwvz4w-b1_h3wR6y9AzjIl18Pwd10AZN-l-rk,48
1
+ mbxai/__init__.py,sha256=yg4sZUYaTu5lJqkUoW6bkIZhWpjbkcSLbNTkfDhD_5I,48
2
2
  mbxai/core.py,sha256=WMvmU9TTa7M_m-qWsUew4xH8Ul6xseCZ2iBCXJTW-Bs,196
3
3
  mbxai/mcp/__init__.py,sha256=_ek9iYdYqW5saKetj4qDci11jxesQDiHPJRpHMKkxgU,175
4
- mbxai/mcp/client.py,sha256=UhrtsR13px-3MyfHvida5Eh_ou9-ofVexHkhMUEmYH8,7748
4
+ mbxai/mcp/client.py,sha256=EtgrKiTsHHeAzmnsYCOJMiu-i-k06kJZqR_L2bz91pw,7843
5
5
  mbxai/mcp/example.py,sha256=oaol7AvvZnX86JWNz64KvPjab5gg1VjVN3G8eFSzuaE,2350
6
- mbxai/mcp/server.py,sha256=65DvS6RyZ59tRThiFo_bCm3C_SbagGtzkTKEAh2JLLM,3463
6
+ mbxai/mcp/server.py,sha256=oFDL4CHXJxIpH1btcWTlxm4mLztfrY6X8cKI30HZxj0,3463
7
7
  mbxai/openrouter/__init__.py,sha256=Ito9Qp_B6q-RLGAQcYyTJVWwR2YAZvNqE-HIYXxhtD8,298
8
8
  mbxai/openrouter/client.py,sha256=nusxYObyLAMGQd6J9u2uLfkRXyE5kZmdIGdlU-76HPo,13529
9
9
  mbxai/openrouter/config.py,sha256=Ia93s-auim9Sq71eunVDbn9ET5xX2zusXpV4JBdHAzs,3251
@@ -11,8 +11,8 @@ mbxai/openrouter/models.py,sha256=b3IjjtZAjeGOf2rLsdnCD1HacjTnS8jmv_ZXorc-KJQ,26
11
11
  mbxai/tools/__init__.py,sha256=ogxrHvgJ7OR62Lmd5x9Eh5d2C0jqWyQis7Zy3yKpZ78,218
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=lAmy35IX04QV18Am8Ebd-0o6i34QU0vv82FaBYznu_E,4375
15
- mbxai-0.6.20.dist-info/METADATA,sha256=BQJaUY0ZGe924fILDvEIPefVaPPyu66BFSWZ9Rc-JS8,4148
16
- mbxai-0.6.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
- mbxai-0.6.20.dist-info/licenses/LICENSE,sha256=hEyhc4FxwYo3NQ40yNgZ7STqwVk-1_XcTXOnAPbGJAw,1069
18
- mbxai-0.6.20.dist-info/RECORD,,
14
+ mbxai/tools/types.py,sha256=iyoSnRwr_Anf7qBybAQ_-dqFnDmABmrtPpgef3R7PV0,4193
15
+ mbxai-0.6.22.dist-info/METADATA,sha256=sK-8ps0-u6T-8CaR8Rfgw1ZZ3wg7SI3On1ZwMQ7PQ2I,4148
16
+ mbxai-0.6.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
+ mbxai-0.6.22.dist-info/licenses/LICENSE,sha256=hEyhc4FxwYo3NQ40yNgZ7STqwVk-1_XcTXOnAPbGJAw,1069
18
+ mbxai-0.6.22.dist-info/RECORD,,
File without changes