camel-ai 0.2.73a1__py3-none-any.whl → 0.2.73a3__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 camel-ai might be problematic. Click here for more details.
- camel/__init__.py +1 -1
- camel/agents/chat_agent.py +26 -1
- camel/toolkits/excel_toolkit.py +153 -64
- camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit.py +101 -1101
- camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit_ts.py +1177 -0
- camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js +46 -2
- camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py +76 -27
- camel/toolkits/hybrid_browser_toolkit_py/__init__.py +17 -0
- camel/toolkits/hybrid_browser_toolkit_py/actions.py +417 -0
- camel/toolkits/hybrid_browser_toolkit_py/agent.py +311 -0
- camel/toolkits/hybrid_browser_toolkit_py/browser_session.py +740 -0
- camel/toolkits/hybrid_browser_toolkit_py/config_loader.py +447 -0
- camel/toolkits/hybrid_browser_toolkit_py/hybrid_browser_toolkit.py +1994 -0
- camel/toolkits/hybrid_browser_toolkit_py/snapshot.py +227 -0
- camel/toolkits/hybrid_browser_toolkit_py/stealth_script.js +0 -0
- camel/toolkits/hybrid_browser_toolkit_py/unified_analyzer.js +1002 -0
- camel/toolkits/message_integration.py +174 -47
- camel/toolkits/slack_toolkit.py +38 -48
- {camel_ai-0.2.73a1.dist-info → camel_ai-0.2.73a3.dist-info}/METADATA +1 -1
- {camel_ai-0.2.73a1.dist-info → camel_ai-0.2.73a3.dist-info}/RECORD +22 -12
- {camel_ai-0.2.73a1.dist-info → camel_ai-0.2.73a3.dist-info}/WHEEL +0 -0
- {camel_ai-0.2.73a1.dist-info → camel_ai-0.2.73a3.dist-info}/licenses/LICENSE +0 -0
|
@@ -36,7 +36,7 @@ class ToolkitMessageIntegration:
|
|
|
36
36
|
>>> # Using default message handler with toolkit
|
|
37
37
|
>>> message_integration = ToolkitMessageIntegration()
|
|
38
38
|
>>> search_with_messaging = message_integration.
|
|
39
|
-
|
|
39
|
+
register_toolkits(
|
|
40
40
|
... SearchToolkit()
|
|
41
41
|
... )
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ class ToolkitMessageIntegration:
|
|
|
44
44
|
>>> def search_web(query: str) -> list:
|
|
45
45
|
... return ["result1", "result2"]
|
|
46
46
|
...
|
|
47
|
-
>>> enhanced_tools = message_integration.
|
|
47
|
+
>>> enhanced_tools = message_integration.register_functions
|
|
48
48
|
([search_web])
|
|
49
49
|
|
|
50
50
|
>>> # Using custom message handler with different parameters
|
|
@@ -148,7 +148,7 @@ class ToolkitMessageIntegration:
|
|
|
148
148
|
"""
|
|
149
149
|
return FunctionTool(self.send_message_to_user)
|
|
150
150
|
|
|
151
|
-
def
|
|
151
|
+
def register_toolkits(
|
|
152
152
|
self, toolkit: BaseToolkit, tool_names: Optional[List[str]] = None
|
|
153
153
|
) -> BaseToolkit:
|
|
154
154
|
r"""Add messaging capabilities to toolkit methods.
|
|
@@ -168,26 +168,72 @@ class ToolkitMessageIntegration:
|
|
|
168
168
|
Returns:
|
|
169
169
|
The toolkit with messaging capabilities added
|
|
170
170
|
"""
|
|
171
|
-
|
|
171
|
+
original_tools = toolkit.get_tools()
|
|
172
|
+
enhanced_methods = {}
|
|
173
|
+
for tool in original_tools:
|
|
174
|
+
method_name = tool.func.__name__
|
|
175
|
+
if tool_names is None or method_name in tool_names:
|
|
176
|
+
enhanced_func = self._add_messaging_to_tool(tool.func)
|
|
177
|
+
enhanced_methods[method_name] = enhanced_func
|
|
178
|
+
setattr(toolkit, method_name, enhanced_func)
|
|
179
|
+
original_get_tools_method = toolkit.get_tools
|
|
172
180
|
|
|
173
181
|
def enhanced_get_tools() -> List[FunctionTool]:
|
|
174
|
-
tools =
|
|
175
|
-
|
|
182
|
+
tools = []
|
|
183
|
+
for _, enhanced_method in enhanced_methods.items():
|
|
184
|
+
tools.append(FunctionTool(enhanced_method))
|
|
185
|
+
original_tools_list = original_get_tools_method()
|
|
186
|
+
for tool in original_tools_list:
|
|
187
|
+
if tool.func.__name__ not in enhanced_methods:
|
|
188
|
+
tools.append(tool)
|
|
176
189
|
|
|
177
|
-
|
|
178
|
-
if tool_names is None or tool.func.__name__ in tool_names:
|
|
179
|
-
enhanced_func = self._add_messaging_to_tool(tool.func)
|
|
180
|
-
enhanced_tools.append(FunctionTool(enhanced_func))
|
|
181
|
-
else:
|
|
182
|
-
enhanced_tools.append(tool)
|
|
183
|
-
|
|
184
|
-
return enhanced_tools
|
|
190
|
+
return tools
|
|
185
191
|
|
|
186
|
-
# Replace the get_tools method
|
|
187
192
|
toolkit.get_tools = enhanced_get_tools # type: ignore[method-assign]
|
|
193
|
+
|
|
194
|
+
# Also handle clone_for_new_session
|
|
195
|
+
# if it exists to ensure cloned toolkits
|
|
196
|
+
# also have message integration
|
|
197
|
+
if hasattr(toolkit, 'clone_for_new_session'):
|
|
198
|
+
original_clone_method = toolkit.clone_for_new_session
|
|
199
|
+
message_integration_instance = self
|
|
200
|
+
|
|
201
|
+
def enhanced_clone_for_new_session(new_session_id=None):
|
|
202
|
+
cloned_toolkit = original_clone_method(new_session_id)
|
|
203
|
+
return message_integration_instance.register_toolkits(
|
|
204
|
+
cloned_toolkit, tool_names
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
toolkit.clone_for_new_session = enhanced_clone_for_new_session
|
|
208
|
+
|
|
188
209
|
return toolkit
|
|
189
210
|
|
|
190
|
-
def
|
|
211
|
+
def _create_bound_method_wrapper(
|
|
212
|
+
self, enhanced_func: Callable, toolkit_instance
|
|
213
|
+
) -> Callable:
|
|
214
|
+
r"""Create a wrapper that mimics a bound method for _clone_tools.
|
|
215
|
+
|
|
216
|
+
This wrapper preserves the toolkit instance reference while maintaining
|
|
217
|
+
the enhanced messaging functionality.
|
|
218
|
+
"""
|
|
219
|
+
|
|
220
|
+
# Create a wrapper that appears as a bound method to _clone_tools
|
|
221
|
+
@wraps(enhanced_func)
|
|
222
|
+
def bound_method_wrapper(*args, **kwargs):
|
|
223
|
+
return enhanced_func(*args, **kwargs)
|
|
224
|
+
|
|
225
|
+
# Make it appear as a bound method by setting __self__
|
|
226
|
+
bound_method_wrapper.__self__ = toolkit_instance # type: ignore[attr-defined]
|
|
227
|
+
|
|
228
|
+
# Preserve other important attributes
|
|
229
|
+
if hasattr(enhanced_func, '__signature__'):
|
|
230
|
+
bound_method_wrapper.__signature__ = enhanced_func.__signature__ # type: ignore[attr-defined]
|
|
231
|
+
if hasattr(enhanced_func, '__doc__'):
|
|
232
|
+
bound_method_wrapper.__doc__ = enhanced_func.__doc__
|
|
233
|
+
|
|
234
|
+
return bound_method_wrapper
|
|
235
|
+
|
|
236
|
+
def register_functions(
|
|
191
237
|
self,
|
|
192
238
|
functions: Union[List[FunctionTool], List[Callable]],
|
|
193
239
|
function_names: Optional[List[str]] = None,
|
|
@@ -210,12 +256,12 @@ class ToolkitMessageIntegration:
|
|
|
210
256
|
Example:
|
|
211
257
|
>>> # With FunctionTools
|
|
212
258
|
>>> tools = [FunctionTool(search_func), FunctionTool(analyze_func)]
|
|
213
|
-
>>> enhanced_tools = message_integration.
|
|
259
|
+
>>> enhanced_tools = message_integration.register_functions
|
|
214
260
|
(tools)
|
|
215
261
|
|
|
216
262
|
>>> # With callable functions
|
|
217
263
|
>>> funcs = [search_web, analyze_data, generate_report]
|
|
218
|
-
>>> enhanced_tools = message_integration.
|
|
264
|
+
>>> enhanced_tools = message_integration.register_functions
|
|
219
265
|
(
|
|
220
266
|
... funcs,
|
|
221
267
|
... function_names=['search_web', 'analyze_data']
|
|
@@ -257,6 +303,9 @@ class ToolkitMessageIntegration:
|
|
|
257
303
|
# Get the original signature
|
|
258
304
|
original_sig = inspect.signature(func)
|
|
259
305
|
|
|
306
|
+
# Check if the function is async
|
|
307
|
+
is_async = inspect.iscoroutinefunction(func)
|
|
308
|
+
|
|
260
309
|
# Create new parameters for the enhanced function
|
|
261
310
|
new_params = list(original_sig.parameters.values())
|
|
262
311
|
|
|
@@ -321,45 +370,123 @@ class ToolkitMessageIntegration:
|
|
|
321
370
|
# Create the new signature
|
|
322
371
|
new_sig = original_sig.replace(parameters=new_params)
|
|
323
372
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
# Check if we should send a message
|
|
334
|
-
should_send = False
|
|
335
|
-
if self.use_custom_handler:
|
|
336
|
-
should_send = any(p is not None and p != '' for p in params)
|
|
337
|
-
else:
|
|
338
|
-
# For default handler, params = (title, description,
|
|
339
|
-
# attachment)
|
|
340
|
-
should_send = bool(params[0]) or bool(params[1])
|
|
373
|
+
if is_async:
|
|
374
|
+
|
|
375
|
+
@wraps(func)
|
|
376
|
+
async def wrapper(*args, **kwargs):
|
|
377
|
+
try:
|
|
378
|
+
params = self.extract_params_callback(kwargs)
|
|
379
|
+
except KeyError:
|
|
380
|
+
return await func(*args, **kwargs)
|
|
341
381
|
|
|
342
|
-
|
|
343
|
-
|
|
382
|
+
# Check if we should send a message
|
|
383
|
+
should_send = False
|
|
344
384
|
if self.use_custom_handler:
|
|
345
|
-
|
|
385
|
+
should_send = any(
|
|
386
|
+
p is not None and p != '' for p in params
|
|
387
|
+
)
|
|
346
388
|
else:
|
|
347
|
-
# For
|
|
348
|
-
title,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
389
|
+
# For default handler, params
|
|
390
|
+
# (title, description, attachment)
|
|
391
|
+
should_send = bool(params[0]) or bool(params[1])
|
|
392
|
+
|
|
393
|
+
# Send message if needed (handle async properly)
|
|
394
|
+
if should_send:
|
|
395
|
+
try:
|
|
396
|
+
if self.use_custom_handler:
|
|
397
|
+
# Check if message handler is async
|
|
398
|
+
if inspect.iscoroutinefunction(
|
|
399
|
+
self.message_handler
|
|
400
|
+
):
|
|
401
|
+
await self.message_handler(*params)
|
|
402
|
+
else:
|
|
403
|
+
self.message_handler(*params)
|
|
404
|
+
else:
|
|
405
|
+
# For built-in handler, provide defaults
|
|
406
|
+
title, desc, attach = params
|
|
407
|
+
self.message_handler(
|
|
408
|
+
title or "Executing Tool",
|
|
409
|
+
desc or f"Running {func.__name__}",
|
|
410
|
+
attach or '',
|
|
411
|
+
)
|
|
412
|
+
except Exception as msg_error:
|
|
413
|
+
# Don't let message handler
|
|
414
|
+
# errors break the main function
|
|
415
|
+
logger.warning(f"Message handler error: {msg_error}")
|
|
416
|
+
|
|
417
|
+
# Execute the original function
|
|
418
|
+
# (kwargs have been modified to remove message params)
|
|
419
|
+
result = await func(*args, **kwargs)
|
|
420
|
+
|
|
421
|
+
return result
|
|
422
|
+
else:
|
|
423
|
+
|
|
424
|
+
@wraps(func)
|
|
425
|
+
def wrapper(*args, **kwargs):
|
|
426
|
+
# Extract parameters using the callback
|
|
427
|
+
# (this will modify kwargs by removing message params)
|
|
428
|
+
try:
|
|
429
|
+
params = self.extract_params_callback(kwargs)
|
|
430
|
+
except KeyError:
|
|
431
|
+
# If parameters are missing,
|
|
432
|
+
# just execute the original function
|
|
433
|
+
return func(*args, **kwargs)
|
|
434
|
+
|
|
435
|
+
# Check if we should send a message
|
|
436
|
+
should_send = False
|
|
437
|
+
if self.use_custom_handler:
|
|
438
|
+
should_send = any(
|
|
439
|
+
p is not None and p != '' for p in params
|
|
353
440
|
)
|
|
441
|
+
else:
|
|
442
|
+
should_send = bool(params[0]) or bool(params[1])
|
|
354
443
|
|
|
355
|
-
|
|
356
|
-
|
|
444
|
+
# Send message if needed
|
|
445
|
+
if should_send:
|
|
446
|
+
try:
|
|
447
|
+
if self.use_custom_handler:
|
|
448
|
+
self.message_handler(*params)
|
|
449
|
+
else:
|
|
450
|
+
# For built-in handler, provide defaults
|
|
451
|
+
title, desc, attach = params
|
|
452
|
+
self.message_handler(
|
|
453
|
+
title or "Executing Tool",
|
|
454
|
+
desc or f"Running {func.__name__}",
|
|
455
|
+
attach or '',
|
|
456
|
+
)
|
|
457
|
+
except Exception as msg_error:
|
|
458
|
+
logger.warning(f"Message handler error: {msg_error}")
|
|
459
|
+
|
|
460
|
+
result = func(*args, **kwargs)
|
|
357
461
|
|
|
358
|
-
|
|
462
|
+
return result
|
|
359
463
|
|
|
360
464
|
# Apply the new signature to the wrapper
|
|
361
465
|
wrapper.__signature__ = new_sig # type: ignore[attr-defined]
|
|
362
466
|
|
|
467
|
+
# Create a hybrid approach:
|
|
468
|
+
# store toolkit instance info but preserve calling behavior
|
|
469
|
+
# We'll use a property-like
|
|
470
|
+
# approach to make __self__ available when needed
|
|
471
|
+
if hasattr(func, '__self__'):
|
|
472
|
+
toolkit_instance = func.__self__
|
|
473
|
+
|
|
474
|
+
# Store the toolkit instance as an attribute
|
|
475
|
+
# Use setattr to avoid MyPy type checking issues
|
|
476
|
+
wrapper.__toolkit_instance__ = toolkit_instance # type: ignore[attr-defined]
|
|
477
|
+
|
|
478
|
+
# Create a dynamic __self__ property
|
|
479
|
+
# that only appears during introspection
|
|
480
|
+
# but doesn't interfere with normal function calls
|
|
481
|
+
def get_self():
|
|
482
|
+
return toolkit_instance
|
|
483
|
+
|
|
484
|
+
# Only set __self__
|
|
485
|
+
# if we're being called in an introspection context
|
|
486
|
+
# (like from _clone_tools)
|
|
487
|
+
# Use setattr to avoid MyPy type checking issues
|
|
488
|
+
wrapper.__self__ = toolkit_instance # type: ignore[attr-defined]
|
|
489
|
+
|
|
363
490
|
# Enhance the docstring
|
|
364
491
|
if func.__doc__:
|
|
365
492
|
enhanced_doc = func.__doc__.rstrip()
|
camel/toolkits/slack_toolkit.py
CHANGED
|
@@ -128,18 +128,14 @@ class SlackToolkit(BaseToolkit):
|
|
|
128
128
|
return f"Error creating conversation: {e.response['error']}"
|
|
129
129
|
|
|
130
130
|
def join_slack_channel(self, channel_id: str) -> str:
|
|
131
|
-
r"""Joins an existing Slack channel.
|
|
131
|
+
r"""Joins an existing Slack channel. To get the `channel_id` of a
|
|
132
|
+
channel, you can use the `get_slack_channel_information` function.
|
|
132
133
|
|
|
133
134
|
Args:
|
|
134
135
|
channel_id (str): The ID of the Slack channel to join.
|
|
135
136
|
|
|
136
137
|
Returns:
|
|
137
|
-
str: A
|
|
138
|
-
or an error message.
|
|
139
|
-
|
|
140
|
-
Raises:
|
|
141
|
-
SlackApiError: If there is an error during get slack channel
|
|
142
|
-
information.
|
|
138
|
+
str: A string containing the API response from Slack.
|
|
143
139
|
"""
|
|
144
140
|
from slack_sdk.errors import SlackApiError
|
|
145
141
|
|
|
@@ -148,21 +144,17 @@ class SlackToolkit(BaseToolkit):
|
|
|
148
144
|
response = slack_client.conversations_join(channel=channel_id)
|
|
149
145
|
return str(response)
|
|
150
146
|
except SlackApiError as e:
|
|
151
|
-
return f"Error
|
|
147
|
+
return f"Error joining channel: {e.response['error']}"
|
|
152
148
|
|
|
153
149
|
def leave_slack_channel(self, channel_id: str) -> str:
|
|
154
|
-
r"""Leaves an existing Slack channel.
|
|
150
|
+
r"""Leaves an existing Slack channel. To get the `channel_id` of a
|
|
151
|
+
channel, you can use the `get_slack_channel_information` function.
|
|
155
152
|
|
|
156
153
|
Args:
|
|
157
154
|
channel_id (str): The ID of the Slack channel to leave.
|
|
158
155
|
|
|
159
156
|
Returns:
|
|
160
|
-
str: A
|
|
161
|
-
or an error message.
|
|
162
|
-
|
|
163
|
-
Raises:
|
|
164
|
-
SlackApiError: If there is an error during get slack channel
|
|
165
|
-
information.
|
|
157
|
+
str: A string containing the API response from Slack.
|
|
166
158
|
"""
|
|
167
159
|
from slack_sdk.errors import SlackApiError
|
|
168
160
|
|
|
@@ -171,18 +163,18 @@ class SlackToolkit(BaseToolkit):
|
|
|
171
163
|
response = slack_client.conversations_leave(channel=channel_id)
|
|
172
164
|
return str(response)
|
|
173
165
|
except SlackApiError as e:
|
|
174
|
-
return f"Error
|
|
166
|
+
return f"Error leaving channel: {e.response['error']}"
|
|
175
167
|
|
|
176
168
|
def get_slack_channel_information(self) -> str:
|
|
177
|
-
r"""Retrieve
|
|
178
|
-
format.
|
|
169
|
+
r"""Retrieve a list of all public channels in the Slack workspace.
|
|
179
170
|
|
|
180
|
-
|
|
181
|
-
|
|
171
|
+
This function is crucial for discovering available channels and their
|
|
172
|
+
`channel_id`s, which are required by many other functions.
|
|
182
173
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
174
|
+
Returns:
|
|
175
|
+
str: A JSON string representing a list of channels. Each channel
|
|
176
|
+
object in the list contains 'id', 'name', 'created', and
|
|
177
|
+
'num_members'. Returns an error message string on failure.
|
|
186
178
|
"""
|
|
187
179
|
from slack_sdk.errors import SlackApiError
|
|
188
180
|
|
|
@@ -204,21 +196,20 @@ class SlackToolkit(BaseToolkit):
|
|
|
204
196
|
]
|
|
205
197
|
return json.dumps(filtered_result, ensure_ascii=False)
|
|
206
198
|
except SlackApiError as e:
|
|
207
|
-
return f"Error
|
|
199
|
+
return f"Error retrieving channel list: {e.response['error']}"
|
|
208
200
|
|
|
209
201
|
def get_slack_channel_message(self, channel_id: str) -> str:
|
|
210
|
-
r"""Retrieve messages from a Slack channel.
|
|
202
|
+
r"""Retrieve messages from a Slack channel. To get the `channel_id`
|
|
203
|
+
of a channel, you can use the `get_slack_channel_information`
|
|
204
|
+
function.
|
|
211
205
|
|
|
212
206
|
Args:
|
|
213
207
|
channel_id (str): The ID of the Slack channel to retrieve messages
|
|
214
208
|
from.
|
|
215
209
|
|
|
216
210
|
Returns:
|
|
217
|
-
str: JSON string
|
|
218
|
-
|
|
219
|
-
Raises:
|
|
220
|
-
SlackApiError: If there is an error during get
|
|
221
|
-
slack channel message.
|
|
211
|
+
str: A JSON string representing a list of messages. Each message
|
|
212
|
+
object contains 'user', 'text', and 'ts' (timestamp).
|
|
222
213
|
"""
|
|
223
214
|
from slack_sdk.errors import SlackApiError
|
|
224
215
|
|
|
@@ -242,19 +233,20 @@ class SlackToolkit(BaseToolkit):
|
|
|
242
233
|
file_path: Optional[str] = None,
|
|
243
234
|
user: Optional[str] = None,
|
|
244
235
|
) -> str:
|
|
245
|
-
r"""Send a message to a Slack channel.
|
|
236
|
+
r"""Send a message to a Slack channel. To get the `channel_id` of a
|
|
237
|
+
channel, you can use the `get_slack_channel_information` function.
|
|
246
238
|
|
|
247
239
|
Args:
|
|
248
240
|
message (str): The message to send.
|
|
249
|
-
channel_id (str): The ID of the
|
|
250
|
-
file_path (Optional[str]): The path of
|
|
251
|
-
|
|
252
|
-
user (Optional[str]): The
|
|
253
|
-
|
|
241
|
+
channel_id (str): The ID of the channel to send the message to.
|
|
242
|
+
file_path (Optional[str]): The local path of a file to upload
|
|
243
|
+
with the message.
|
|
244
|
+
user (Optional[str]): The ID of a user to send an ephemeral
|
|
245
|
+
message to (visible only to that user).
|
|
254
246
|
|
|
255
247
|
Returns:
|
|
256
|
-
str: A confirmation message indicating
|
|
257
|
-
|
|
248
|
+
str: A confirmation message indicating success or an error
|
|
249
|
+
message.
|
|
258
250
|
"""
|
|
259
251
|
from slack_sdk.errors import SlackApiError
|
|
260
252
|
|
|
@@ -280,25 +272,23 @@ class SlackToolkit(BaseToolkit):
|
|
|
280
272
|
f"got response: {response}"
|
|
281
273
|
)
|
|
282
274
|
except SlackApiError as e:
|
|
283
|
-
return f"Error
|
|
275
|
+
return f"Error sending message: {e.response['error']}"
|
|
284
276
|
|
|
285
277
|
def delete_slack_message(
|
|
286
278
|
self,
|
|
287
279
|
time_stamp: str,
|
|
288
280
|
channel_id: str,
|
|
289
281
|
) -> str:
|
|
290
|
-
r"""Delete a message
|
|
282
|
+
r"""Delete a message from a Slack channel.
|
|
291
283
|
|
|
292
284
|
Args:
|
|
293
|
-
time_stamp (str):
|
|
294
|
-
|
|
285
|
+
time_stamp (str): The 'ts' value of the message to be deleted.
|
|
286
|
+
You can get this from the `get_slack_channel_message` function.
|
|
287
|
+
channel_id (str): The ID of the channel where the message is. Use
|
|
288
|
+
`get_slack_channel_information` to find the `channel_id`.
|
|
295
289
|
|
|
296
290
|
Returns:
|
|
297
|
-
str: A
|
|
298
|
-
was delete successfully or an error message.
|
|
299
|
-
|
|
300
|
-
Raises:
|
|
301
|
-
SlackApiError: If an error occurs while sending the message.
|
|
291
|
+
str: A string containing the API response from Slack.
|
|
302
292
|
"""
|
|
303
293
|
from slack_sdk.errors import SlackApiError
|
|
304
294
|
|
|
@@ -309,7 +299,7 @@ class SlackToolkit(BaseToolkit):
|
|
|
309
299
|
)
|
|
310
300
|
return str(response)
|
|
311
301
|
except SlackApiError as e:
|
|
312
|
-
return f"Error
|
|
302
|
+
return f"Error deleting message: {e.response['error']}"
|
|
313
303
|
|
|
314
304
|
def get_tools(self) -> List[FunctionTool]:
|
|
315
305
|
r"""Returns a list of FunctionTool objects representing the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=LY1yvi28uSSDg8ifjgLeFiCqzATMOyd5fXqDmkOmEAo,901
|
|
2
2
|
camel/generators.py,sha256=JRqj9_m1PF4qT6UtybzTQ-KBT9MJQt18OAAYvQ_fr2o,13844
|
|
3
3
|
camel/human.py,sha256=Xg8x1cS5KK4bQ1SDByiHZnzsRpvRP-KZViNvmu38xo4,5475
|
|
4
4
|
camel/logger.py,sha256=WgEwael_eT6D-lVAKHpKIpwXSTjvLbny5jbV1Ab8lnA,5760
|
|
@@ -7,7 +7,7 @@ camel/agents/__init__.py,sha256=64weKqdvmpZcGWyVkO-OKASAmVUdrQjv60JApgPk_SA,1644
|
|
|
7
7
|
camel/agents/_types.py,sha256=MeFZzay2kJA6evALQ-MbBTKW-0lu_0wBuKsxzH_4gWI,1552
|
|
8
8
|
camel/agents/_utils.py,sha256=AR7Qqgbkmn4X2edYUQf1rdksGUyV5hm3iK1z-Dn0Mcg,6266
|
|
9
9
|
camel/agents/base.py,sha256=c4bJYL3G3Z41SaFdMPMn8ZjLdFiFaVOFO6EQIfuCVR8,1124
|
|
10
|
-
camel/agents/chat_agent.py,sha256=
|
|
10
|
+
camel/agents/chat_agent.py,sha256=4Hn27mtUvUQmwMIFTDTUcTsXWIjyeISvz1FCOdm5HSM,151957
|
|
11
11
|
camel/agents/critic_agent.py,sha256=L6cTbYjyZB0DCa51tQ6LZLA6my8kHLC4nktHySH78H4,10433
|
|
12
12
|
camel/agents/deductive_reasoner_agent.py,sha256=6BZGaq1hR6hKJuQtOfoYQnk_AkZpw_Mr7mUy2MspQgs,13540
|
|
13
13
|
camel/agents/embodied_agent.py,sha256=XBxBu5ZMmSJ4B2U3Z7SMwvLlgp6yNpaBe8HNQmY9CZA,7536
|
|
@@ -332,7 +332,7 @@ camel/toolkits/craw4ai_toolkit.py,sha256=av8mqY68QgMSm27htnSdq0aqE6z3yWMVDSrNafQ
|
|
|
332
332
|
camel/toolkits/dappier_toolkit.py,sha256=OEHOYXX_oXhgbVtWYAy13nO9uXf9i5qEXSwY4PexNFg,8194
|
|
333
333
|
camel/toolkits/data_commons_toolkit.py,sha256=aHZUSL1ACpnYGaf1rE2csVKTmXTmN8lMGRUBYhZ_YEk,14168
|
|
334
334
|
camel/toolkits/edgeone_pages_mcp_toolkit.py,sha256=1TFpAGHUNLggFQeN1OEw7P5laijwnlrCkfxBtgxFuUY,2331
|
|
335
|
-
camel/toolkits/excel_toolkit.py,sha256=
|
|
335
|
+
camel/toolkits/excel_toolkit.py,sha256=tQaonygk0yDTPZHWWQKG5osTN-R_EawR0bJIKLsLg08,35768
|
|
336
336
|
camel/toolkits/file_write_toolkit.py,sha256=d8N8FfmK1fS13sY58PPhJh6M0vq6yh-s1-ltCZQJObg,37044
|
|
337
337
|
camel/toolkits/function_tool.py,sha256=3_hE-Khqf556CeebchsPpjIDCynC6vKmUJLdh1EO_js,34295
|
|
338
338
|
camel/toolkits/github_toolkit.py,sha256=iUyRrjWGAW_iljZVfNyfkm1Vi55wJxK6PsDAQs9pOag,13099
|
|
@@ -351,7 +351,7 @@ camel/toolkits/mcp_toolkit.py,sha256=da7QLwGKIKnKvMx5mOOiC56w0hKV1bvD1Z9PgrSHOtA
|
|
|
351
351
|
camel/toolkits/memory_toolkit.py,sha256=TeKYd5UMwgjVpuS2orb-ocFL13eUNKujvrFOruDCpm8,4436
|
|
352
352
|
camel/toolkits/meshy_toolkit.py,sha256=NbgdOBD3FYLtZf-AfonIv6-Q8-8DW129jsaP1PqI2rs,7126
|
|
353
353
|
camel/toolkits/message_agent_toolkit.py,sha256=yWvAaxoxAvDEtD7NH7IkkHIyfWIYK47WZhn5E_RaxKo,22661
|
|
354
|
-
camel/toolkits/message_integration.py,sha256
|
|
354
|
+
camel/toolkits/message_integration.py,sha256=-dcf91DJzj8asXP2cc7mMy1BH2xzifhH-MMGr_nvJGw,28730
|
|
355
355
|
camel/toolkits/mineru_toolkit.py,sha256=vRX9LholLNkpbJ6axfEN4pTG85aWb0PDmlVy3rAAXhg,6868
|
|
356
356
|
camel/toolkits/networkx_toolkit.py,sha256=C7pUCZTzzGkFyqdkrmhRKpAHmHWfLKeuzYHC_BHPtbk,8826
|
|
357
357
|
camel/toolkits/note_taking_toolkit.py,sha256=cp7uoSBMjiGy331Tdk2Bl6yqKSMGwws7rQJkq8tfTQs,10687
|
|
@@ -374,7 +374,7 @@ camel/toolkits/screenshot_toolkit.py,sha256=IwfvfLSfqrEywvPlDbtYJe1qcbrO5uC3Mxxv
|
|
|
374
374
|
camel/toolkits/search_toolkit.py,sha256=2zKclYTQi5ThjPLiwKV7qX8GxuvgtgSLBHipTz-ZgWY,48360
|
|
375
375
|
camel/toolkits/searxng_toolkit.py,sha256=a2GtE4FGSrmaIVvX6Yide-abBYD1wsHqitnDlx9fdVg,7664
|
|
376
376
|
camel/toolkits/semantic_scholar_toolkit.py,sha256=Rh7eA_YPxV5pvPIzhjjvpr3vtlaCniJicrqzkPWW9_I,11634
|
|
377
|
-
camel/toolkits/slack_toolkit.py,sha256=
|
|
377
|
+
camel/toolkits/slack_toolkit.py,sha256=ZnK_fRdrQiaAUpjkgHSv1iXdv1HKEgXMlKevu3QivB8,11849
|
|
378
378
|
camel/toolkits/stripe_toolkit.py,sha256=07swo5znGTnorafC1uYLKB4NRcJIOPOx19J7tkpLYWk,10102
|
|
379
379
|
camel/toolkits/sympy_toolkit.py,sha256=BAQnI8EFJydNUpKQWXBdleQ1Cm-srDBhFlqp9V9pbPQ,33757
|
|
380
380
|
camel/toolkits/task_planning_toolkit.py,sha256=Ttw9fHae4omGC1SA-6uaeXVHJ1YkwiVloz_hO-fm1gw,4855
|
|
@@ -390,18 +390,28 @@ camel/toolkits/wolfram_alpha_toolkit.py,sha256=qeIM8ySn5ilcExBWtx-hDOc35bNcebLVn
|
|
|
390
390
|
camel/toolkits/zapier_toolkit.py,sha256=A83y1UcfuopH7Fx82pORzypl1StbhBjB2HhyOqYa300,7124
|
|
391
391
|
camel/toolkits/hybrid_browser_toolkit/__init__.py,sha256=vxjWhq7GjUKE5I9RGQU_GoikZJ-AVK4ertdvEqp9pd0,802
|
|
392
392
|
camel/toolkits/hybrid_browser_toolkit/config_loader.py,sha256=UwBh7wG4-owoI2VfiNMum0O7dPWMYiEDxQKtq_GazU4,6903
|
|
393
|
-
camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit.py,sha256=
|
|
394
|
-
camel/toolkits/hybrid_browser_toolkit/
|
|
393
|
+
camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit.py,sha256=gotOOlXJjfjv9Qnn89PLNhJ4_Rw_aMMU6gTJcG-uCf8,7938
|
|
394
|
+
camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit_ts.py,sha256=8ArSGFCx1bIrZR8cdRVUX6axy5Fxgk5ADEgiSrPQ_Bo,45269
|
|
395
|
+
camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py,sha256=gyJsqHDvvpXa86zxqn8nsitS0QYqwmIHGgvPmcxVsYc,20445
|
|
395
396
|
camel/toolkits/hybrid_browser_toolkit/ts/package-lock.json,sha256=_-YE9S_C1XT59A6upQp9lLuZcC67cV9QlbwAsEKkfyw,156337
|
|
396
397
|
camel/toolkits/hybrid_browser_toolkit/ts/package.json,sha256=pUQm0xwXR7ZyWNv6O2QtHW00agnfAoX9F_XGXZlAxl4,745
|
|
397
398
|
camel/toolkits/hybrid_browser_toolkit/ts/tsconfig.json,sha256=SwpQnq4Q-rwRobF2iWrP96mgmgwaVPZEv-nii5QIYEU,523
|
|
398
|
-
camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js,sha256=
|
|
399
|
+
camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js,sha256=WsH16sf1zP1TPTKdVgbZAx42eHtgeQGqcTef2FPdR6Y,8556
|
|
399
400
|
camel/toolkits/hybrid_browser_toolkit/ts/src/browser-scripts.js,sha256=NNwM_H2xaDrlrdac0PJK1iUBwdiuQsg9qKaMhHAvZuI,3160
|
|
400
401
|
camel/toolkits/hybrid_browser_toolkit/ts/src/browser-session.ts,sha256=csJ6yelay5r0QULBzWybakO3IB7dQ5QpbrSdCxLlrwE,33165
|
|
401
402
|
camel/toolkits/hybrid_browser_toolkit/ts/src/config-loader.ts,sha256=jYsu9qFuwpFIS5y8rQ5R6aX_HDlDEh2YsvFH6CQLhmg,6181
|
|
402
403
|
camel/toolkits/hybrid_browser_toolkit/ts/src/hybrid-browser-toolkit.ts,sha256=VLhaKGQ2rz9OMRTluQ4h9kC0MMJz6-y29WxR-DQEu-c,16551
|
|
403
404
|
camel/toolkits/hybrid_browser_toolkit/ts/src/index.ts,sha256=uJGHmGs640iCrjllqXDXwDE4hGW1VJA2YL6BkFkzYNs,353
|
|
404
405
|
camel/toolkits/hybrid_browser_toolkit/ts/src/types.ts,sha256=Soid_nh1Ft829pKe_Xt1wxGf3pMSY2vDx4MJHGlhzaA,2442
|
|
406
|
+
camel/toolkits/hybrid_browser_toolkit_py/__init__.py,sha256=tPQloCw-Ayl1lPfyvzGJkMFa1ze3ilXJq_1Oz5jg5s4,796
|
|
407
|
+
camel/toolkits/hybrid_browser_toolkit_py/actions.py,sha256=x6X-kEdQx3K1ID-BBwdQEciX6C0KMt5QUszpnksnj3A,15003
|
|
408
|
+
camel/toolkits/hybrid_browser_toolkit_py/agent.py,sha256=0ifwhYUDJ5GLxfdpC5KquPaW1a0QBAutp2Y9y0YFujw,11685
|
|
409
|
+
camel/toolkits/hybrid_browser_toolkit_py/browser_session.py,sha256=fgV1o4pWOQ_fUvmpk7UHYcJCqHY_cmivoY_OB0ZKv3s,26866
|
|
410
|
+
camel/toolkits/hybrid_browser_toolkit_py/config_loader.py,sha256=0zpDq3aFKEva2jc38kgLHnyxypIDk9SOcMjoP26tozo,15414
|
|
411
|
+
camel/toolkits/hybrid_browser_toolkit_py/hybrid_browser_toolkit.py,sha256=nph9Nyam4349zPPA6f2NZ7KPA-xNLW18qHqooBeVlFM,76798
|
|
412
|
+
camel/toolkits/hybrid_browser_toolkit_py/snapshot.py,sha256=3vQaFK5C1P8WnkK2eDMaFOizrZf4uUAW0LxdeoF4F2w,8539
|
|
413
|
+
camel/toolkits/hybrid_browser_toolkit_py/stealth_script.js,sha256=z4XRSVUpAS87Sj36s3bY8XXhvRcHBlgsUOyMxV2HI80,27650
|
|
414
|
+
camel/toolkits/hybrid_browser_toolkit_py/unified_analyzer.js,sha256=VnzIn0KcEtxuncJi-OPZzdWbLSeSHCH-7sviFAGNM8g,40823
|
|
405
415
|
camel/toolkits/open_api_specs/security_config.py,sha256=ZVnBa_zEifaE_ao2xsvV5majuJHpn2Tn7feMDOnj-eo,898
|
|
406
416
|
camel/toolkits/open_api_specs/biztoc/__init__.py,sha256=OKCZrQCDwaWtXIN_2rA9FSqEvgpQRieRoHh7Ek6N16A,702
|
|
407
417
|
camel/toolkits/open_api_specs/biztoc/ai-plugin.json,sha256=IJinQbLv5MFPGFwdN7PbOhwArFVExSEZdJspe-mOBIo,866
|
|
@@ -457,7 +467,7 @@ camel/verifiers/math_verifier.py,sha256=tA1D4S0sm8nsWISevxSN0hvSVtIUpqmJhzqfbuMo
|
|
|
457
467
|
camel/verifiers/models.py,sha256=GdxYPr7UxNrR1577yW4kyroRcLGfd-H1GXgv8potDWU,2471
|
|
458
468
|
camel/verifiers/physics_verifier.py,sha256=c1grrRddcrVN7szkxhv2QirwY9viIRSITWeWFF5HmLs,30187
|
|
459
469
|
camel/verifiers/python_verifier.py,sha256=ogTz77wODfEcDN4tMVtiSkRQyoiZbHPY2fKybn59lHw,20558
|
|
460
|
-
camel_ai-0.2.
|
|
461
|
-
camel_ai-0.2.
|
|
462
|
-
camel_ai-0.2.
|
|
463
|
-
camel_ai-0.2.
|
|
470
|
+
camel_ai-0.2.73a3.dist-info/METADATA,sha256=vy-EgY3IPDzVVc5UNfT7MQvrWqvpBZ1ZUPGQb-bXOrA,50334
|
|
471
|
+
camel_ai-0.2.73a3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
472
|
+
camel_ai-0.2.73a3.dist-info/licenses/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
|
|
473
|
+
camel_ai-0.2.73a3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|