camel-ai 0.2.60__py3-none-any.whl → 0.2.62__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 +159 -8
- camel/agents/mcp_agent.py +5 -5
- camel/configs/anthropic_config.py +6 -5
- camel/{data_collector → data_collectors}/alpaca_collector.py +1 -1
- camel/{data_collector → data_collectors}/sharegpt_collector.py +1 -1
- camel/datagen/evol_instruct/scorer.py +22 -23
- camel/datagen/evol_instruct/templates.py +46 -46
- camel/datasets/static_dataset.py +144 -0
- camel/loaders/__init__.py +5 -2
- camel/loaders/chunkr_reader.py +117 -91
- camel/loaders/mistral_reader.py +148 -0
- camel/memories/blocks/chat_history_block.py +1 -2
- camel/models/model_manager.py +7 -3
- camel/retrievers/auto_retriever.py +20 -1
- camel/{runtime → runtimes}/daytona_runtime.py +1 -1
- camel/{runtime → runtimes}/docker_runtime.py +1 -1
- camel/{runtime → runtimes}/llm_guard_runtime.py +2 -2
- camel/{runtime → runtimes}/remote_http_runtime.py +1 -1
- camel/{runtime → runtimes}/ubuntu_docker_runtime.py +1 -1
- camel/societies/workforce/base.py +7 -3
- camel/societies/workforce/single_agent_worker.py +2 -1
- camel/societies/workforce/worker.py +5 -3
- camel/societies/workforce/workforce.py +65 -24
- camel/storages/__init__.py +2 -0
- camel/storages/vectordb_storages/__init__.py +2 -0
- camel/storages/vectordb_storages/faiss.py +712 -0
- camel/toolkits/__init__.py +4 -0
- camel/toolkits/async_browser_toolkit.py +75 -523
- camel/toolkits/bohrium_toolkit.py +318 -0
- camel/toolkits/browser_toolkit.py +215 -538
- camel/toolkits/browser_toolkit_commons.py +568 -0
- camel/toolkits/file_write_toolkit.py +80 -31
- camel/toolkits/mcp_toolkit.py +477 -665
- camel/toolkits/pptx_toolkit.py +777 -0
- camel/toolkits/wolfram_alpha_toolkit.py +5 -1
- camel/types/enums.py +13 -1
- camel/utils/__init__.py +2 -0
- camel/utils/commons.py +27 -0
- camel/utils/mcp_client.py +979 -0
- {camel_ai-0.2.60.dist-info → camel_ai-0.2.62.dist-info}/METADATA +14 -1
- {camel_ai-0.2.60.dist-info → camel_ai-0.2.62.dist-info}/RECORD +53 -47
- /camel/{data_collector → data_collectors}/__init__.py +0 -0
- /camel/{data_collector → data_collectors}/base.py +0 -0
- /camel/{runtime → runtimes}/__init__.py +0 -0
- /camel/{runtime → runtimes}/api.py +0 -0
- /camel/{runtime → runtimes}/base.py +0 -0
- /camel/{runtime → runtimes}/configs.py +0 -0
- /camel/{runtime → runtimes}/utils/__init__.py +0 -0
- /camel/{runtime → runtimes}/utils/function_risk_toolkit.py +0 -0
- /camel/{runtime → runtimes}/utils/ignore_risk_toolkit.py +0 -0
- {camel_ai-0.2.60.dist-info → camel_ai-0.2.62.dist-info}/WHEEL +0 -0
- {camel_ai-0.2.60.dist-info → camel_ai-0.2.62.dist-info}/licenses/LICENSE +0 -0
|
@@ -117,7 +117,11 @@ class WolframAlphaToolkit(BaseToolkit):
|
|
|
117
117
|
|
|
118
118
|
try:
|
|
119
119
|
url = "https://www.wolframalpha.com/api/v1/llm-api"
|
|
120
|
-
params = {
|
|
120
|
+
params = {
|
|
121
|
+
"input": query,
|
|
122
|
+
"appid": WOLFRAMALPHA_APP_ID,
|
|
123
|
+
"format": "plaintext",
|
|
124
|
+
}
|
|
121
125
|
|
|
122
126
|
response = requests.get(url, params=params)
|
|
123
127
|
response.raise_for_status()
|
camel/types/enums.py
CHANGED
|
@@ -56,6 +56,8 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
56
56
|
AWS_LLAMA_3_3_70B_INSTRUCT = "us.meta.llama3-3-70b-instruct-v1:0"
|
|
57
57
|
AWS_LLAMA_3_2_90B_INSTRUCT = "us.meta.llama3-2-90b-instruct-v1:0"
|
|
58
58
|
AWS_LLAMA_3_2_11B_INSTRUCT = "us.meta.llama3-2-11b-instruct-v1:0"
|
|
59
|
+
AWS_CLAUDE_SONNET_4 = "anthropic.claude-sonnet-4-20250514-v1:0"
|
|
60
|
+
AWS_CLAUDE_OPUS_4 = "anthropic.claude-opus-4-20250514-v1:0"
|
|
59
61
|
|
|
60
62
|
GLM_4 = "glm-4"
|
|
61
63
|
GLM_4V = "glm-4v"
|
|
@@ -145,13 +147,15 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
145
147
|
CLAUDE_2_0 = "claude-2.0"
|
|
146
148
|
CLAUDE_INSTANT_1_2 = "claude-instant-1.2"
|
|
147
149
|
|
|
148
|
-
#
|
|
150
|
+
# Claude models
|
|
149
151
|
CLAUDE_3_OPUS = "claude-3-opus-latest"
|
|
150
152
|
CLAUDE_3_SONNET = "claude-3-sonnet-20240229"
|
|
151
153
|
CLAUDE_3_HAIKU = "claude-3-haiku-20240307"
|
|
152
154
|
CLAUDE_3_5_SONNET = "claude-3-5-sonnet-latest"
|
|
153
155
|
CLAUDE_3_5_HAIKU = "claude-3-5-haiku-latest"
|
|
154
156
|
CLAUDE_3_7_SONNET = "claude-3-7-sonnet-latest"
|
|
157
|
+
CLAUDE_SONNET_4 = "claude-sonnet-4-20250514"
|
|
158
|
+
CLAUDE_OPUS_4 = "claude-opus-4-20250514"
|
|
155
159
|
|
|
156
160
|
# Netmind models
|
|
157
161
|
NETMIND_LLAMA_4_MAVERICK_17B_128E_INSTRUCT = (
|
|
@@ -469,6 +473,8 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
469
473
|
ModelType.AWS_LLAMA_3_3_70B_INSTRUCT,
|
|
470
474
|
ModelType.AWS_LLAMA_3_2_90B_INSTRUCT,
|
|
471
475
|
ModelType.AWS_LLAMA_3_2_11B_INSTRUCT,
|
|
476
|
+
ModelType.AWS_CLAUDE_SONNET_4,
|
|
477
|
+
ModelType.AWS_CLAUDE_OPUS_4,
|
|
472
478
|
}
|
|
473
479
|
|
|
474
480
|
@property
|
|
@@ -530,6 +536,8 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
530
536
|
ModelType.CLAUDE_3_5_SONNET,
|
|
531
537
|
ModelType.CLAUDE_3_5_HAIKU,
|
|
532
538
|
ModelType.CLAUDE_3_7_SONNET,
|
|
539
|
+
ModelType.CLAUDE_SONNET_4,
|
|
540
|
+
ModelType.CLAUDE_OPUS_4,
|
|
533
541
|
}
|
|
534
542
|
|
|
535
543
|
@property
|
|
@@ -1162,11 +1170,15 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1162
1170
|
ModelType.CLAUDE_3_5_SONNET,
|
|
1163
1171
|
ModelType.CLAUDE_3_5_HAIKU,
|
|
1164
1172
|
ModelType.CLAUDE_3_7_SONNET,
|
|
1173
|
+
ModelType.CLAUDE_SONNET_4,
|
|
1174
|
+
ModelType.CLAUDE_OPUS_4,
|
|
1165
1175
|
ModelType.YI_MEDIUM_200K,
|
|
1166
1176
|
ModelType.AWS_CLAUDE_3_5_SONNET,
|
|
1167
1177
|
ModelType.AWS_CLAUDE_3_HAIKU,
|
|
1168
1178
|
ModelType.AWS_CLAUDE_3_SONNET,
|
|
1169
1179
|
ModelType.AWS_CLAUDE_3_7_SONNET,
|
|
1180
|
+
ModelType.AWS_CLAUDE_SONNET_4,
|
|
1181
|
+
ModelType.AWS_CLAUDE_OPUS_4,
|
|
1170
1182
|
ModelType.O4_MINI,
|
|
1171
1183
|
ModelType.O3,
|
|
1172
1184
|
}:
|
camel/utils/__init__.py
CHANGED
|
@@ -35,6 +35,7 @@ from .commons import (
|
|
|
35
35
|
json_to_function_code,
|
|
36
36
|
print_text_animated,
|
|
37
37
|
retry_on_error,
|
|
38
|
+
run_async,
|
|
38
39
|
text_extract_from_web,
|
|
39
40
|
to_pascal,
|
|
40
41
|
track_agent,
|
|
@@ -95,4 +96,5 @@ __all__ = [
|
|
|
95
96
|
"model_from_json_schema",
|
|
96
97
|
"sanitize_filename",
|
|
97
98
|
"browser_toolkit_save_auth_cookie",
|
|
99
|
+
"run_async",
|
|
98
100
|
]
|
camel/utils/commons.py
CHANGED
|
@@ -1103,3 +1103,30 @@ def browser_toolkit_save_auth_cookie(
|
|
|
1103
1103
|
context.storage_state(path=cookie_json_path)
|
|
1104
1104
|
|
|
1105
1105
|
browser.close() # Close the browser when finished
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
def run_async(func: Callable[..., Any]) -> Callable[..., Any]:
|
|
1109
|
+
r"""Helper function to run async functions in synchronous context.
|
|
1110
|
+
|
|
1111
|
+
Args:
|
|
1112
|
+
func (Callable[..., Any]): The async function to wrap.
|
|
1113
|
+
|
|
1114
|
+
Returns:
|
|
1115
|
+
Callable[..., Any]: A synchronous wrapper for the async function.
|
|
1116
|
+
"""
|
|
1117
|
+
|
|
1118
|
+
@wraps(func)
|
|
1119
|
+
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
1120
|
+
try:
|
|
1121
|
+
loop = asyncio.get_event_loop()
|
|
1122
|
+
except RuntimeError:
|
|
1123
|
+
loop = asyncio.new_event_loop()
|
|
1124
|
+
asyncio.set_event_loop(loop)
|
|
1125
|
+
|
|
1126
|
+
if loop.is_closed():
|
|
1127
|
+
loop = asyncio.new_event_loop()
|
|
1128
|
+
asyncio.set_event_loop(loop)
|
|
1129
|
+
|
|
1130
|
+
return loop.run_until_complete(func(*args, **kwargs))
|
|
1131
|
+
|
|
1132
|
+
return wrapper
|