composio-openai-agents 1.0.0rc4__py3-none-any.whl → 1.0.0rc6__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.
@@ -1,7 +1,3 @@
1
1
  from composio_openai_agents.provider import OpenAIAgentsProvider
2
2
 
3
-
4
-
5
- __all__ = (
6
- "OpenAIAgentsProvider",
7
- )
3
+ __all__ = ("OpenAIAgentsProvider",)
@@ -1,16 +1,13 @@
1
- import json
2
1
  import asyncio
2
+ import json
3
3
  import typing as t
4
- from inspect import Signature
5
- from typing import List, cast
6
4
 
7
5
  import pydantic
8
- import pydantic.error_wrappers
9
- from agents import FunctionTool, Tool
6
+ from agents import FunctionTool
10
7
 
8
+ from composio.core.provider import AgenticProvider
11
9
  from composio.core.provider.agentic import AgenticProviderExecuteFn
12
10
  from composio.types import Tool
13
- from composio.core.provider import AgenticProvider
14
11
  from composio.utils.pydantic import parse_pydantic_error
15
12
 
16
13
 
@@ -21,9 +18,7 @@ def _remove_examples_from_schema(schema_obj: t.Dict[str, t.Any]) -> None:
21
18
  schema, including nested ones. Also ensure that any 'items' object has a 'type' key.
22
19
  """
23
20
  # Handle properties directly
24
- if "properties" in schema_obj and isinstance(
25
- schema_obj["properties"], dict
26
- ):
21
+ if "properties" in schema_obj and isinstance(schema_obj["properties"], dict):
27
22
  for _, prop_value in schema_obj["properties"].items():
28
23
  if isinstance(prop_value, dict):
29
24
  # Remove examples, pattern, and default from this property
@@ -35,9 +30,7 @@ def _remove_examples_from_schema(schema_obj: t.Dict[str, t.Any]) -> None:
35
30
  del prop_value["default"]
36
31
 
37
32
  # Ensure 'items' has a 'type' key
38
- if "items" in prop_value and isinstance(
39
- prop_value["items"], dict
40
- ):
33
+ if "items" in prop_value and isinstance(prop_value["items"], dict):
41
34
  if "type" not in prop_value["items"]:
42
35
  # Default to string type for items if not specified
43
36
  prop_value["items"]["type"] = "string"
@@ -67,6 +60,7 @@ def _remove_examples_from_schema(schema_obj: t.Dict[str, t.Any]) -> None:
67
60
  if isinstance(item, dict):
68
61
  _remove_examples_from_schema(item)
69
62
 
63
+
70
64
  class OpenAIAgentsProvider(
71
65
  AgenticProvider[FunctionTool, list[FunctionTool]],
72
66
  name="openai_agents",
@@ -81,6 +75,7 @@ class OpenAIAgentsProvider(
81
75
  execute_tool: AgenticProviderExecuteFn,
82
76
  ) -> FunctionTool:
83
77
  """Wrap a tool as a FunctionTool."""
78
+
84
79
  # Create a function that accepts explicit JSON string for parameters
85
80
  # This avoids the issue with **kwargs in schema validation
86
81
  async def execute_tool_wrapper(_ctx, payload):
File without changes
@@ -1,16 +1,21 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: composio-openai-agents
3
- Version: 1.0.0rc4
3
+ Version: 1.0.0rc6
4
4
  Summary: Use Composio to get array of strongly typed tools for OpenAI Agents
5
- Project-URL: Homepage, https://github.com/ComposioHQ/composio
5
+ Home-page: https://github.com/ComposioHQ/composio
6
+ Author: Composio
6
7
  Author-email: Composio <tech@composio.dev>
8
+ Project-URL: Homepage, https://github.com/ComposioHQ/composio
9
+ Classifier: Programming Language :: Python :: 3
7
10
  Classifier: License :: OSI Approved :: Apache Software License
8
11
  Classifier: Operating System :: OS Independent
9
- Classifier: Programming Language :: Python :: 3
10
- Requires-Python: <4,>=3.9
11
- Requires-Dist: composio
12
- Requires-Dist: openai-agents>=0.0.3
12
+ Requires-Python: >=3.9,<4
13
13
  Description-Content-Type: text/markdown
14
+ Requires-Dist: openai-agents>=0.0.3
15
+ Requires-Dist: composio
16
+ Dynamic: author
17
+ Dynamic: home-page
18
+ Dynamic: requires-python
14
19
 
15
20
  # Composio Integration for OpenAI Agents
16
21
 
@@ -71,4 +76,4 @@ asyncio.run(main())
71
76
 
72
77
  ## License
73
78
 
74
- Apache 2.0
79
+ Apache 2.0
@@ -0,0 +1,7 @@
1
+ composio_openai_agents/__init__.py,sha256=gZTRYE8OFyATLeE3SVgNRMtBN1_lRfZznldg2roexJQ,102
2
+ composio_openai_agents/provider.py,sha256=hcOdeMkrrnR2ATksqjhYuJFS43mKySyVFf_-1V1GEMU,5265
3
+ composio_openai_agents/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ composio_openai_agents-1.0.0rc6.dist-info/METADATA,sha256=dCDLByv8KdFuVkk8GTZcJdotQdf2wNKnO_us9L_Jv9g,2064
5
+ composio_openai_agents-1.0.0rc6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ composio_openai_agents-1.0.0rc6.dist-info/top_level.txt,sha256=_YKpUJOoiq4jzAZX0LC2SfaYhsCOcyNcoK9lbK5uWQw,23
7
+ composio_openai_agents-1.0.0rc6.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ composio_openai_agents
@@ -1,5 +0,0 @@
1
- composio_openai_agents/__init__.py,sha256=9AhhdbI4L3skTl1i9t8_enhpmh2OYitDnfAxP0R9il4,110
2
- composio_openai_agents/provider.py,sha256=ylijMtq-Q5iK4_7FVNUZ0yteqTr-X7VC0nJGi3XguSc,5412
3
- composio_openai_agents-1.0.0rc4.dist-info/METADATA,sha256=1kKiHJQAjy1KQWWvABdmjwz-g4aCY49Ta1w98-CE9yQ,1936
4
- composio_openai_agents-1.0.0rc4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- composio_openai_agents-1.0.0rc4.dist-info/RECORD,,