camel-ai 0.1.3__py3-none-any.whl → 0.1.4__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/__init__.py +2 -0
- camel/agents/chat_agent.py +40 -53
- camel/agents/knowledge_graph_agent.py +221 -0
- camel/configs/__init__.py +29 -0
- camel/configs/anthropic_config.py +73 -0
- camel/configs/base_config.py +22 -0
- camel/configs/openai_config.py +132 -0
- camel/embeddings/openai_embedding.py +7 -2
- camel/functions/__init__.py +13 -8
- camel/functions/open_api_function.py +380 -0
- camel/functions/open_api_specs/coursera/__init__.py +13 -0
- camel/functions/open_api_specs/coursera/openapi.yaml +82 -0
- camel/functions/open_api_specs/klarna/__init__.py +13 -0
- camel/functions/open_api_specs/klarna/openapi.yaml +87 -0
- camel/functions/open_api_specs/speak/__init__.py +13 -0
- camel/functions/open_api_specs/speak/openapi.yaml +151 -0
- camel/functions/openai_function.py +3 -1
- camel/functions/retrieval_functions.py +61 -0
- camel/functions/slack_functions.py +275 -0
- camel/models/__init__.py +2 -0
- camel/models/anthropic_model.py +16 -2
- camel/models/base_model.py +8 -2
- camel/models/model_factory.py +7 -3
- camel/models/openai_audio_models.py +251 -0
- camel/models/openai_model.py +12 -4
- camel/models/stub_model.py +5 -1
- camel/retrievers/__init__.py +2 -0
- camel/retrievers/auto_retriever.py +47 -36
- camel/retrievers/base.py +42 -37
- camel/retrievers/bm25_retriever.py +10 -19
- camel/retrievers/cohere_rerank_retriever.py +108 -0
- camel/retrievers/vector_retriever.py +43 -26
- camel/storages/vectordb_storages/qdrant.py +3 -1
- camel/toolkits/__init__.py +21 -0
- camel/toolkits/base.py +22 -0
- camel/toolkits/github_toolkit.py +245 -0
- camel/types/__init__.py +6 -0
- camel/types/enums.py +44 -3
- camel/utils/__init__.py +4 -2
- camel/utils/commons.py +97 -173
- {camel_ai-0.1.3.dist-info → camel_ai-0.1.4.dist-info}/METADATA +9 -3
- {camel_ai-0.1.3.dist-info → camel_ai-0.1.4.dist-info}/RECORD +44 -26
- camel/configs.py +0 -271
- {camel_ai-0.1.3.dist-info → camel_ai-0.1.4.dist-info}/WHEEL +0 -0
camel/types/enums.py
CHANGED
|
@@ -28,7 +28,7 @@ class ModelType(Enum):
|
|
|
28
28
|
GPT_4 = "gpt-4"
|
|
29
29
|
GPT_4_32K = "gpt-4-32k"
|
|
30
30
|
GPT_4_TURBO = "gpt-4-turbo"
|
|
31
|
-
|
|
31
|
+
GPT_4O = "gpt-4o"
|
|
32
32
|
|
|
33
33
|
STUB = "stub"
|
|
34
34
|
|
|
@@ -59,7 +59,7 @@ class ModelType(Enum):
|
|
|
59
59
|
ModelType.GPT_4,
|
|
60
60
|
ModelType.GPT_4_32K,
|
|
61
61
|
ModelType.GPT_4_TURBO,
|
|
62
|
-
ModelType.
|
|
62
|
+
ModelType.GPT_4O,
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
@property
|
|
@@ -101,7 +101,7 @@ class ModelType(Enum):
|
|
|
101
101
|
return 32768
|
|
102
102
|
elif self is ModelType.GPT_4_TURBO:
|
|
103
103
|
return 128000
|
|
104
|
-
elif self is ModelType.
|
|
104
|
+
elif self is ModelType.GPT_4O:
|
|
105
105
|
return 128000
|
|
106
106
|
elif self is ModelType.STUB:
|
|
107
107
|
return 4096
|
|
@@ -247,3 +247,44 @@ class OpenAIImageDetailType(Enum):
|
|
|
247
247
|
class StorageType(Enum):
|
|
248
248
|
MILVUS = "milvus"
|
|
249
249
|
QDRANT = "qdrant"
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
class OpenAPIName(Enum):
|
|
253
|
+
COURSERA = "coursera"
|
|
254
|
+
KLARNA = "klarna"
|
|
255
|
+
SPEAK = "speak"
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
class AudioModelType(Enum):
|
|
259
|
+
TTS_1 = "tts-1"
|
|
260
|
+
TTS_1_HD = "tts-1-hd"
|
|
261
|
+
|
|
262
|
+
@property
|
|
263
|
+
def is_openai(self) -> bool:
|
|
264
|
+
r"""Returns whether this type of audio models is an OpenAI-released
|
|
265
|
+
model."""
|
|
266
|
+
return self in {
|
|
267
|
+
AudioModelType.TTS_1,
|
|
268
|
+
AudioModelType.TTS_1_HD,
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class VoiceType(Enum):
|
|
273
|
+
ALLOY = "alloy"
|
|
274
|
+
ECHO = "echo"
|
|
275
|
+
FABLE = "fable"
|
|
276
|
+
ONYX = "onyx"
|
|
277
|
+
NOVA = "nova"
|
|
278
|
+
SHIMMER = "shimmer"
|
|
279
|
+
|
|
280
|
+
@property
|
|
281
|
+
def is_openai(self) -> bool:
|
|
282
|
+
r"""Returns whether this type of voice is an OpenAI-released voice."""
|
|
283
|
+
return self in {
|
|
284
|
+
VoiceType.ALLOY,
|
|
285
|
+
VoiceType.ECHO,
|
|
286
|
+
VoiceType.FABLE,
|
|
287
|
+
VoiceType.ONYX,
|
|
288
|
+
VoiceType.NOVA,
|
|
289
|
+
VoiceType.SHIMMER,
|
|
290
|
+
}
|
camel/utils/__init__.py
CHANGED
|
@@ -14,14 +14,15 @@
|
|
|
14
14
|
from .commons import (
|
|
15
15
|
PYDANTIC_V2,
|
|
16
16
|
api_key_required,
|
|
17
|
+
api_keys_required,
|
|
17
18
|
check_server_running,
|
|
19
|
+
dependencies_required,
|
|
18
20
|
download_tasks,
|
|
19
21
|
get_first_int,
|
|
20
22
|
get_prompt_template_key_words,
|
|
21
23
|
get_system_information,
|
|
22
24
|
get_task_list,
|
|
23
25
|
print_text_animated,
|
|
24
|
-
role_playing_with_function,
|
|
25
26
|
to_pascal,
|
|
26
27
|
)
|
|
27
28
|
from .token_counting import (
|
|
@@ -48,5 +49,6 @@ __all__ = [
|
|
|
48
49
|
'BaseTokenCounter',
|
|
49
50
|
'OpenAITokenCounter',
|
|
50
51
|
'OpenSourceTokenCounter',
|
|
51
|
-
'
|
|
52
|
+
'dependencies_required',
|
|
53
|
+
'api_keys_required',
|
|
52
54
|
]
|
camel/utils/commons.py
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# See the License for the specific language governing permissions and
|
|
12
12
|
# limitations under the License.
|
|
13
13
|
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
|
|
14
|
+
import importlib
|
|
14
15
|
import os
|
|
15
16
|
import platform
|
|
16
17
|
import re
|
|
@@ -29,35 +30,8 @@ from camel.types import TaskType
|
|
|
29
30
|
F = TypeVar('F', bound=Callable[..., Any])
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
# Set lazy import
|
|
33
|
-
def get_lazy_imported_functions_module():
|
|
34
|
-
from camel.functions import (
|
|
35
|
-
MAP_FUNCS,
|
|
36
|
-
MATH_FUNCS,
|
|
37
|
-
SEARCH_FUNCS,
|
|
38
|
-
TWITTER_FUNCS,
|
|
39
|
-
WEATHER_FUNCS,
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
return [
|
|
43
|
-
*MATH_FUNCS,
|
|
44
|
-
*SEARCH_FUNCS,
|
|
45
|
-
*WEATHER_FUNCS,
|
|
46
|
-
*MAP_FUNCS,
|
|
47
|
-
*TWITTER_FUNCS,
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
# Set lazy import
|
|
52
|
-
def get_lazy_imported_types_module():
|
|
53
|
-
from camel.types import ModelType
|
|
54
|
-
|
|
55
|
-
return ModelType.GPT_4_TURBO
|
|
56
|
-
|
|
57
|
-
|
|
58
33
|
def api_key_required(func: F) -> F:
|
|
59
|
-
r"""Decorator that checks if the
|
|
60
|
-
environment variables.
|
|
34
|
+
r"""Decorator that checks if the API key is available either as an environment variable or passed directly.
|
|
61
35
|
|
|
62
36
|
Args:
|
|
63
37
|
func (callable): The function to be wrapped.
|
|
@@ -66,14 +40,14 @@ def api_key_required(func: F) -> F:
|
|
|
66
40
|
callable: The decorated function.
|
|
67
41
|
|
|
68
42
|
Raises:
|
|
69
|
-
ValueError: If the
|
|
70
|
-
|
|
43
|
+
ValueError: If the API key is not found, either as an environment
|
|
44
|
+
variable or directly passed.
|
|
71
45
|
"""
|
|
72
46
|
|
|
73
47
|
@wraps(func)
|
|
74
48
|
def wrapper(self, *args, **kwargs):
|
|
75
49
|
if self.model_type.is_openai:
|
|
76
|
-
if 'OPENAI_API_KEY' not in os.environ:
|
|
50
|
+
if not self._api_key and 'OPENAI_API_KEY' not in os.environ:
|
|
77
51
|
raise ValueError('OpenAI API key not found.')
|
|
78
52
|
return func(self, *args, **kwargs)
|
|
79
53
|
elif self.model_type.is_anthropic:
|
|
@@ -216,6 +190,98 @@ def check_server_running(server_url: str) -> bool:
|
|
|
216
190
|
return result == 0
|
|
217
191
|
|
|
218
192
|
|
|
193
|
+
def dependencies_required(*required_modules: str) -> Callable[[F], F]:
|
|
194
|
+
r"""A decorator to ensure that specified Python modules
|
|
195
|
+
are available before a function executes.
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
required_modules (str): The required modules to be checked for
|
|
199
|
+
availability.
|
|
200
|
+
|
|
201
|
+
Returns:
|
|
202
|
+
Callable[[F], F]: The original function with the added check for
|
|
203
|
+
required module dependencies.
|
|
204
|
+
|
|
205
|
+
Raises:
|
|
206
|
+
ImportError: If any of the required modules are not available.
|
|
207
|
+
|
|
208
|
+
Example:
|
|
209
|
+
::
|
|
210
|
+
|
|
211
|
+
@dependencies_required('numpy', 'pandas')
|
|
212
|
+
def data_processing_function():
|
|
213
|
+
# Function implementation...
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
def decorator(func: F) -> F:
|
|
217
|
+
@wraps(func)
|
|
218
|
+
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
219
|
+
missing_modules = [
|
|
220
|
+
m for m in required_modules if not is_module_available(m)
|
|
221
|
+
]
|
|
222
|
+
if missing_modules:
|
|
223
|
+
raise ImportError(
|
|
224
|
+
f"Missing required modules: {', '.join(missing_modules)}"
|
|
225
|
+
)
|
|
226
|
+
return func(*args, **kwargs)
|
|
227
|
+
|
|
228
|
+
return cast(F, wrapper)
|
|
229
|
+
|
|
230
|
+
return decorator
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def is_module_available(module_name: str) -> bool:
|
|
234
|
+
r"""Check if a module is available for import.
|
|
235
|
+
|
|
236
|
+
Args:
|
|
237
|
+
module_name (str): The name of the module to check for availability.
|
|
238
|
+
|
|
239
|
+
Returns:
|
|
240
|
+
bool: True if the module can be imported, False otherwise.
|
|
241
|
+
"""
|
|
242
|
+
try:
|
|
243
|
+
importlib.import_module(module_name)
|
|
244
|
+
return True
|
|
245
|
+
except ImportError:
|
|
246
|
+
return False
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def api_keys_required(*required_keys: str) -> Callable[[F], F]:
|
|
250
|
+
r"""A decorator to check if the required API keys are
|
|
251
|
+
present in the environment variables.
|
|
252
|
+
|
|
253
|
+
Args:
|
|
254
|
+
required_keys (str): The required API keys to be checked.
|
|
255
|
+
|
|
256
|
+
Returns:
|
|
257
|
+
Callable[[F], F]: The original function with the added check
|
|
258
|
+
for required API keys.
|
|
259
|
+
|
|
260
|
+
Raises:
|
|
261
|
+
ValueError: If any of the required API keys are missing in the
|
|
262
|
+
environment variables.
|
|
263
|
+
|
|
264
|
+
Example:
|
|
265
|
+
::
|
|
266
|
+
|
|
267
|
+
@api_keys_required('API_KEY_1', 'API_KEY_2')
|
|
268
|
+
def some_api_function():
|
|
269
|
+
# Function implementation...
|
|
270
|
+
"""
|
|
271
|
+
|
|
272
|
+
def decorator(func: F) -> F:
|
|
273
|
+
@wraps(func)
|
|
274
|
+
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
275
|
+
missing_keys = [k for k in required_keys if k not in os.environ]
|
|
276
|
+
if missing_keys:
|
|
277
|
+
raise ValueError(f"Missing API keys: {', '.join(missing_keys)}")
|
|
278
|
+
return func(*args, **kwargs)
|
|
279
|
+
|
|
280
|
+
return cast(F, wrapper)
|
|
281
|
+
|
|
282
|
+
return decorator
|
|
283
|
+
|
|
284
|
+
|
|
219
285
|
def get_system_information():
|
|
220
286
|
r"""Gathers information about the operating system.
|
|
221
287
|
|
|
@@ -260,145 +326,3 @@ def to_pascal(snake: str) -> str:
|
|
|
260
326
|
|
|
261
327
|
|
|
262
328
|
PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
def role_playing_with_function(
|
|
266
|
-
task_prompt: str = (
|
|
267
|
-
"Assume now is 2024 in the Gregorian calendar, "
|
|
268
|
-
"estimate the current age of University of Oxford "
|
|
269
|
-
"and then add 10 more years to this age, "
|
|
270
|
-
"and get the current weather of the city where "
|
|
271
|
-
"the University is located. And tell me what time "
|
|
272
|
-
"zone University of Oxford is in. And use my twitter "
|
|
273
|
-
"account infomation to create a tweet. "
|
|
274
|
-
),
|
|
275
|
-
function_list: Optional[List] = None,
|
|
276
|
-
model_type=None,
|
|
277
|
-
chat_turn_limit=10,
|
|
278
|
-
assistant_role_name: str = "Searcher",
|
|
279
|
-
user_role_name: str = "Professor",
|
|
280
|
-
) -> None:
|
|
281
|
-
r"""Initializes and conducts a `RolePlaying` with `FunctionCallingConfig`
|
|
282
|
-
session. The function creates an interactive and dynamic role-play session
|
|
283
|
-
where the AI Assistant and User engage based on the given task, roles, and
|
|
284
|
-
available functions. It demonstrates the versatility of AI in handling
|
|
285
|
-
diverse tasks and user interactions within a structured `RolePlaying`
|
|
286
|
-
framework.
|
|
287
|
-
|
|
288
|
-
Args:
|
|
289
|
-
task_prompt (str): The initial task or scenario description to start
|
|
290
|
-
the `RolePlaying` session. Defaults to a prompt involving the
|
|
291
|
-
estimation of KAUST's age and weather information.
|
|
292
|
-
function_list (list): A list of functions that the agent can utilize
|
|
293
|
-
during the session. Defaults to a combination of math, search, and
|
|
294
|
-
weather functions.
|
|
295
|
-
model_type (ModelType): The type of chatbot model used for both the
|
|
296
|
-
assistant and the user. Defaults to `GPT-4 Turbo`.
|
|
297
|
-
chat_turn_limit (int): The maximum number of turns (exchanges) in the
|
|
298
|
-
chat session. Defaults to 10.
|
|
299
|
-
assistant_role_name (str): The role name assigned to the AI Assistant.
|
|
300
|
-
Defaults to 'Searcher'.
|
|
301
|
-
user_role_name (str): The role name assigned to the User. Defaults to
|
|
302
|
-
'Professor'.
|
|
303
|
-
|
|
304
|
-
Returns:
|
|
305
|
-
None: This function does not return any value but prints out the
|
|
306
|
-
session's dialogues and outputs.
|
|
307
|
-
"""
|
|
308
|
-
|
|
309
|
-
# Run lazy import
|
|
310
|
-
if function_list is None:
|
|
311
|
-
function_list = get_lazy_imported_functions_module()
|
|
312
|
-
if model_type is None:
|
|
313
|
-
model_type = get_lazy_imported_types_module()
|
|
314
|
-
|
|
315
|
-
from colorama import Fore
|
|
316
|
-
|
|
317
|
-
from camel.agents.chat_agent import FunctionCallingRecord
|
|
318
|
-
from camel.configs import ChatGPTConfig, FunctionCallingConfig
|
|
319
|
-
from camel.societies import RolePlaying
|
|
320
|
-
|
|
321
|
-
task_prompt = task_prompt
|
|
322
|
-
user_model_config = ChatGPTConfig(temperature=0.0)
|
|
323
|
-
|
|
324
|
-
function_list = function_list
|
|
325
|
-
assistant_model_config = FunctionCallingConfig.from_openai_function_list(
|
|
326
|
-
function_list=function_list,
|
|
327
|
-
kwargs=dict(temperature=0.0),
|
|
328
|
-
)
|
|
329
|
-
|
|
330
|
-
role_play_session = RolePlaying(
|
|
331
|
-
assistant_role_name=assistant_role_name,
|
|
332
|
-
user_role_name=user_role_name,
|
|
333
|
-
assistant_agent_kwargs=dict(
|
|
334
|
-
model_type=model_type,
|
|
335
|
-
model_config=assistant_model_config,
|
|
336
|
-
function_list=function_list,
|
|
337
|
-
),
|
|
338
|
-
user_agent_kwargs=dict(
|
|
339
|
-
model_type=model_type,
|
|
340
|
-
model_config=user_model_config,
|
|
341
|
-
),
|
|
342
|
-
task_prompt=task_prompt,
|
|
343
|
-
with_task_specify=False,
|
|
344
|
-
)
|
|
345
|
-
|
|
346
|
-
print(
|
|
347
|
-
Fore.GREEN
|
|
348
|
-
+ f"AI Assistant sys message:\n{role_play_session.assistant_sys_msg}\n"
|
|
349
|
-
)
|
|
350
|
-
print(
|
|
351
|
-
Fore.BLUE + f"AI User sys message:\n{role_play_session.user_sys_msg}\n"
|
|
352
|
-
)
|
|
353
|
-
|
|
354
|
-
print(Fore.YELLOW + f"Original task prompt:\n{task_prompt}\n")
|
|
355
|
-
print(
|
|
356
|
-
Fore.CYAN
|
|
357
|
-
+ f"Specified task prompt:\n{role_play_session.specified_task_prompt}\n"
|
|
358
|
-
)
|
|
359
|
-
print(Fore.RED + f"Final task prompt:\n{role_play_session.task_prompt}\n")
|
|
360
|
-
|
|
361
|
-
n = 0
|
|
362
|
-
input_msg = role_play_session.init_chat()
|
|
363
|
-
while n < chat_turn_limit:
|
|
364
|
-
n += 1
|
|
365
|
-
assistant_response, user_response = role_play_session.step(input_msg)
|
|
366
|
-
|
|
367
|
-
if assistant_response.terminated:
|
|
368
|
-
print(
|
|
369
|
-
Fore.GREEN
|
|
370
|
-
+ (
|
|
371
|
-
"AI Assistant terminated. Reason: "
|
|
372
|
-
f"{assistant_response.info['termination_reasons']}."
|
|
373
|
-
)
|
|
374
|
-
)
|
|
375
|
-
break
|
|
376
|
-
if user_response.terminated:
|
|
377
|
-
print(
|
|
378
|
-
Fore.GREEN
|
|
379
|
-
+ (
|
|
380
|
-
"AI User terminated. "
|
|
381
|
-
f"Reason: {user_response.info['termination_reasons']}."
|
|
382
|
-
)
|
|
383
|
-
)
|
|
384
|
-
break
|
|
385
|
-
|
|
386
|
-
# Print output from the user
|
|
387
|
-
print_text_animated(
|
|
388
|
-
Fore.BLUE + f"AI User:\n\n{user_response.msg.content}\n"
|
|
389
|
-
)
|
|
390
|
-
|
|
391
|
-
# Print output from the assistant, including any function
|
|
392
|
-
# execution information
|
|
393
|
-
print_text_animated(Fore.GREEN + "AI Assistant:")
|
|
394
|
-
called_functions: List[FunctionCallingRecord] = assistant_response.info[
|
|
395
|
-
'called_functions'
|
|
396
|
-
]
|
|
397
|
-
for func_record in called_functions:
|
|
398
|
-
print_text_animated(f"{func_record}")
|
|
399
|
-
print_text_animated(f"{assistant_response.msg.content}\n")
|
|
400
|
-
|
|
401
|
-
if "CAMEL_TASK_DONE" in user_response.msg.content:
|
|
402
|
-
break
|
|
403
|
-
|
|
404
|
-
input_msg = assistant_response.msg
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: camel-ai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Communicative Agents for AI Society Study
|
|
5
5
|
Home-page: https://www.camel-ai.org/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -24,6 +24,7 @@ Requires-Dist: PyMuPDF (>=1.22.5,<2.0.0) ; extra == "tools" or extra == "all"
|
|
|
24
24
|
Requires-Dist: accelerate (>=0,<1) ; extra == "huggingface-agent" or extra == "all"
|
|
25
25
|
Requires-Dist: anthropic (>=0.21.3,<0.22.0)
|
|
26
26
|
Requires-Dist: beautifulsoup4 (>=4,<5) ; extra == "tools" or extra == "all"
|
|
27
|
+
Requires-Dist: cohere (>=4.56,<5.0) ; extra == "retrievers" or extra == "all"
|
|
27
28
|
Requires-Dist: colorama (>=0,<1)
|
|
28
29
|
Requires-Dist: datasets (>=2,<3) ; extra == "huggingface-agent" or extra == "all"
|
|
29
30
|
Requires-Dist: diffusers (>=0,<1) ; extra == "huggingface-agent" or extra == "all"
|
|
@@ -35,10 +36,14 @@ Requires-Dist: mock (>=5,<6) ; extra == "test"
|
|
|
35
36
|
Requires-Dist: neo4j (>=5.18.0,<6.0.0) ; extra == "graph-storages" or extra == "all"
|
|
36
37
|
Requires-Dist: numpy (>=1,<2)
|
|
37
38
|
Requires-Dist: openai (>=1.2.3,<2.0.0)
|
|
39
|
+
Requires-Dist: openapi-spec-validator (>=0.7.1,<0.8.0) ; extra == "tools" or extra == "all"
|
|
38
40
|
Requires-Dist: opencv-python (>=4,<5) ; extra == "huggingface-agent" or extra == "all"
|
|
39
41
|
Requires-Dist: pathlib (>=1.0.1,<2.0.0)
|
|
42
|
+
Requires-Dist: prance (>=23.6.21.0,<24.0.0.0) ; extra == "tools" or extra == "all"
|
|
40
43
|
Requires-Dist: protobuf (>=4,<5)
|
|
41
44
|
Requires-Dist: pydantic (>=1.9,<3)
|
|
45
|
+
Requires-Dist: pydub (>=0.25.1,<0.26.0) ; extra == "tools" or extra == "all"
|
|
46
|
+
Requires-Dist: pygithub (>=2.3.0,<3.0.0) ; extra == "tools" or extra == "all"
|
|
42
47
|
Requires-Dist: pymilvus (>=2.4.0,<3.0.0) ; extra == "vector-databases" or extra == "all"
|
|
43
48
|
Requires-Dist: pyowm (>=3.3.0,<4.0.0) ; extra == "tools" or extra == "all"
|
|
44
49
|
Requires-Dist: pytest (>=7,<8) ; extra == "test"
|
|
@@ -47,8 +52,9 @@ Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0) ; extra == "retrievers" or extra == "a
|
|
|
47
52
|
Requires-Dist: requests_oauthlib (>=1.3.1,<2.0.0) ; extra == "tools" or extra == "all"
|
|
48
53
|
Requires-Dist: sentence-transformers (>=2.2.2,<3.0.0) ; extra == "encoders" or extra == "all"
|
|
49
54
|
Requires-Dist: sentencepiece (>=0,<1) ; extra == "huggingface-agent" or extra == "all"
|
|
55
|
+
Requires-Dist: slack-sdk (>=3.27.2,<4.0.0) ; extra == "tools" or extra == "all"
|
|
50
56
|
Requires-Dist: soundfile (>=0,<1) ; extra == "huggingface-agent" or extra == "all"
|
|
51
|
-
Requires-Dist: tiktoken (>=0,<
|
|
57
|
+
Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
|
|
52
58
|
Requires-Dist: torch (>=1,<2) ; extra == "huggingface-agent" or extra == "all"
|
|
53
59
|
Requires-Dist: transformers (>=4,<5) ; extra == "huggingface-agent" or extra == "all"
|
|
54
60
|
Requires-Dist: unstructured[all-docs] (>=0.10.30,<0.11.0) ; extra == "tools" or extra == "all"
|
|
@@ -164,7 +170,7 @@ conda create --name camel python=3.10
|
|
|
164
170
|
conda activate camel
|
|
165
171
|
|
|
166
172
|
# Clone github repo
|
|
167
|
-
git clone -b v0.1.
|
|
173
|
+
git clone -b v0.1.4 https://github.com/camel-ai/camel.git
|
|
168
174
|
|
|
169
175
|
# Change directory into project directory
|
|
170
176
|
cd camel
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
2
|
-
camel/agents/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=1Fkgjrsb9S3gkSvU6XAgzS9jiDXKy06aXdQkPRJfGBI,778
|
|
2
|
+
camel/agents/__init__.py,sha256=1wFs2lO08qkvsQq1ZOsRSmN79Mx1SDe044ABgMz2zNU,1494
|
|
3
3
|
camel/agents/base.py,sha256=X39qWSiT1WnDqaJ9k3gQrTpOQSwUKzNEVpp5AY6fDH8,1130
|
|
4
|
-
camel/agents/chat_agent.py,sha256=
|
|
4
|
+
camel/agents/chat_agent.py,sha256=Ogfkai6ZJTi1w3ag5wlYpknqgUfv3oE1mvkm1EsaI6c,21701
|
|
5
5
|
camel/agents/critic_agent.py,sha256=Etxti9XKOut_KqMQHI8IKNMg8zUUM13trep7axZK0Qs,7377
|
|
6
6
|
camel/agents/deductive_reasoner_agent.py,sha256=ACHN-y4Vg3l3vMw1Nhd7vLtZtlCvstfbGGnIWeJers4,13050
|
|
7
7
|
camel/agents/embodied_agent.py,sha256=E0N63uOkfw02MdPTEX_ImUAzaNuapnPyU3iBJQSqeKU,7322
|
|
8
|
+
camel/agents/knowledge_graph_agent.py,sha256=YbHem9UdexvSWMnm7_Plv-V-t-rMvmtafshpA_UASSY,8783
|
|
8
9
|
camel/agents/role_assignment_agent.py,sha256=P3QAuPPxc9fbKL9GrOEQWDY4m8tfjLpdPxyhph2OCwc,4879
|
|
9
10
|
camel/agents/task_agent.py,sha256=Dip1nAd3oGtxVIi3laP65hOp5VwlajAbtotendtNMvs,14907
|
|
10
11
|
camel/agents/tool_agents/__init__.py,sha256=ulTNWU2qoFGe3pvVmCq_sdfeSX3NKZ0due66TYvsL-M,862
|
|
11
12
|
camel/agents/tool_agents/base.py,sha256=nQAhfWi8a_bCgzlf5-G-tmj1fKm6AjpRc89NQkWwpnc,1399
|
|
12
13
|
camel/agents/tool_agents/hugging_face_tool_agent.py,sha256=1Z5tG6f_86eL0vmtRZ-BJvoLDFFLhoHt8JtDvgat1xU,8723
|
|
13
|
-
camel/configs.py,sha256=
|
|
14
|
+
camel/configs/__init__.py,sha256=8fRAyzN-35UT8_BBhwEYmTmiBHOI6MqrmyGTddBinJU,1061
|
|
15
|
+
camel/configs/anthropic_config.py,sha256=WZ6qMSMIUXCRRSC8smHfqJmfjkbYMSAc4aE6Nwi2dKI,3315
|
|
16
|
+
camel/configs/base_config.py,sha256=CEF8ryl_dkH6LgOhwuP5_EgjaWCUCB-E3GcMWR-2YFE,870
|
|
17
|
+
camel/configs/openai_config.py,sha256=UKTnpzRcAsQtxgvPJNgLHoMGuXWOrQyJsz0MBNsjALM,6603
|
|
14
18
|
camel/embeddings/__init__.py,sha256=A7h2IAtP-1Rp3hn4SDwSYEGytuWsoti1v5Iw1Ktu0es,952
|
|
15
19
|
camel/embeddings/base.py,sha256=nauXLNEJlPnk2sKigFzvNTk_RKsC_2l_EQiyPyj_ATo,2208
|
|
16
|
-
camel/embeddings/openai_embedding.py,sha256=
|
|
20
|
+
camel/embeddings/openai_embedding.py,sha256=wP6LtA34Va_2N7QwSRkqhfMHuKxE2h4EDrmChDyoREs,2873
|
|
17
21
|
camel/embeddings/sentence_transformers_embeddings.py,sha256=o0_lXMxqdNMycZ79Pj97MWwoTyvTASfo-23P3SZ_VF8,2312
|
|
18
|
-
camel/functions/__init__.py,sha256=
|
|
22
|
+
camel/functions/__init__.py,sha256=a_MHon_5zLz7iZCXQ7Ed2tZ0KrN_IRR07zgqHkht2x8,1452
|
|
19
23
|
camel/functions/google_maps_function.py,sha256=AmhlIyqkrkZF6Vb4O-wdtEKTQjRh5mMjHjS56ciGgjk,12468
|
|
20
24
|
camel/functions/math_functions.py,sha256=sPHSEOdHOmL38wZWcdyiBj0VEmf7mhQ0MBzya1SFNL0,1703
|
|
21
|
-
camel/functions/
|
|
25
|
+
camel/functions/open_api_function.py,sha256=giZPODzpXG9YOmFItbqCrupVmR4e-WljZmXTfeLsfzk,15036
|
|
26
|
+
camel/functions/open_api_specs/coursera/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
27
|
+
camel/functions/open_api_specs/coursera/openapi.yaml,sha256=iouLcNNpVvXLfmkyKrbJlS3MEjBJ7TgVR48UID8dwfE,1981
|
|
28
|
+
camel/functions/open_api_specs/klarna/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
29
|
+
camel/functions/open_api_specs/klarna/openapi.yaml,sha256=9wpwRn8NLZL1reN6YUPsZP24hbDJJYvOJeeoWTk7ojQ,2887
|
|
30
|
+
camel/functions/open_api_specs/speak/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
31
|
+
camel/functions/open_api_specs/speak/openapi.yaml,sha256=rmM_-E4tYJ2LOpUlcQxfQtcQSRkVnsBkQWMmKdW2QqQ,6557
|
|
32
|
+
camel/functions/openai_function.py,sha256=tsAcxDNVV4OSu2bi3l2lfNtyOQSoJn5OqV3oMsFlTlM,14933
|
|
33
|
+
camel/functions/retrieval_functions.py,sha256=ZBwQhBeun86k6AnMDCpf0U-JYNaU0alDJAS1hdnumAQ,2281
|
|
22
34
|
camel/functions/search_functions.py,sha256=qfN8nEnR9cMlRXkEXBbbcuifaXfIMe29hrY2Q4IljtM,12639
|
|
35
|
+
camel/functions/slack_functions.py,sha256=f1-aeuANOUf3OSnbeltaepEsu507omhXxE9AgQJ5dTQ,8789
|
|
23
36
|
camel/functions/twitter_function.py,sha256=xL-GKU69WrcTUm3lQl1yPgJFxtBJKRmWN3zx9AfGNKI,17254
|
|
24
37
|
camel/functions/weather_functions.py,sha256=W2jMFqxq5M7Dan7cgEpnvzBk0SV_MduMbCuvHBsgo-c,5881
|
|
25
38
|
camel/generators.py,sha256=tcYDoHwSKN0rBiu7u4rWN9pb61O8OaclrNaasCqHSJM,10437
|
|
@@ -44,13 +57,14 @@ camel/memories/records.py,sha256=zmZsYHVuq6fYqJDkzhNXF02uWLzdBemaEZeG0Ls90pU,361
|
|
|
44
57
|
camel/messages/__init__.py,sha256=djLvpz6AmjeLzuUSQl7J6T2O4x8MwSdcH0l9fbj_3yg,1468
|
|
45
58
|
camel/messages/base.py,sha256=iiJj39NljLLgiiUSATDXpPR448zsX137FMKZdDZDoEs,10131
|
|
46
59
|
camel/messages/func_message.py,sha256=CCVkbz-2pdxXV0vBETI0xt7d7uiN8zACpRI7lCnfTFQ,3841
|
|
47
|
-
camel/models/__init__.py,sha256=
|
|
48
|
-
camel/models/anthropic_model.py,sha256=
|
|
49
|
-
camel/models/base_model.py,sha256=
|
|
50
|
-
camel/models/model_factory.py,sha256=
|
|
60
|
+
camel/models/__init__.py,sha256=U2fnPOgxlNRQV3U58EcQ_K5nZuP29dATstn7jV5JFj8,1168
|
|
61
|
+
camel/models/anthropic_model.py,sha256=l2lNFyyO1kAN587KB9xg_k9V515WanhLM3CRXal0ivc,5112
|
|
62
|
+
camel/models/base_model.py,sha256=9PgWNbG1ZY4KTzw_UyY26UG63Jqd_VWWjog5uBK6lHw,3904
|
|
63
|
+
camel/models/model_factory.py,sha256=3f1jUpF1Or6liMk9iH0OfXECpi6i4Toj20tk-T9gqAc,2418
|
|
51
64
|
camel/models/open_source_model.py,sha256=-coKi0GPc1uBzAGL8vcS4Aun0GV0RCSwxbhMdkM6bgA,5856
|
|
52
|
-
camel/models/
|
|
53
|
-
camel/models/
|
|
65
|
+
camel/models/openai_audio_models.py,sha256=Jpd_B-5R8d8s3qYo_0x-Ahw5icMCysGEjaDtssV34dg,9799
|
|
66
|
+
camel/models/openai_model.py,sha256=XhcirU6QqkHP_hRNNuB1xak_9IKtZE0ZZMLGE-FvVHc,4164
|
|
67
|
+
camel/models/stub_model.py,sha256=hbfS6A83vY4TaFK_7Q9jA4Gbrkp0Hlmq2IEZ1z81L8E,3631
|
|
54
68
|
camel/prompts/__init__.py,sha256=hO7NyBQ-1u-AysgjNkvrTSe-CFCtWZLtYP6IBDmotyc,1790
|
|
55
69
|
camel/prompts/ai_society.py,sha256=ApgvIED1Z_mdsWDNc2_u35Ktp7pEKksMrOIQKo_q5cI,6306
|
|
56
70
|
camel/prompts/base.py,sha256=70Fmp0bJk2hlLQtwzCx29PIpSwLNgOo7S1cDLE7bOb4,8452
|
|
@@ -65,11 +79,12 @@ camel/prompts/task_prompt_template.py,sha256=ZdldtlHMB1d4nnANOwdaPFOif3BjrDEgyTw
|
|
|
65
79
|
camel/prompts/translation.py,sha256=V_40Ko2is5dAOCZ8DzsHo6DO7l8_jnEV9KjCKH7GxtY,1902
|
|
66
80
|
camel/responses/__init__.py,sha256=edtTQskOgq5obyITziRFL62HTJP9sAikAtP9vrFacEQ,795
|
|
67
81
|
camel/responses/agent_responses.py,sha256=UsTZHi4jPs2wfChPQWttVNyHneoGdQtdrRouatywE4w,1714
|
|
68
|
-
camel/retrievers/__init__.py,sha256=
|
|
69
|
-
camel/retrievers/auto_retriever.py,sha256=
|
|
70
|
-
camel/retrievers/base.py,sha256=
|
|
71
|
-
camel/retrievers/bm25_retriever.py,sha256=
|
|
72
|
-
camel/retrievers/
|
|
82
|
+
camel/retrievers/__init__.py,sha256=CuP3B77zl2PoF-W2y9xSkTGRzoK2J4TlUHdCtuJD8dg,1059
|
|
83
|
+
camel/retrievers/auto_retriever.py,sha256=9CjwTiNkkqUUd1HRwiHB1Uf_mvokkg51IUj1wzfbGrY,13364
|
|
84
|
+
camel/retrievers/base.py,sha256=6ygOuHeSKd5rUJZ8QJe0uhDqbDeu7VU2t8F1qbv1gWM,2624
|
|
85
|
+
camel/retrievers/bm25_retriever.py,sha256=cejqk4UpuWAEVraa3Oz65gI9L4F-MOKdon_FtrdW7D8,5180
|
|
86
|
+
camel/retrievers/cohere_rerank_retriever.py,sha256=6BhXLRsibUnlK2ejNnZ82pcct1HghZgTDBDo61GpMO4,4123
|
|
87
|
+
camel/retrievers/vector_retriever.py,sha256=88EmQxTTICUPXI4c-iRx9wqWp1TYyvcag7aOEXmYg6o,7185
|
|
73
88
|
camel/societies/__init__.py,sha256=JhGwUHjht4CewzC3shKuxmgB3oS7FIxIxmiKyhNsfIs,832
|
|
74
89
|
camel/societies/babyagi_playing.py,sha256=b4xu1djq6In0XU1btbKKbG2EnIHGG1Jyfx32TBntfE8,11770
|
|
75
90
|
camel/societies/role_playing.py,sha256=EubYCFsd6W8eLJ51JmvnWZfCPsMyM6S5b3Fb5no_21c,22079
|
|
@@ -85,17 +100,20 @@ camel/storages/key_value_storages/json.py,sha256=BlOhuyWbSjzKixtA5e9O0z8BFK4pi96
|
|
|
85
100
|
camel/storages/vectordb_storages/__init__.py,sha256=hEhPyCPlzyXUsDFDzKRdLBj09rO1b5bsn76AJrDcaG4,1076
|
|
86
101
|
camel/storages/vectordb_storages/base.py,sha256=BGINA2TWqLu2IYFgAKwWDFVb0A1q27WjF_5XYPtyFP0,6001
|
|
87
102
|
camel/storages/vectordb_storages/milvus.py,sha256=09YariTfaXLLwRipb5SQ5ocz8trigAoN2e8iu0ejcs8,13589
|
|
88
|
-
camel/storages/vectordb_storages/qdrant.py,sha256=
|
|
103
|
+
camel/storages/vectordb_storages/qdrant.py,sha256=fnAPhWubLWnMa7eNTmK13gLNC2j6jnP1OF_OCHZoDzE,13618
|
|
89
104
|
camel/terminators/__init__.py,sha256=pE7fcfDUNngdbm1BhzSQPRMXNbdd28rl9YbF4gKWwXE,997
|
|
90
105
|
camel/terminators/base.py,sha256=TSkl3maNEsdjyAniJaSgFfD4UF8RQ1LwNIiGw0dN8Gg,1396
|
|
91
106
|
camel/terminators/response_terminator.py,sha256=zcXuigbvlclUoBv4xcVbfU36ZohUT1RhI-rSnukloUY,4951
|
|
92
107
|
camel/terminators/token_limit_terminator.py,sha256=mK30wVUnoqNAvIo-wxkqY5gUSNay2M04rsAktKqoiOI,2087
|
|
93
|
-
camel/
|
|
94
|
-
camel/
|
|
108
|
+
camel/toolkits/__init__.py,sha256=2-z9eGt53U6_1uwMtiu0-GgU7k5iFkS3HEMXuB3Qs2A,836
|
|
109
|
+
camel/toolkits/base.py,sha256=znjnZtgxA5gbT7OMnrKQF_a9FK3A7Xk5s_lP94u76vI,923
|
|
110
|
+
camel/toolkits/github_toolkit.py,sha256=E1QljXDQFzN8pv4q6eiX9_Hzqe_VaOZlKcm1QCNKu3g,8822
|
|
111
|
+
camel/types/__init__.py,sha256=fnl0QojBD7yULxSWDyfEYkkHjBu0L8D_fXolq764DVc,1902
|
|
112
|
+
camel/types/enums.py,sha256=b7gK0O64bo63ejPY6m2TxHpAEuOTdsKH72cw8yMEry4,8302
|
|
95
113
|
camel/types/openai_types.py,sha256=BNQ6iCzKTjSvgcXFsAFIgrUS_YUFZBU6bDoyAp387hI,2045
|
|
96
|
-
camel/utils/__init__.py,sha256=
|
|
97
|
-
camel/utils/commons.py,sha256=
|
|
114
|
+
camel/utils/__init__.py,sha256=d1AXtotuw9i0c61HRuhM-c4zqfMracoYoyZAGiL5Bcs,1616
|
|
115
|
+
camel/utils/commons.py,sha256=sK7DfG7CUZrcxrEnTztN-UQsZ34SxPRIxzs42e0AoIo,9930
|
|
98
116
|
camel/utils/token_counting.py,sha256=2tLoQAOSF_0VewmF3cKXoRvQ_RJ2iZbjjpCPZxdx07k,12674
|
|
99
|
-
camel_ai-0.1.
|
|
100
|
-
camel_ai-0.1.
|
|
101
|
-
camel_ai-0.1.
|
|
117
|
+
camel_ai-0.1.4.dist-info/METADATA,sha256=YaKzgZss9LPDrOu_ENRe85E-xY0OM3SaFKv32fazMjk,21185
|
|
118
|
+
camel_ai-0.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
119
|
+
camel_ai-0.1.4.dist-info/RECORD,,
|