agentic-blocks 0.1.11__tar.gz → 0.1.12__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentic-blocks
3
- Version: 0.1.11
3
+ Version: 0.1.12
4
4
  Summary: Simple building blocks for agentic AI systems with MCP client and conversation management
5
5
  Author-email: Magnus Bjelkenhed <bjelkenhed@gmail.com>
6
6
  License: MIT
@@ -14,7 +14,7 @@ agentic_blocks = []
14
14
 
15
15
  [project]
16
16
  name = "agentic-blocks"
17
- version = "0.1.11"
17
+ version = "0.1.12"
18
18
  description = "Simple building blocks for agentic AI systems with MCP client and conversation management"
19
19
  readme = "README.md"
20
20
  requires-python = ">=3.11"
@@ -18,16 +18,23 @@ def langchain_tool_to_openai_format(tool) -> Dict[str, Any]:
18
18
  """
19
19
  schema = tool.args_schema.model_json_schema()
20
20
 
21
+ # Build parameters object, including $defs if present
22
+ parameters = {
23
+ "type": "object",
24
+ "properties": schema.get("properties", {}),
25
+ "required": schema.get("required", [])
26
+ }
27
+
28
+ # Include $defs if present in the schema
29
+ if "$defs" in schema:
30
+ parameters["$defs"] = schema["$defs"]
31
+
21
32
  return {
22
33
  "type": "function",
23
34
  "function": {
24
35
  "name": schema.get("title", tool.name),
25
36
  "description": schema.get("description", ""),
26
- "parameters": {
27
- "type": "object",
28
- "properties": schema.get("properties", {}),
29
- "required": schema.get("required", [])
30
- }
37
+ "parameters": parameters
31
38
  }
32
39
  }
33
40
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentic-blocks
3
- Version: 0.1.11
3
+ Version: 0.1.12
4
4
  Summary: Simple building blocks for agentic AI systems with MCP client and conversation management
5
5
  Author-email: Magnus Bjelkenhed <bjelkenhed@gmail.com>
6
6
  License: MIT
File without changes