meshagent-openai 0.0.39__py3-none-any.whl → 0.1.0__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 meshagent-openai might be problematic. Click here for more details.

@@ -108,33 +108,21 @@ class CompletionsToolBundle:
108
108
  async def execute(
109
109
  self, *, context: ToolContext, tool_call: ChatCompletionMessageToolCall
110
110
  ) -> Response:
111
- try:
112
- function = tool_call.function
113
- name = function.name
114
- arguments = json.loads(function.arguments)
115
-
116
- if name not in self._safe_names:
117
- raise RoomException(
118
- f"Invalid tool name {name}, check the name of the tool"
119
- )
111
+ function = tool_call.function
112
+ name = function.name
113
+ arguments = json.loads(function.arguments)
120
114
 
121
- name = self._safe_names[name]
115
+ if name not in self._safe_names:
116
+ raise RoomException(f"Invalid tool name {name}, check the name of the tool")
122
117
 
123
- if name not in self._executors:
124
- raise Exception(f"Unregistered tool name {name}")
118
+ name = self._safe_names[name]
125
119
 
126
- logger.info("executing %s %s %s", tool_call.id, name, arguments)
127
-
128
- proxy = self._executors[name]
129
- result = await proxy.execute(
130
- context=context, name=name, arguments=arguments
131
- )
132
- logger.info("success calling %s %s %s", tool_call.id, name, result)
133
- return result
120
+ if name not in self._executors:
121
+ raise Exception(f"Unregistered tool name {name}")
134
122
 
135
- except Exception as e:
136
- logger.error("failed calling %s %s", tool_call.id, name, exc_info=e)
137
- raise
123
+ proxy = self._executors[name]
124
+ result = await proxy.execute(context=context, name=name, arguments=arguments)
125
+ return result
138
126
 
139
127
  def contains(self, name: str) -> bool:
140
128
  return name in self._open_ai_tools
@@ -136,32 +136,20 @@ class ResponsesToolBundle:
136
136
  async def execute(
137
137
  self, *, context: ToolContext, tool_call: ResponseFunctionToolCall
138
138
  ) -> Response:
139
- try:
140
- name = tool_call.name
141
- arguments = json.loads(tool_call.arguments)
142
-
143
- if name not in self._safe_names:
144
- raise RoomException(
145
- f"Invalid tool name {name}, check the name of the tool"
146
- )
139
+ name = tool_call.name
140
+ arguments = json.loads(tool_call.arguments)
147
141
 
148
- name = self._safe_names[name]
142
+ if name not in self._safe_names:
143
+ raise RoomException(f"Invalid tool name {name}, check the name of the tool")
149
144
 
150
- if name not in self._executors:
151
- raise Exception(f"Unregistered tool name {name}")
145
+ name = self._safe_names[name]
152
146
 
153
- logger.info("executing %s %s %s", tool_call.id, name, arguments)
154
-
155
- proxy = self._executors[name]
156
- result = await proxy.execute(
157
- context=context, name=name, arguments=arguments
158
- )
159
- logger.info("success calling %s %s %s", tool_call.id, name, result)
160
- return ensure_response(result)
147
+ if name not in self._executors:
148
+ raise Exception(f"Unregistered tool name {name}")
161
149
 
162
- except Exception as e:
163
- logger.error("failed calling %s %s", tool_call.id, name, exc_info=e)
164
- raise
150
+ proxy = self._executors[name]
151
+ result = await proxy.execute(context=context, name=name, arguments=arguments)
152
+ return ensure_response(result)
165
153
 
166
154
  def get_tool(self, name: str) -> BaseTool | None:
167
155
  return self._tools_by_name.get(name, None)
@@ -1 +1 @@
1
- __version__ = "0.0.39"
1
+ __version__ = "0.1.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshagent-openai
3
- Version: 0.0.39
3
+ Version: 0.1.0
4
4
  Summary: OpenAI Building Blocks for Meshagent
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Documentation, https://docs.meshagent.com
@@ -13,9 +13,9 @@ Requires-Dist: pyjwt~=2.10
13
13
  Requires-Dist: pytest~=8.4
14
14
  Requires-Dist: pytest-asyncio~=0.26
15
15
  Requires-Dist: openai~=1.84
16
- Requires-Dist: meshagent-api~=0.0.39
17
- Requires-Dist: meshagent-agents~=0.0.39
18
- Requires-Dist: meshagent-tools~=0.0.39
16
+ Requires-Dist: meshagent-api~=0.1
17
+ Requires-Dist: meshagent-agents~=0.1
18
+ Requires-Dist: meshagent-tools~=0.1
19
19
  Dynamic: license-file
20
20
 
21
21
  ## MeshAgent OpenAI
@@ -0,0 +1,15 @@
1
+ meshagent/openai/__init__.py,sha256=g4RSQWfL2El6HQ8i2Aw8wwBEJVC861Z61S0GqkFnBys,369
2
+ meshagent/openai/version.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
3
+ meshagent/openai/proxy/__init__.py,sha256=PkOCHmUptsbuX5sNlWJk5bMxnSzyg5AZhPtooEPV7XE,54
4
+ meshagent/openai/proxy/proxy.py,sha256=EC9LMQ6iv8bWnoGVFx78Sx7C_oaCi8Oq4bcMagleTiY,845
5
+ meshagent/openai/tools/__init__.py,sha256=cLXoB9CBqKbCGhZMAJTIX6-yv_UO8AxpaH8vQQ1e8VY,467
6
+ meshagent/openai/tools/completions_adapter.py,sha256=uW1sNK9RZ1jCUq0z17zjGJ8XPh97ugXpoIGF-PGH-mY,16132
7
+ meshagent/openai/tools/responses_adapter.py,sha256=JjyrYbrQr-Q8M_fanAVZdE0lLZA39uVM60EB-wnyn64,64190
8
+ meshagent/openai/tools/schema.py,sha256=YaP0iEL9Lf2qS4xZy8VILjr1IS52XS9LEcn_cskNreo,10079
9
+ meshagent/openai/tools/stt.py,sha256=H3YusIjigJwxfEdkrK5qZ6DHbjQagaLNj7q_-fTfwy4,3845
10
+ meshagent/openai/tools/stt_test.py,sha256=XE4qZBlNeEWdJW5NjBGyaJmuCKN0ZLlJ2b_GBp7MzVk,2651
11
+ meshagent_openai-0.1.0.dist-info/licenses/LICENSE,sha256=eTt0SPW-sVNdkZe9PS_S8WfCIyLjRXRl7sUBWdlteFg,10254
12
+ meshagent_openai-0.1.0.dist-info/METADATA,sha256=UZVZl0mOY8_F3KocWnNQA52457ibvoK0V4HGwD0SXKA,2076
13
+ meshagent_openai-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ meshagent_openai-0.1.0.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
15
+ meshagent_openai-0.1.0.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- meshagent/openai/__init__.py,sha256=g4RSQWfL2El6HQ8i2Aw8wwBEJVC861Z61S0GqkFnBys,369
2
- meshagent/openai/version.py,sha256=rFnu2wT8xSk2KNzRssUju1l870Gz9DdJMfBB8jhzzO0,23
3
- meshagent/openai/proxy/__init__.py,sha256=PkOCHmUptsbuX5sNlWJk5bMxnSzyg5AZhPtooEPV7XE,54
4
- meshagent/openai/proxy/proxy.py,sha256=EC9LMQ6iv8bWnoGVFx78Sx7C_oaCi8Oq4bcMagleTiY,845
5
- meshagent/openai/tools/__init__.py,sha256=cLXoB9CBqKbCGhZMAJTIX6-yv_UO8AxpaH8vQQ1e8VY,467
6
- meshagent/openai/tools/completions_adapter.py,sha256=GEI0DcAnHH-FJBuWfxdd0xIseBDRq8szIT3n-mT0290,16546
7
- meshagent/openai/tools/responses_adapter.py,sha256=wBcsFTk1BedWXqxBbO5HCRzi42XhD4EeUCrruuRTQWE,64600
8
- meshagent/openai/tools/schema.py,sha256=YaP0iEL9Lf2qS4xZy8VILjr1IS52XS9LEcn_cskNreo,10079
9
- meshagent/openai/tools/stt.py,sha256=H3YusIjigJwxfEdkrK5qZ6DHbjQagaLNj7q_-fTfwy4,3845
10
- meshagent/openai/tools/stt_test.py,sha256=XE4qZBlNeEWdJW5NjBGyaJmuCKN0ZLlJ2b_GBp7MzVk,2651
11
- meshagent_openai-0.0.39.dist-info/licenses/LICENSE,sha256=eTt0SPW-sVNdkZe9PS_S8WfCIyLjRXRl7sUBWdlteFg,10254
12
- meshagent_openai-0.0.39.dist-info/METADATA,sha256=37wTox-wkI52gDoF9c_3NGQb1iVSJS4ggn9tTMANsGI,2086
13
- meshagent_openai-0.0.39.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- meshagent_openai-0.0.39.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
15
- meshagent_openai-0.0.39.dist-info/RECORD,,