camel-ai 0.2.74a5__py3-none-any.whl → 0.2.75__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 +149 -95
- camel/configs/__init__.py +3 -0
- camel/configs/nebius_config.py +103 -0
- camel/interpreters/e2b_interpreter.py +34 -1
- camel/models/__init__.py +2 -0
- camel/models/aiml_model.py +1 -16
- camel/models/anthropic_model.py +6 -22
- camel/models/aws_bedrock_model.py +1 -16
- camel/models/azure_openai_model.py +1 -16
- camel/models/base_model.py +0 -12
- camel/models/cohere_model.py +1 -16
- camel/models/crynux_model.py +1 -16
- camel/models/deepseek_model.py +1 -16
- camel/models/gemini_model.py +1 -16
- camel/models/groq_model.py +1 -17
- camel/models/internlm_model.py +1 -16
- camel/models/litellm_model.py +1 -16
- camel/models/lmstudio_model.py +1 -17
- camel/models/mistral_model.py +1 -16
- camel/models/model_factory.py +2 -0
- camel/models/modelscope_model.py +1 -16
- camel/models/moonshot_model.py +6 -22
- camel/models/nebius_model.py +83 -0
- camel/models/nemotron_model.py +0 -5
- camel/models/netmind_model.py +1 -16
- camel/models/novita_model.py +1 -16
- camel/models/nvidia_model.py +1 -16
- camel/models/ollama_model.py +4 -19
- camel/models/openai_compatible_model.py +0 -3
- camel/models/openai_model.py +1 -22
- camel/models/openrouter_model.py +1 -17
- camel/models/ppio_model.py +1 -16
- camel/models/qianfan_model.py +1 -16
- camel/models/qwen_model.py +1 -16
- camel/models/reka_model.py +1 -16
- camel/models/samba_model.py +0 -32
- camel/models/sglang_model.py +1 -16
- camel/models/siliconflow_model.py +1 -16
- camel/models/stub_model.py +0 -4
- camel/models/togetherai_model.py +1 -16
- camel/models/vllm_model.py +1 -16
- camel/models/volcano_model.py +0 -17
- camel/models/watsonx_model.py +1 -16
- camel/models/yi_model.py +1 -16
- camel/models/zhipuai_model.py +1 -16
- camel/societies/workforce/prompts.py +1 -8
- camel/societies/workforce/task_channel.py +120 -27
- camel/societies/workforce/workforce.py +35 -3
- camel/toolkits/__init__.py +0 -2
- camel/toolkits/github_toolkit.py +104 -17
- camel/toolkits/hybrid_browser_toolkit/config_loader.py +3 -0
- camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit_ts.py +260 -5
- camel/toolkits/hybrid_browser_toolkit/ts/src/browser-session.ts +288 -37
- camel/toolkits/hybrid_browser_toolkit/ts/src/config-loader.ts +3 -1
- camel/toolkits/hybrid_browser_toolkit/ts/src/hybrid-browser-toolkit.ts +209 -41
- camel/toolkits/hybrid_browser_toolkit/ts/src/types.ts +22 -3
- camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js +28 -1
- camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py +101 -0
- camel/toolkits/hybrid_browser_toolkit_py/actions.py +158 -0
- camel/toolkits/hybrid_browser_toolkit_py/browser_session.py +55 -8
- camel/toolkits/hybrid_browser_toolkit_py/config_loader.py +43 -0
- camel/toolkits/hybrid_browser_toolkit_py/hybrid_browser_toolkit.py +312 -3
- camel/toolkits/hybrid_browser_toolkit_py/snapshot.py +10 -4
- camel/toolkits/hybrid_browser_toolkit_py/unified_analyzer.js +45 -4
- camel/toolkits/math_toolkit.py +64 -10
- camel/toolkits/mcp_toolkit.py +39 -14
- camel/toolkits/openai_image_toolkit.py +55 -24
- camel/toolkits/search_toolkit.py +153 -29
- camel/types/__init__.py +2 -2
- camel/types/enums.py +54 -10
- camel/types/openai_types.py +2 -2
- camel/types/unified_model_type.py +5 -0
- camel/utils/mcp.py +2 -2
- camel/utils/token_counting.py +18 -3
- {camel_ai-0.2.74a5.dist-info → camel_ai-0.2.75.dist-info}/METADATA +9 -15
- {camel_ai-0.2.74a5.dist-info → camel_ai-0.2.75.dist-info}/RECORD +79 -78
- camel/toolkits/openai_agent_toolkit.py +0 -135
- {camel_ai-0.2.74a5.dist-info → camel_ai-0.2.75.dist-info}/WHEEL +0 -0
- {camel_ai-0.2.74a5.dist-info → camel_ai-0.2.75.dist-info}/licenses/LICENSE +0 -0
camel/types/enums.py
CHANGED
|
@@ -30,7 +30,7 @@ class RoleType(Enum):
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class ModelType(UnifiedModelType, Enum):
|
|
33
|
-
DEFAULT = os.getenv("DEFAULT_MODEL_TYPE", "gpt-
|
|
33
|
+
DEFAULT = os.getenv("DEFAULT_MODEL_TYPE", "gpt-5-mini")
|
|
34
34
|
|
|
35
35
|
GPT_3_5_TURBO = "gpt-3.5-turbo"
|
|
36
36
|
GPT_4 = "gpt-4"
|
|
@@ -48,6 +48,9 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
48
48
|
O4_MINI = "o4-mini"
|
|
49
49
|
O3 = "o3"
|
|
50
50
|
O3_PRO = "o3-pro"
|
|
51
|
+
GPT_5 = "gpt-5"
|
|
52
|
+
GPT_5_MINI = "gpt-5-mini"
|
|
53
|
+
GPT_5_NANO = "gpt-5-nano"
|
|
51
54
|
|
|
52
55
|
AWS_CLAUDE_3_7_SONNET = "anthropic.claude-3-7-sonnet-20250219-v1:0"
|
|
53
56
|
AWS_CLAUDE_3_5_SONNET = "anthropic.claude-3-5-sonnet-20241022-v2:0"
|
|
@@ -59,6 +62,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
59
62
|
AWS_LLAMA_3_2_11B_INSTRUCT = "us.meta.llama3-2-11b-instruct-v1:0"
|
|
60
63
|
AWS_CLAUDE_SONNET_4 = "anthropic.claude-sonnet-4-20250514-v1:0"
|
|
61
64
|
AWS_CLAUDE_OPUS_4 = "anthropic.claude-opus-4-20250514-v1:0"
|
|
65
|
+
AWS_CLAUDE_OPUS_4_1 = "anthropic.claude-opus-4-1-20250805-v1:0"
|
|
62
66
|
|
|
63
67
|
GLM_4 = "glm-4"
|
|
64
68
|
GLM_4V = "glm-4v"
|
|
@@ -83,6 +87,15 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
83
87
|
GROQ_MIXTRAL_8_7B = "mixtral-8x7b-32768"
|
|
84
88
|
GROQ_GEMMA_2_9B_IT = "gemma2-9b-it"
|
|
85
89
|
|
|
90
|
+
# Nebius AI Studio platform models
|
|
91
|
+
NEBIUS_GPT_OSS_120B = "gpt-oss-120b"
|
|
92
|
+
NEBIUS_GPT_OSS_20B = "gpt-oss-20b"
|
|
93
|
+
NEBIUS_GLM_4_5 = "GLM-4.5"
|
|
94
|
+
NEBIUS_DEEPSEEK_V3 = "deepseek-ai/DeepSeek-V3"
|
|
95
|
+
NEBIUS_DEEPSEEK_R1 = "deepseek-ai/DeepSeek-R1"
|
|
96
|
+
NEBIUS_LLAMA_3_1_70B = "meta-llama/Meta-Llama-3.1-70B-Instruct"
|
|
97
|
+
NEBIUS_MISTRAL_7B_INSTRUCT = "mistralai/Mistral-7B-Instruct-v0.3"
|
|
98
|
+
|
|
86
99
|
# OpenRouter models
|
|
87
100
|
OPENROUTER_LLAMA_3_1_405B = "meta-llama/llama-3.1-405b-instruct"
|
|
88
101
|
OPENROUTER_LLAMA_3_1_70B = "meta-llama/llama-3.1-70b-instruct"
|
|
@@ -91,6 +104,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
91
104
|
OPENROUTER_LLAMA_4_SCOUT = "meta-llama/llama-4-scout"
|
|
92
105
|
OPENROUTER_LLAMA_4_SCOUT_FREE = "meta-llama/llama-4-scout:free"
|
|
93
106
|
OPENROUTER_OLYMPICODER_7B = "open-r1/olympiccoder-7b:free"
|
|
107
|
+
OPENROUTER_HORIZON_ALPHA = "openrouter/horizon-alpha"
|
|
94
108
|
|
|
95
109
|
# LMStudio models
|
|
96
110
|
LMSTUDIO_GEMMA_3_1B = "gemma-3-1b"
|
|
@@ -157,6 +171,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
157
171
|
CLAUDE_3_7_SONNET = "claude-3-7-sonnet-latest"
|
|
158
172
|
CLAUDE_SONNET_4 = "claude-sonnet-4-20250514"
|
|
159
173
|
CLAUDE_OPUS_4 = "claude-opus-4-20250514"
|
|
174
|
+
CLAUDE_OPUS_4_1 = "claude-opus-4-1-20250805"
|
|
160
175
|
|
|
161
176
|
# Netmind models
|
|
162
177
|
NETMIND_LLAMA_4_MAVERICK_17B_128E_INSTRUCT = (
|
|
@@ -207,8 +222,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
207
222
|
MISTRAL_MIXTRAL_8x22B = "open-mixtral-8x22b"
|
|
208
223
|
MISTRAL_NEMO = "open-mistral-nemo"
|
|
209
224
|
MISTRAL_PIXTRAL_12B = "pixtral-12b-2409"
|
|
210
|
-
|
|
211
|
-
MAGISTRAL_MEDIUM = "magistral-medium-2506"
|
|
225
|
+
MISTRAL_MEDIUM_3_1 = "mistral-medium-2508"
|
|
212
226
|
MISTRAL_SMALL_3_2 = "mistral-small-2506"
|
|
213
227
|
|
|
214
228
|
# Reka models
|
|
@@ -495,6 +509,9 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
495
509
|
ModelType.GPT_4_1,
|
|
496
510
|
ModelType.GPT_4_1_MINI,
|
|
497
511
|
ModelType.GPT_4_1_NANO,
|
|
512
|
+
ModelType.GPT_5,
|
|
513
|
+
ModelType.GPT_5_MINI,
|
|
514
|
+
ModelType.GPT_5_NANO,
|
|
498
515
|
ModelType.O4_MINI,
|
|
499
516
|
ModelType.O3,
|
|
500
517
|
}
|
|
@@ -513,6 +530,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
513
530
|
ModelType.AWS_LLAMA_3_2_11B_INSTRUCT,
|
|
514
531
|
ModelType.AWS_CLAUDE_SONNET_4,
|
|
515
532
|
ModelType.AWS_CLAUDE_OPUS_4,
|
|
533
|
+
ModelType.AWS_CLAUDE_OPUS_4_1,
|
|
516
534
|
}
|
|
517
535
|
|
|
518
536
|
@property
|
|
@@ -535,6 +553,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
535
553
|
ModelType.GPT_4_1,
|
|
536
554
|
ModelType.GPT_4_1_MINI,
|
|
537
555
|
ModelType.GPT_4_1_NANO,
|
|
556
|
+
ModelType.GPT_5,
|
|
538
557
|
ModelType.O4_MINI,
|
|
539
558
|
ModelType.O3,
|
|
540
559
|
}
|
|
@@ -577,6 +596,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
577
596
|
ModelType.CLAUDE_3_7_SONNET,
|
|
578
597
|
ModelType.CLAUDE_SONNET_4,
|
|
579
598
|
ModelType.CLAUDE_OPUS_4,
|
|
599
|
+
ModelType.CLAUDE_OPUS_4_1,
|
|
580
600
|
}
|
|
581
601
|
|
|
582
602
|
@property
|
|
@@ -592,6 +612,20 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
592
612
|
ModelType.GROQ_GEMMA_2_9B_IT,
|
|
593
613
|
}
|
|
594
614
|
|
|
615
|
+
@property
|
|
616
|
+
def is_nebius(self) -> bool:
|
|
617
|
+
r"""Returns whether this type of models is served by Nebius AI
|
|
618
|
+
Studio."""
|
|
619
|
+
return self in {
|
|
620
|
+
ModelType.NEBIUS_GPT_OSS_120B,
|
|
621
|
+
ModelType.NEBIUS_GPT_OSS_20B,
|
|
622
|
+
ModelType.NEBIUS_GLM_4_5,
|
|
623
|
+
ModelType.NEBIUS_DEEPSEEK_V3,
|
|
624
|
+
ModelType.NEBIUS_DEEPSEEK_R1,
|
|
625
|
+
ModelType.NEBIUS_LLAMA_3_1_70B,
|
|
626
|
+
ModelType.NEBIUS_MISTRAL_7B_INSTRUCT,
|
|
627
|
+
}
|
|
628
|
+
|
|
595
629
|
@property
|
|
596
630
|
def is_openrouter(self) -> bool:
|
|
597
631
|
r"""Returns whether this type of models is served by OpenRouter."""
|
|
@@ -603,6 +637,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
603
637
|
ModelType.OPENROUTER_LLAMA_4_SCOUT,
|
|
604
638
|
ModelType.OPENROUTER_LLAMA_4_SCOUT_FREE,
|
|
605
639
|
ModelType.OPENROUTER_OLYMPICODER_7B,
|
|
640
|
+
ModelType.OPENROUTER_HORIZON_ALPHA,
|
|
606
641
|
}
|
|
607
642
|
|
|
608
643
|
@property
|
|
@@ -650,8 +685,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
650
685
|
ModelType.MISTRAL_PIXTRAL_12B,
|
|
651
686
|
ModelType.MISTRAL_8B,
|
|
652
687
|
ModelType.MISTRAL_3B,
|
|
653
|
-
ModelType.
|
|
654
|
-
ModelType.MAGISTRAL_MEDIUM,
|
|
688
|
+
ModelType.MISTRAL_MEDIUM_3_1,
|
|
655
689
|
ModelType.MISTRAL_SMALL_3_2,
|
|
656
690
|
}
|
|
657
691
|
|
|
@@ -1127,6 +1161,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1127
1161
|
ModelType.NOVITA_MISTRAL_7B,
|
|
1128
1162
|
ModelType.NOVITA_LLAMA_3_2_11B_VISION,
|
|
1129
1163
|
ModelType.NOVITA_LLAMA_3_2_3B,
|
|
1164
|
+
ModelType.NEBIUS_MISTRAL_7B_INSTRUCT,
|
|
1130
1165
|
}:
|
|
1131
1166
|
return 32_768
|
|
1132
1167
|
elif self in {
|
|
@@ -1170,6 +1205,9 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1170
1205
|
ModelType.O1_PREVIEW,
|
|
1171
1206
|
ModelType.O1_MINI,
|
|
1172
1207
|
ModelType.GPT_4_5_PREVIEW,
|
|
1208
|
+
ModelType.GPT_5,
|
|
1209
|
+
ModelType.GPT_5_NANO,
|
|
1210
|
+
ModelType.GPT_5_MINI,
|
|
1173
1211
|
ModelType.MISTRAL_LARGE,
|
|
1174
1212
|
ModelType.MISTRAL_NEMO,
|
|
1175
1213
|
ModelType.MISTRAL_PIXTRAL_12B,
|
|
@@ -1209,10 +1247,15 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1209
1247
|
ModelType.NETMIND_DEEPSEEK_R1,
|
|
1210
1248
|
ModelType.NETMIND_DEEPSEEK_V3,
|
|
1211
1249
|
ModelType.NOVITA_DEEPSEEK_V3_0324,
|
|
1212
|
-
ModelType.
|
|
1250
|
+
ModelType.MISTRAL_MEDIUM_3_1,
|
|
1213
1251
|
ModelType.ERNIE_4_5_TURBO_128K,
|
|
1214
1252
|
ModelType.DEEPSEEK_V3,
|
|
1215
1253
|
ModelType.MOONSHOT_KIMI_K2,
|
|
1254
|
+
ModelType.NEBIUS_GLM_4_5,
|
|
1255
|
+
ModelType.NEBIUS_DEEPSEEK_V3,
|
|
1256
|
+
ModelType.NEBIUS_DEEPSEEK_R1,
|
|
1257
|
+
ModelType.NEBIUS_GPT_OSS_120B,
|
|
1258
|
+
ModelType.NEBIUS_GPT_OSS_20B,
|
|
1216
1259
|
}:
|
|
1217
1260
|
return 128_000
|
|
1218
1261
|
elif self in {
|
|
@@ -1247,6 +1290,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1247
1290
|
ModelType.NOVITA_LLAMA_4_SCOUT_17B,
|
|
1248
1291
|
ModelType.NOVITA_LLAMA_3_3_70B,
|
|
1249
1292
|
ModelType.NOVITA_MISTRAL_NEMO,
|
|
1293
|
+
ModelType.NEBIUS_LLAMA_3_1_70B,
|
|
1250
1294
|
}:
|
|
1251
1295
|
return 131_072
|
|
1252
1296
|
elif self in {
|
|
@@ -1262,6 +1306,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1262
1306
|
ModelType.CLAUDE_3_7_SONNET,
|
|
1263
1307
|
ModelType.CLAUDE_SONNET_4,
|
|
1264
1308
|
ModelType.CLAUDE_OPUS_4,
|
|
1309
|
+
ModelType.CLAUDE_OPUS_4_1,
|
|
1265
1310
|
ModelType.YI_MEDIUM_200K,
|
|
1266
1311
|
ModelType.AWS_CLAUDE_3_5_SONNET,
|
|
1267
1312
|
ModelType.AWS_CLAUDE_3_HAIKU,
|
|
@@ -1269,6 +1314,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1269
1314
|
ModelType.AWS_CLAUDE_3_7_SONNET,
|
|
1270
1315
|
ModelType.AWS_CLAUDE_SONNET_4,
|
|
1271
1316
|
ModelType.AWS_CLAUDE_OPUS_4,
|
|
1317
|
+
ModelType.AWS_CLAUDE_OPUS_4_1,
|
|
1272
1318
|
ModelType.O4_MINI,
|
|
1273
1319
|
ModelType.O3,
|
|
1274
1320
|
}:
|
|
@@ -1276,6 +1322,7 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1276
1322
|
elif self in {
|
|
1277
1323
|
ModelType.MISTRAL_CODESTRAL_MAMBA,
|
|
1278
1324
|
ModelType.OPENROUTER_LLAMA_4_MAVERICK_FREE,
|
|
1325
|
+
ModelType.OPENROUTER_HORIZON_ALPHA,
|
|
1279
1326
|
}:
|
|
1280
1327
|
return 256_000
|
|
1281
1328
|
|
|
@@ -1317,10 +1364,6 @@ class ModelType(UnifiedModelType, Enum):
|
|
|
1317
1364
|
ModelType.TOGETHER_LLAMA_4_SCOUT,
|
|
1318
1365
|
}:
|
|
1319
1366
|
return 10_000_000
|
|
1320
|
-
elif self in {
|
|
1321
|
-
ModelType.MAGISTRAL_MEDIUM,
|
|
1322
|
-
}:
|
|
1323
|
-
return 40_000
|
|
1324
1367
|
|
|
1325
1368
|
else:
|
|
1326
1369
|
logger.warning(
|
|
@@ -1519,6 +1562,7 @@ class ModelPlatformType(Enum):
|
|
|
1519
1562
|
AZURE = "azure"
|
|
1520
1563
|
ANTHROPIC = "anthropic"
|
|
1521
1564
|
GROQ = "groq"
|
|
1565
|
+
NEBIUS = "nebius"
|
|
1522
1566
|
OPENROUTER = "openrouter"
|
|
1523
1567
|
OLLAMA = "ollama"
|
|
1524
1568
|
LITELLM = "litellm"
|
camel/types/openai_types.py
CHANGED
|
@@ -33,7 +33,7 @@ from openai.types.chat.chat_completion_user_message_param import (
|
|
|
33
33
|
from openai.types.completion_usage import CompletionUsage
|
|
34
34
|
from openai.types.chat import ParsedChatCompletion
|
|
35
35
|
from openai._types import NOT_GIVEN, NotGiven
|
|
36
|
-
from openai.types.chat import
|
|
36
|
+
from openai.types.chat import ChatCompletionMessageFunctionToolCall
|
|
37
37
|
|
|
38
38
|
__all__ = [
|
|
39
39
|
"Choice",
|
|
@@ -45,7 +45,7 @@ __all__ = [
|
|
|
45
45
|
"ChatCompletionUserMessageParam",
|
|
46
46
|
"ChatCompletionAssistantMessageParam",
|
|
47
47
|
"ChatCompletionToolMessageParam",
|
|
48
|
-
"
|
|
48
|
+
"ChatCompletionMessageFunctionToolCall",
|
|
49
49
|
"CompletionUsage",
|
|
50
50
|
"ParsedChatCompletion",
|
|
51
51
|
"NOT_GIVEN",
|
|
@@ -95,6 +95,11 @@ class UnifiedModelType(str):
|
|
|
95
95
|
r"""Returns whether the model is a Groq served model."""
|
|
96
96
|
return True
|
|
97
97
|
|
|
98
|
+
@property
|
|
99
|
+
def is_nebius(self) -> bool:
|
|
100
|
+
r"""Returns whether the model is a Nebius AI Studio served model."""
|
|
101
|
+
return True
|
|
102
|
+
|
|
98
103
|
@property
|
|
99
104
|
def is_openrouter(self) -> bool:
|
|
100
105
|
r"""Returns whether the model is a OpenRouter served model."""
|
camel/utils/mcp.py
CHANGED
|
@@ -106,11 +106,11 @@ class MCPServer:
|
|
|
106
106
|
"""
|
|
107
107
|
from mcp.server.fastmcp import FastMCP
|
|
108
108
|
|
|
109
|
-
from camel.toolkits.base import BaseToolkit
|
|
110
|
-
|
|
111
109
|
original_init = cls.__init__
|
|
112
110
|
|
|
113
111
|
def new_init(instance, *args, **kwargs):
|
|
112
|
+
from camel.toolkits.base import BaseToolkit
|
|
113
|
+
|
|
114
114
|
original_init(instance, *args, **kwargs)
|
|
115
115
|
self.server_name = self.server_name or cls.__name__
|
|
116
116
|
instance.mcp = FastMCP(self.server_name)
|
camel/utils/token_counting.py
CHANGED
|
@@ -133,7 +133,11 @@ class OpenAITokenCounter(BaseTokenCounter):
|
|
|
133
133
|
self.tokens_per_message = 4
|
|
134
134
|
# If there's a name, the role is omitted
|
|
135
135
|
self.tokens_per_name = -1
|
|
136
|
-
elif (
|
|
136
|
+
elif (
|
|
137
|
+
("gpt-3.5-turbo" in self.model)
|
|
138
|
+
or ("gpt-4" in self.model)
|
|
139
|
+
or ("gpt-5" in self.model)
|
|
140
|
+
):
|
|
137
141
|
self.tokens_per_message = 3
|
|
138
142
|
self.tokens_per_name = 1
|
|
139
143
|
elif (
|
|
@@ -280,15 +284,26 @@ class OpenAITokenCounter(BaseTokenCounter):
|
|
|
280
284
|
|
|
281
285
|
class AnthropicTokenCounter(BaseTokenCounter):
|
|
282
286
|
@dependencies_required('anthropic')
|
|
283
|
-
def __init__(
|
|
287
|
+
def __init__(
|
|
288
|
+
self,
|
|
289
|
+
model: str,
|
|
290
|
+
api_key: Optional[str] = None,
|
|
291
|
+
base_url: Optional[str] = None,
|
|
292
|
+
):
|
|
284
293
|
r"""Constructor for the token counter for Anthropic models.
|
|
285
294
|
|
|
286
295
|
Args:
|
|
287
296
|
model (str): The name of the Anthropic model being used.
|
|
297
|
+
api_key (Optional[str], optional): The API key for authenticating
|
|
298
|
+
with the Anthropic service. If not provided, it will use the
|
|
299
|
+
ANTHROPIC_API_KEY environment variable. (default: :obj:`None`)
|
|
300
|
+
base_url (Optional[str], optional): The URL of the Anthropic
|
|
301
|
+
service. If not provided, it will use the default Anthropic
|
|
302
|
+
URL. (default: :obj:`None`)
|
|
288
303
|
"""
|
|
289
304
|
from anthropic import Anthropic
|
|
290
305
|
|
|
291
|
-
self.client = Anthropic()
|
|
306
|
+
self.client = Anthropic(api_key=api_key, base_url=base_url)
|
|
292
307
|
self.model = model
|
|
293
308
|
|
|
294
309
|
@dependencies_required('anthropic')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: camel-ai
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.75
|
|
4
4
|
Summary: Communicative Agents for AI Society Study
|
|
5
5
|
Project-URL: Homepage, https://www.camel-ai.org/
|
|
6
6
|
Project-URL: Repository, https://github.com/camel-ai/camel
|
|
@@ -32,7 +32,7 @@ Requires-Dist: azure-storage-blob<13,>=12.21.0; extra == 'all'
|
|
|
32
32
|
Requires-Dist: beautifulsoup4<5,>=4; extra == 'all'
|
|
33
33
|
Requires-Dist: botocore<2,>=1.35.3; extra == 'all'
|
|
34
34
|
Requires-Dist: chromadb<1.0.0,>=0.6.0; extra == 'all'
|
|
35
|
-
Requires-Dist: chunkr-ai
|
|
35
|
+
Requires-Dist: chunkr-ai<0.1.0,>=0.0.50; extra == 'all'
|
|
36
36
|
Requires-Dist: cohere<6,>=5.11.0; extra == 'all'
|
|
37
37
|
Requires-Dist: crawl4ai>=0.4.0; extra == 'all'
|
|
38
38
|
Requires-Dist: dappier<0.4,>=0.3.3; extra == 'all'
|
|
@@ -91,6 +91,7 @@ Requires-Dist: playwright>=1.50.0; extra == 'all'
|
|
|
91
91
|
Requires-Dist: prance<24,>=23.6.21.0; extra == 'all'
|
|
92
92
|
Requires-Dist: praw<8,>=7.7.1; extra == 'all'
|
|
93
93
|
Requires-Dist: pre-commit<4,>=3; extra == 'all'
|
|
94
|
+
Requires-Dist: protobuf>=6.0.0; extra == 'all'
|
|
94
95
|
Requires-Dist: psycopg[binary]<4,>=3.1.18; extra == 'all'
|
|
95
96
|
Requires-Dist: pyautogui<0.10,>=0.9.54; extra == 'all'
|
|
96
97
|
Requires-Dist: pydub<0.26,>=0.25.1; extra == 'all'
|
|
@@ -128,7 +129,6 @@ Requires-Dist: sympy<2,>=1.13.3; extra == 'all'
|
|
|
128
129
|
Requires-Dist: tabulate>=0.9.0; extra == 'all'
|
|
129
130
|
Requires-Dist: tavily-python<0.6,>=0.5.0; extra == 'all'
|
|
130
131
|
Requires-Dist: textblob<0.18,>=0.17.1; extra == 'all'
|
|
131
|
-
Requires-Dist: traceroot==0.0.4a5; extra == 'all'
|
|
132
132
|
Requires-Dist: transformers<5,>=4; extra == 'all'
|
|
133
133
|
Requires-Dist: tree-sitter-python<0.24,>=0.23.6; extra == 'all'
|
|
134
134
|
Requires-Dist: tree-sitter<0.24,>=0.23.2; extra == 'all'
|
|
@@ -193,7 +193,6 @@ Requires-Dist: ipykernel<7,>=6.0.0; extra == 'dev-tools'
|
|
|
193
193
|
Requires-Dist: jupyter-client<9,>=8.6.2; extra == 'dev-tools'
|
|
194
194
|
Requires-Dist: langfuse>=2.60.5; extra == 'dev-tools'
|
|
195
195
|
Requires-Dist: mcp>=1.3.0; extra == 'dev-tools'
|
|
196
|
-
Requires-Dist: traceroot==0.0.4a5; extra == 'dev-tools'
|
|
197
196
|
Requires-Dist: tree-sitter-python<0.24,>=0.23.6; extra == 'dev-tools'
|
|
198
197
|
Requires-Dist: tree-sitter<0.24,>=0.23.2; extra == 'dev-tools'
|
|
199
198
|
Requires-Dist: typer>=0.15.2; extra == 'dev-tools'
|
|
@@ -206,7 +205,7 @@ Requires-Dist: sphinx<8,>=7; extra == 'docs'
|
|
|
206
205
|
Requires-Dist: sphinxext-rediraffe<0.3,>=0.2.7; extra == 'docs'
|
|
207
206
|
Provides-Extra: document-tools
|
|
208
207
|
Requires-Dist: beautifulsoup4<5,>=4; extra == 'document-tools'
|
|
209
|
-
Requires-Dist: chunkr-ai
|
|
208
|
+
Requires-Dist: chunkr-ai<0.1.0,>=0.0.50; extra == 'document-tools'
|
|
210
209
|
Requires-Dist: crawl4ai>=0.3.745; extra == 'document-tools'
|
|
211
210
|
Requires-Dist: docx2txt<0.9,>=0.8; extra == 'document-tools'
|
|
212
211
|
Requires-Dist: docx>=0.2.4; extra == 'document-tools'
|
|
@@ -225,17 +224,12 @@ Requires-Dist: tabulate>=0.9.0; extra == 'document-tools'
|
|
|
225
224
|
Requires-Dist: unstructured==0.16.20; extra == 'document-tools'
|
|
226
225
|
Requires-Dist: xls2xlsx>=0.2.0; extra == 'document-tools'
|
|
227
226
|
Provides-Extra: eigent
|
|
228
|
-
Requires-Dist: aci-sdk>=1.0.0b1; extra == 'eigent'
|
|
229
227
|
Requires-Dist: anthropic<0.50.0,>=0.47.0; extra == 'eigent'
|
|
230
|
-
Requires-Dist: chunkr-ai>=0.0.41; extra == 'eigent'
|
|
231
|
-
Requires-Dist: chunkr-ai>=0.0.50; extra == 'eigent'
|
|
232
|
-
Requires-Dist: crawl4ai>=0.3.745; extra == 'eigent'
|
|
233
228
|
Requires-Dist: datasets<4,>=3; extra == 'eigent'
|
|
234
229
|
Requires-Dist: docx>=0.2.4; extra == 'eigent'
|
|
235
|
-
Requires-Dist: duckduckgo-search<7,>=6.3.5; extra == 'eigent'
|
|
236
230
|
Requires-Dist: exa-py<2,>=1.10.0; extra == 'eigent'
|
|
237
231
|
Requires-Dist: ffmpeg-python<0.3,>=0.2.0; extra == 'eigent'
|
|
238
|
-
Requires-Dist:
|
|
232
|
+
Requires-Dist: google-api-python-client==2.166.0; extra == 'eigent'
|
|
239
233
|
Requires-Dist: imageio[pyav]<3,>=2.34.2; extra == 'eigent'
|
|
240
234
|
Requires-Dist: markitdown[all]>=0.1.1; extra == 'eigent'
|
|
241
235
|
Requires-Dist: mcp-server-fetch==2025.1.17; extra == 'eigent'
|
|
@@ -244,8 +238,6 @@ Requires-Dist: numpy<=2.2,>=1.2; extra == 'eigent'
|
|
|
244
238
|
Requires-Dist: onnxruntime<=1.19.2; extra == 'eigent'
|
|
245
239
|
Requires-Dist: openpyxl>=3.1.5; extra == 'eigent'
|
|
246
240
|
Requires-Dist: pandas<2,>=1.5.3; extra == 'eigent'
|
|
247
|
-
Requires-Dist: playwright>=1.50.0; extra == 'eigent'
|
|
248
|
-
Requires-Dist: pyautogui<0.10,>=0.9.54; extra == 'eigent'
|
|
249
241
|
Requires-Dist: pydub<0.26,>=0.25.1; extra == 'eigent'
|
|
250
242
|
Requires-Dist: pylatex>=1.4.2; extra == 'eigent'
|
|
251
243
|
Requires-Dist: pytesseract>=0.3.13; extra == 'eigent'
|
|
@@ -286,8 +278,8 @@ Provides-Extra: owl
|
|
|
286
278
|
Requires-Dist: aci-sdk>=1.0.0b1; extra == 'owl'
|
|
287
279
|
Requires-Dist: anthropic<0.50.0,>=0.47.0; extra == 'owl'
|
|
288
280
|
Requires-Dist: beautifulsoup4<5,>=4; extra == 'owl'
|
|
281
|
+
Requires-Dist: chunkr-ai<0.1.0,>=0.0.50; extra == 'owl'
|
|
289
282
|
Requires-Dist: chunkr-ai>=0.0.41; extra == 'owl'
|
|
290
|
-
Requires-Dist: chunkr-ai>=0.0.50; extra == 'owl'
|
|
291
283
|
Requires-Dist: crawl4ai>=0.3.745; extra == 'owl'
|
|
292
284
|
Requires-Dist: datasets<4,>=3; extra == 'owl'
|
|
293
285
|
Requires-Dist: docx2txt<0.9,>=0.8; extra == 'owl'
|
|
@@ -335,7 +327,7 @@ Requires-Dist: xls2xlsx>=0.2.0; extra == 'owl'
|
|
|
335
327
|
Requires-Dist: yt-dlp<2025,>=2024.11.4; extra == 'owl'
|
|
336
328
|
Provides-Extra: rag
|
|
337
329
|
Requires-Dist: chromadb<1.0.0,>=0.6.0; extra == 'rag'
|
|
338
|
-
Requires-Dist: chunkr-ai
|
|
330
|
+
Requires-Dist: chunkr-ai<0.1.0,>=0.0.50; extra == 'rag'
|
|
339
331
|
Requires-Dist: cohere<6,>=5.11.0; extra == 'rag'
|
|
340
332
|
Requires-Dist: crawl4ai>=0.3.745; extra == 'rag'
|
|
341
333
|
Requires-Dist: faiss-cpu<2,>=1.7.2; extra == 'rag'
|
|
@@ -344,6 +336,7 @@ Requires-Dist: nebula3-python==3.8.2; extra == 'rag'
|
|
|
344
336
|
Requires-Dist: neo4j<6,>=5.18.0; extra == 'rag'
|
|
345
337
|
Requires-Dist: numpy<=2.2,>=1.2; extra == 'rag'
|
|
346
338
|
Requires-Dist: pandasai<3,>=2.3.0; extra == 'rag'
|
|
339
|
+
Requires-Dist: protobuf>=6.0.0; extra == 'rag'
|
|
347
340
|
Requires-Dist: pymilvus<3,>=2.4.0; extra == 'rag'
|
|
348
341
|
Requires-Dist: pyobvector>=0.1.18; extra == 'rag'
|
|
349
342
|
Requires-Dist: pytidb-experimental==0.0.1.dev4; extra == 'rag'
|
|
@@ -365,6 +358,7 @@ Requires-Dist: mem0ai>=0.1.73; extra == 'storage'
|
|
|
365
358
|
Requires-Dist: nebula3-python==3.8.2; extra == 'storage'
|
|
366
359
|
Requires-Dist: neo4j<6,>=5.18.0; extra == 'storage'
|
|
367
360
|
Requires-Dist: pgvector<0.3,>=0.2.4; extra == 'storage'
|
|
361
|
+
Requires-Dist: protobuf>=6.0.0; extra == 'storage'
|
|
368
362
|
Requires-Dist: psycopg[binary]<4,>=3.1.18; extra == 'storage'
|
|
369
363
|
Requires-Dist: pymilvus<3,>=2.4.0; extra == 'storage'
|
|
370
364
|
Requires-Dist: pyobvector>=0.1.18; extra == 'storage'
|