camel-ai 0.1.7.2__py3-none-any.whl → 0.1.9__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 +223 -244
- camel/configs/__init__.py +4 -0
- camel/configs/samba_config.py +99 -1
- camel/models/ollama_model.py +2 -2
- camel/models/samba_model.py +45 -6
- camel/models/vllm_model.py +2 -2
- camel/toolkits/google_maps_toolkit.py +99 -158
- camel/types/enums.py +10 -0
- camel/utils/commons.py +6 -5
- camel/utils/constants.py +1 -1
- camel/utils/token_counting.py +3 -0
- {camel_ai-0.1.7.2.dist-info → camel_ai-0.1.9.dist-info}/METADATA +3 -3
- {camel_ai-0.1.7.2.dist-info → camel_ai-0.1.9.dist-info}/RECORD +15 -15
- {camel_ai-0.1.7.2.dist-info → camel_ai-0.1.9.dist-info}/WHEEL +0 -0
camel/utils/commons.py
CHANGED
|
@@ -29,6 +29,7 @@ from typing import (
|
|
|
29
29
|
Mapping,
|
|
30
30
|
Optional,
|
|
31
31
|
Set,
|
|
32
|
+
Type,
|
|
32
33
|
TypeVar,
|
|
33
34
|
cast,
|
|
34
35
|
)
|
|
@@ -329,12 +330,12 @@ def get_pydantic_major_version() -> int:
|
|
|
329
330
|
return 0
|
|
330
331
|
|
|
331
332
|
|
|
332
|
-
def get_pydantic_object_schema(pydantic_params: BaseModel) -> Dict:
|
|
333
|
+
def get_pydantic_object_schema(pydantic_params: Type[BaseModel]) -> Dict:
|
|
333
334
|
r"""Get the JSON schema of a Pydantic model.
|
|
334
335
|
|
|
335
336
|
Args:
|
|
336
|
-
pydantic_params (BaseModel): The Pydantic model to retrieve
|
|
337
|
-
for.
|
|
337
|
+
pydantic_params (Type[BaseModel]): The Pydantic model class to retrieve
|
|
338
|
+
the schema for.
|
|
338
339
|
|
|
339
340
|
Returns:
|
|
340
341
|
dict: The JSON schema of the Pydantic model.
|
|
@@ -354,7 +355,7 @@ def func_string_to_callable(code: str):
|
|
|
354
355
|
"""
|
|
355
356
|
local_vars: Mapping[str, object] = {}
|
|
356
357
|
exec(code, globals(), local_vars)
|
|
357
|
-
func = local_vars.get(Constants.
|
|
358
|
+
func = local_vars.get(Constants.FUNC_NAME_FOR_STRUCTURED_OUTPUT)
|
|
358
359
|
return func
|
|
359
360
|
|
|
360
361
|
|
|
@@ -397,7 +398,7 @@ def json_to_function_code(json_obj: Dict) -> str:
|
|
|
397
398
|
|
|
398
399
|
# function template
|
|
399
400
|
function_code = f'''
|
|
400
|
-
def {Constants.
|
|
401
|
+
def {Constants.FUNC_NAME_FOR_STRUCTURED_OUTPUT}({args_str}):
|
|
401
402
|
r"""Return response with a specified json format.
|
|
402
403
|
Args:
|
|
403
404
|
{docstring_args_str}
|
camel/utils/constants.py
CHANGED
|
@@ -26,7 +26,7 @@ class Constants:
|
|
|
26
26
|
VIDEO_DEFAULT_PLUG_PYAV = "pyav"
|
|
27
27
|
|
|
28
28
|
# Return response with json format
|
|
29
|
-
|
|
29
|
+
FUNC_NAME_FOR_STRUCTURED_OUTPUT = "return_json_response"
|
|
30
30
|
|
|
31
31
|
# Default top k vaule for RAG
|
|
32
32
|
DEFAULT_TOP_K_RESULTS = 1
|
camel/utils/token_counting.py
CHANGED
|
@@ -288,6 +288,9 @@ class OpenAITokenCounter(BaseTokenCounter):
|
|
|
288
288
|
elif ("gpt-3.5-turbo" in self.model) or ("gpt-4" in self.model):
|
|
289
289
|
self.tokens_per_message = 3
|
|
290
290
|
self.tokens_per_name = 1
|
|
291
|
+
elif "o1" in self.model:
|
|
292
|
+
self.tokens_per_message = 2
|
|
293
|
+
self.tokens_per_name = 1
|
|
291
294
|
else:
|
|
292
295
|
# flake8: noqa :E501
|
|
293
296
|
raise NotImplementedError(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: camel-ai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: Communicative Agents for AI Society Study
|
|
5
5
|
Home-page: https://www.camel-ai.org/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -56,7 +56,7 @@ Requires-Dist: neo4j (>=5.18.0,<6.0.0) ; extra == "graph-storages" or extra == "
|
|
|
56
56
|
Requires-Dist: newspaper3k (>=0.2.8,<0.3.0) ; extra == "tools" or extra == "all"
|
|
57
57
|
Requires-Dist: nltk (==3.8.1) ; extra == "tools" or extra == "all"
|
|
58
58
|
Requires-Dist: numpy (>=1,<2)
|
|
59
|
-
Requires-Dist: openai (>=1.
|
|
59
|
+
Requires-Dist: openai (>=1.45.0,<2.0.0)
|
|
60
60
|
Requires-Dist: openapi-spec-validator (>=0.7.1,<0.8.0) ; extra == "tools" or extra == "all"
|
|
61
61
|
Requires-Dist: opencv-python (>=4,<5) ; extra == "huggingface-agent" or extra == "all"
|
|
62
62
|
Requires-Dist: pathlib (>=1.0.1,<2.0.0)
|
|
@@ -213,7 +213,7 @@ conda create --name camel python=3.10
|
|
|
213
213
|
conda activate camel
|
|
214
214
|
|
|
215
215
|
# Clone github repo
|
|
216
|
-
git clone -b v0.1.
|
|
216
|
+
git clone -b v0.1.9 https://github.com/camel-ai/camel.git
|
|
217
217
|
|
|
218
218
|
# Change directory into project directory
|
|
219
219
|
cd camel
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=0t0atK37gcEwQ9syAnmmC8-6jJFevBMXq-PGtcDpcic,778
|
|
2
2
|
camel/agents/__init__.py,sha256=SSU1wbhZXWwQnE0rRxkpyN57kEu72KklsZNcdLkXfTs,1551
|
|
3
3
|
camel/agents/base.py,sha256=X39qWSiT1WnDqaJ9k3gQrTpOQSwUKzNEVpp5AY6fDH8,1130
|
|
4
|
-
camel/agents/chat_agent.py,sha256=
|
|
4
|
+
camel/agents/chat_agent.py,sha256=ikYGo5ahcmubb5OHNcHlehTC0adnGxCMx0iKPnyUYoU,35760
|
|
5
5
|
camel/agents/critic_agent.py,sha256=To-istnO-9Eb0iabdeIDrgfvkxYYfsdX9xIZiSrc3oM,7493
|
|
6
6
|
camel/agents/deductive_reasoner_agent.py,sha256=49vwglWYHgXf-VRftdMN9OFGOwqdsXyTt45PP6z-pbg,13473
|
|
7
7
|
camel/agents/embodied_agent.py,sha256=3ABuiRQXBpplKbuhPY5KNLJyKc6Z8SgXgzIges3ZwVs,7542
|
|
@@ -12,7 +12,7 @@ camel/agents/task_agent.py,sha256=n9xIU3QtcptRPSuHZJ4ntQ_M_a8AvJ6U9ZRV8VaxV5A,14
|
|
|
12
12
|
camel/agents/tool_agents/__init__.py,sha256=ulTNWU2qoFGe3pvVmCq_sdfeSX3NKZ0due66TYvsL-M,862
|
|
13
13
|
camel/agents/tool_agents/base.py,sha256=nQAhfWi8a_bCgzlf5-G-tmj1fKm6AjpRc89NQkWwpnc,1399
|
|
14
14
|
camel/agents/tool_agents/hugging_face_tool_agent.py,sha256=1Z5tG6f_86eL0vmtRZ-BJvoLDFFLhoHt8JtDvgat1xU,8723
|
|
15
|
-
camel/configs/__init__.py,sha256=
|
|
15
|
+
camel/configs/__init__.py,sha256=3SCXrA7ML8CNoOWQ1poJY6dE2e07Qxf7ACD_mdo2aJ8,2341
|
|
16
16
|
camel/configs/anthropic_config.py,sha256=DGQoPyYrayhYQ7aSjkYYGHOZ5VdQ9qahtaS0p_GpU0Q,3294
|
|
17
17
|
camel/configs/base_config.py,sha256=gjsDACMCk-hXDBk7qkeHcpbQrWy6jbp4iyzfqgghJEk,2485
|
|
18
18
|
camel/configs/gemini_config.py,sha256=YHJSNEAIxBxPX1NAj2rWvM4OOR7vmIANH88pZO-aOsY,6880
|
|
@@ -22,7 +22,7 @@ camel/configs/mistral_config.py,sha256=G9LuY0-3S6az-8j8kpqB-4asgoaxTOsZVYeZBYJl6
|
|
|
22
22
|
camel/configs/ollama_config.py,sha256=xrT-ulqvANjIu0bVxOzN93uaKUs8e2gW1tmYK1jULEM,4357
|
|
23
23
|
camel/configs/openai_config.py,sha256=yQf7lkBcYTtCNAopow3SlZgcDMlMkiCpC5Dvhh9wb9M,7327
|
|
24
24
|
camel/configs/reka_config.py,sha256=ECYg3BT7onwZX-iKLq-5TBhCFdm70rV-9hZ_G6Ye8-k,3504
|
|
25
|
-
camel/configs/samba_config.py,sha256=
|
|
25
|
+
camel/configs/samba_config.py,sha256=U1krJSFRaFCvNCxKxgT0zlYxifviHsdkS53hr6D_Bvg,10254
|
|
26
26
|
camel/configs/togetherai_config.py,sha256=WERo8W6yb-qy_3qa1GUckt58J5XGKwN5X_nC9baL8Cs,5663
|
|
27
27
|
camel/configs/vllm_config.py,sha256=jfeveBnlkkBHC2RFkffG6ZlTkGzkwrX_WXMwHkg36Jg,5516
|
|
28
28
|
camel/configs/zhipuai_config.py,sha256=zU8Zaj3d9d7SCFEFIkCIRNlnJw9z_oFDmIoCQKrerEM,3600
|
|
@@ -68,16 +68,16 @@ camel/models/litellm_model.py,sha256=5sTOzI07FsxDEW3jSK-XXBx91Yo8z9voahyCsK36U6U
|
|
|
68
68
|
camel/models/mistral_model.py,sha256=39rHJ-z_6Z-UbtUqZPEAbCdFYY1Ft0Drs42jG5hHaho,9517
|
|
69
69
|
camel/models/model_factory.py,sha256=_dQOx_MYxXih6uQOjkKR7uoIrhDcWRsMTKHbO3NLYN0,5974
|
|
70
70
|
camel/models/nemotron_model.py,sha256=2Idf4wrZervxvfu6av42EKjefFtDnBb6cKnWCJUkqI4,2682
|
|
71
|
-
camel/models/ollama_model.py,sha256=
|
|
71
|
+
camel/models/ollama_model.py,sha256=FSMwH2-856Zhxusm4B773xBBHdlD3UOw9OAuH5eTJTw,5686
|
|
72
72
|
camel/models/open_source_model.py,sha256=p5a2sCeZl5SyrgkygClndOrHEjpJxmyhE1CqKE2fZSw,6363
|
|
73
73
|
camel/models/openai_audio_models.py,sha256=_ddOxqzFZCVZaK6h33Z0THU6HXk2XlJTxVWquZ3oOaQ,10042
|
|
74
74
|
camel/models/openai_compatibility_model.py,sha256=7h1zSFBgg_mQojFvtSqC54tcZOZY0NFsZ7ZNlns5CWk,4229
|
|
75
75
|
camel/models/openai_model.py,sha256=uOtiLmbdH7sDKqk9oV0i1HEVni_4ApPXCukShZwQDKA,4611
|
|
76
76
|
camel/models/reka_model.py,sha256=_ERZvtkK0Gd7GUx3f4VVqqtH093clVMoJfa896t9f2M,8043
|
|
77
|
-
camel/models/samba_model.py,sha256=
|
|
77
|
+
camel/models/samba_model.py,sha256=CgAYMIVJFAEoyCOsYS7qD_bvWhzOkvA6SD5nGBClbzE,17699
|
|
78
78
|
camel/models/stub_model.py,sha256=DuqaBsS55STSbcLJsk025Uwo_u4ixrSSKqKEoZj2ihY,3680
|
|
79
79
|
camel/models/togetherai_model.py,sha256=kUFGxb6cXUgkvMNQ0MsDKW27Udw622zt2QIVa3U7iLU,5461
|
|
80
|
-
camel/models/vllm_model.py,sha256=
|
|
80
|
+
camel/models/vllm_model.py,sha256=Q71tfFyfd1t81r1CxS6UT5KLadDYPgOt_cG_z6DHkWE,5808
|
|
81
81
|
camel/models/zhipuai_model.py,sha256=JqJDEMk6vWH-ZnKkMwdG4yDvJWf1xk4PBsp2ifSFGR0,4939
|
|
82
82
|
camel/prompts/__init__.py,sha256=O5bkcuwj2kXTkz5yDPiiMI8KN04vI8bCKG7mGE1SIdI,2326
|
|
83
83
|
camel/prompts/ai_society.py,sha256=ApgvIED1Z_mdsWDNc2_u35Ktp7pEKksMrOIQKo_q5cI,6306
|
|
@@ -137,7 +137,7 @@ camel/toolkits/base.py,sha256=ez04Ei8jwIAws023bM19EGkOPUkQMouULqBvOKfM4kM,986
|
|
|
137
137
|
camel/toolkits/code_execution.py,sha256=fWBhn1_3adiv7YYuA0gJzEBlc_dYNS6_hVtDbgB-zX0,2425
|
|
138
138
|
camel/toolkits/dalle_toolkit.py,sha256=IalDFfNCz58LMRdCZNSJfLMiauHGBGN9XNRV7pzuf28,5261
|
|
139
139
|
camel/toolkits/github_toolkit.py,sha256=ZauRY-kW8nx_L6igVEF62hD16j3KhqU2r49t1j6hO78,10979
|
|
140
|
-
camel/toolkits/google_maps_toolkit.py,sha256=
|
|
140
|
+
camel/toolkits/google_maps_toolkit.py,sha256=o81DvsOaqmpk-EUkMHlXwEoM7JOvdY8eInTsgTF8EFs,12204
|
|
141
141
|
camel/toolkits/linkedin_toolkit.py,sha256=gdqj-6XnVUH-YpkZMS042t-FQ4yB1KRj3syCwjfLrnw,8004
|
|
142
142
|
camel/toolkits/math_toolkit.py,sha256=r-85DHvihR87DU6n_W75pecV1P9xV3Hylfp6u-ue7T4,2521
|
|
143
143
|
camel/toolkits/open_api_specs/biztoc/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
@@ -174,13 +174,13 @@ camel/toolkits/slack_toolkit.py,sha256=JdgDJe7iExTmG7dDXOG6v5KpVjZ6_My_d_WFTYSxk
|
|
|
174
174
|
camel/toolkits/twitter_toolkit.py,sha256=oQw8wRkU7iDxaocsmWvio4pU75pmq6FJAorPdQ2xEAE,19810
|
|
175
175
|
camel/toolkits/weather_toolkit.py,sha256=n4YrUI_jTIH7oqH918IdHbXLgfQ2BPGIWWK8Jp8G1Uw,7054
|
|
176
176
|
camel/types/__init__.py,sha256=ArKXATj3z_Vv4ISmROVeo6Mv3tj5kE1dTkqfgwyxVY4,1975
|
|
177
|
-
camel/types/enums.py,sha256=
|
|
177
|
+
camel/types/enums.py,sha256=APqZIKtR2tVbUe-1JZWi7a50gjjDC7QHw9A0eKJuefA,17642
|
|
178
178
|
camel/types/openai_types.py,sha256=BNQ6iCzKTjSvgcXFsAFIgrUS_YUFZBU6bDoyAp387hI,2045
|
|
179
179
|
camel/utils/__init__.py,sha256=IdI9v0FetNR-nx-Hg4bmNHoYto6Xfcs_uaomksdewmo,2303
|
|
180
180
|
camel/utils/async_func.py,sha256=SLo8KPkrNKdsONvFf3KBb33EgFn4gH2EKSX1aI_LKes,1578
|
|
181
|
-
camel/utils/commons.py,sha256=
|
|
182
|
-
camel/utils/constants.py,sha256=
|
|
183
|
-
camel/utils/token_counting.py,sha256=
|
|
181
|
+
camel/utils/commons.py,sha256=y7eng5QF5Hkt5tuNhtEOJycTIq9hXymrUuwIS5nRad4,16481
|
|
182
|
+
camel/utils/constants.py,sha256=8n4F8Y-DZy4z2F0hRvAq6f-d9SbS59kK5FyLrnJ3mkY,1360
|
|
183
|
+
camel/utils/token_counting.py,sha256=HLzpKADWxn8g9YnXaiUnIeIkbic6wkxmGJb17MT7VyI,21114
|
|
184
184
|
camel/workforce/__init__.py,sha256=6jwJWDlESEqcnWCm61WCyjzFUF6KLzXA_fGI86rHfiE,878
|
|
185
185
|
camel/workforce/base.py,sha256=lEHqgOV1tmsy7y4wuuKClcDkoPCRvXVdMrBngsM_6yY,1722
|
|
186
186
|
camel/workforce/manager_node.py,sha256=eMmsOAoy0Wtk92b_06GhGnwKDgrTo0w-UgQorkh-az0,11529
|
|
@@ -191,6 +191,6 @@ camel/workforce/utils.py,sha256=Z-kODz5PMPtfeKKVqpcQq-b-B8oqC7XSwi_F3__Ijhs,3526
|
|
|
191
191
|
camel/workforce/worker_node.py,sha256=wsRqk2rugCvvkcmCzvn-y-gQuyuJGAG8PIr1KtgqJFw,3878
|
|
192
192
|
camel/workforce/workforce.py,sha256=SVJJgSSkYvk05RgL9oaJzHwzziH7u51KLINRuzLB8BI,1773
|
|
193
193
|
camel/workforce/workforce_prompt.py,sha256=cAWYEIA0rau5itEekSoUIFttBzpKM9RzB6x-mfukGSU,4665
|
|
194
|
-
camel_ai-0.1.
|
|
195
|
-
camel_ai-0.1.
|
|
196
|
-
camel_ai-0.1.
|
|
194
|
+
camel_ai-0.1.9.dist-info/METADATA,sha256=pHRs4KpziV_Nc7wl43oQfYqYNVVo15HdgI9XqgzC1yc,24655
|
|
195
|
+
camel_ai-0.1.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
196
|
+
camel_ai-0.1.9.dist-info/RECORD,,
|
|
File without changes
|