camel-ai 0.1.9__tar.gz → 0.2.1__tar.gz
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_ai-0.1.9 → camel_ai-0.2.1}/PKG-INFO +3 -2
- {camel_ai-0.1.9 → camel_ai-0.2.1}/README.md +1 -1
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/__init__.py +1 -1
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/chat_agent.py +12 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/loaders/firecrawl_reader.py +11 -43
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/mistral_model.py +1 -1
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/openai_model.py +16 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/tasks/task.py +11 -4
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/tasks/task_prompt.py +4 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/__init__.py +15 -24
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/google_maps_toolkit.py +0 -7
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/linkedin_toolkit.py +0 -3
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_toolkit.py +0 -3
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/reddit_toolkit.py +0 -3
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/retrieval_toolkit.py +0 -4
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/slack_toolkit.py +0 -3
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/twitter_toolkit.py +2 -5
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/utils/commons.py +8 -1
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/utils/token_counting.py +8 -2
- camel_ai-0.2.1/camel/workforce/__init__.py +23 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/workforce/base.py +9 -5
- camel_ai-0.2.1/camel/workforce/prompts.py +175 -0
- camel_ai-0.2.1/camel/workforce/role_playing_worker.py +181 -0
- camel_ai-0.1.9/camel/workforce/single_agent_node.py → camel_ai-0.2.1/camel/workforce/single_agent_worker.py +49 -22
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/workforce/task_channel.py +3 -5
- camel_ai-0.2.1/camel/workforce/utils.py +67 -0
- camel_ai-0.1.9/camel/workforce/worker_node.py → camel_ai-0.2.1/camel/workforce/worker.py +15 -12
- camel_ai-0.2.1/camel/workforce/workforce.py +486 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/pyproject.toml +5 -4
- camel_ai-0.1.9/camel/workforce/__init__.py +0 -23
- camel_ai-0.1.9/camel/workforce/manager_node.py +0 -299
- camel_ai-0.1.9/camel/workforce/role_playing_node.py +0 -168
- camel_ai-0.1.9/camel/workforce/utils.py +0 -97
- camel_ai-0.1.9/camel/workforce/workforce.py +0 -49
- camel_ai-0.1.9/camel/workforce/workforce_prompt.py +0 -125
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/critic_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/deductive_reasoner_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/embodied_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/knowledge_graph_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/role_assignment_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/search_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/task_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/tool_agents/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/tool_agents/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/anthropic_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/base_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/gemini_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/groq_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/litellm_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/mistral_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/ollama_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/openai_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/reka_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/samba_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/togetherai_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/vllm_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/configs/zhipuai_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/embeddings/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/embeddings/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/embeddings/mistral_embedding.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/embeddings/openai_embedding.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/embeddings/vlm_embedding.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/generators.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/human.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/interpreters/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/interpreters/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/interpreters/docker_interpreter.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/interpreters/internal_python_interpreter.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/interpreters/interpreter_error.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/interpreters/ipython_interpreter.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/interpreters/subprocess_interpreter.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/loaders/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/loaders/base_io.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/loaders/jina_url_reader.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/loaders/unstructured_io.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/agent_memories.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/blocks/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/blocks/chat_history_block.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/blocks/vectordb_block.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/context_creators/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/context_creators/score_based.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/memories/records.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/messages/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/messages/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/messages/func_message.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/anthropic_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/azure_openai_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/base_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/gemini_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/groq_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/litellm_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/model_factory.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/nemotron_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/ollama_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/open_source_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/openai_audio_models.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/openai_compatibility_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/reka_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/samba_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/stub_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/togetherai_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/vllm_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/models/zhipuai_model.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/ai_society.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/code.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/evaluation.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/generate_text_embedding_data.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/image_craft.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/misalignment.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/multi_condition_image_craft.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/object_recognition.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/prompt_templates.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/role_description_prompt_template.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/solution_extraction.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/task_prompt_template.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/translation.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/prompts/video_description_prompt.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/responses/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/responses/agent_responses.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/retrievers/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/retrievers/auto_retriever.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/retrievers/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/retrievers/bm25_retriever.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/retrievers/cohere_rerank_retriever.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/retrievers/vector_retriever.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/societies/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/societies/babyagi_playing.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/societies/role_playing.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/graph_storages/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/graph_storages/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/graph_storages/graph_element.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/graph_storages/neo4j_graph.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/key_value_storages/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/key_value_storages/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/key_value_storages/in_memory.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/key_value_storages/json.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/key_value_storages/redis.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/object_storages/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/object_storages/amazon_s3.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/object_storages/azure_blob.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/object_storages/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/object_storages/google_cloud.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/vectordb_storages/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/vectordb_storages/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/vectordb_storages/milvus.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/storages/vectordb_storages/qdrant.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/tasks/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/terminators/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/terminators/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/terminators/response_terminator.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/terminators/token_limit_terminator.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/base.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/code_execution.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/dalle_toolkit.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/github_toolkit.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/math_toolkit.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/security_config.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/openai_function.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/search_toolkit.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/toolkits/weather_toolkit.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/types/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/types/enums.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/types/openai_types.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/utils/__init__.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/utils/async_func.py +0 -0
- {camel_ai-0.1.9 → camel_ai-0.2.1}/camel/utils/constants.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: camel-ai
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Communicative Agents for AI Society Study
|
|
5
5
|
Home-page: https://www.camel-ai.org/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -59,6 +59,7 @@ Requires-Dist: numpy (>=1,<2)
|
|
|
59
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
|
+
Requires-Dist: pandoc
|
|
62
63
|
Requires-Dist: pathlib (>=1.0.1,<2.0.0)
|
|
63
64
|
Requires-Dist: pillow (>=10.2.0,<11.0.0) ; extra == "tools" or extra == "all"
|
|
64
65
|
Requires-Dist: prance (>=23.6.21.0,<24.0.0.0) ; extra == "tools" or extra == "all"
|
|
@@ -213,7 +214,7 @@ conda create --name camel python=3.10
|
|
|
213
214
|
conda activate camel
|
|
214
215
|
|
|
215
216
|
# Clone github repo
|
|
216
|
-
git clone -b v0.1
|
|
217
|
+
git clone -b v0.2.1 https://github.com/camel-ai/camel.git
|
|
217
218
|
|
|
218
219
|
# Change directory into project directory
|
|
219
220
|
cd camel
|
|
@@ -119,7 +119,7 @@ conda create --name camel python=3.10
|
|
|
119
119
|
conda activate camel
|
|
120
120
|
|
|
121
121
|
# Clone github repo
|
|
122
|
-
git clone -b v0.1
|
|
122
|
+
git clone -b v0.2.1 https://github.com/camel-ai/camel.git
|
|
123
123
|
|
|
124
124
|
# Change directory into project directory
|
|
125
125
|
cd camel
|
|
@@ -181,6 +181,16 @@ class ChatAgent(BaseAgent):
|
|
|
181
181
|
tool.get_function_name(): tool.func for tool in all_tools
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
# If the user hasn't configured tools in `BaseModelBackend`,
|
|
185
|
+
# the tools set from `ChatAgent` will be used.
|
|
186
|
+
# This design simplifies the interface while retaining tool-running
|
|
187
|
+
# capabilities for `BaseModelBackend`.
|
|
188
|
+
if all_tools and not self.model_backend.model_config_dict['tools']:
|
|
189
|
+
tool_schema_list = [
|
|
190
|
+
tool.get_openai_tool_schema() for tool in all_tools
|
|
191
|
+
]
|
|
192
|
+
self.model_backend.model_config_dict['tools'] = tool_schema_list
|
|
193
|
+
|
|
184
194
|
self.model_config_dict = self.model_backend.model_config_dict
|
|
185
195
|
|
|
186
196
|
self.model_token_limit = token_limit or self.model_backend.token_limit
|
|
@@ -612,9 +622,11 @@ class ChatAgent(BaseAgent):
|
|
|
612
622
|
|
|
613
623
|
# Replace the original tools with the structuring function
|
|
614
624
|
self.func_dict = {func.get_function_name(): func.func}
|
|
625
|
+
self.model_backend.model_config_dict = original_model_dict.copy()
|
|
615
626
|
self.model_backend.model_config_dict["tools"] = [
|
|
616
627
|
func.get_openai_tool_schema()
|
|
617
628
|
]
|
|
629
|
+
self.model_backend.model_config_dict["tool_choice"] = "required"
|
|
618
630
|
|
|
619
631
|
openai_messages, num_tokens = self.memory.get_context()
|
|
620
632
|
(
|
|
@@ -49,7 +49,6 @@ class Firecrawl:
|
|
|
49
49
|
self,
|
|
50
50
|
url: str,
|
|
51
51
|
params: Optional[Dict[str, Any]] = None,
|
|
52
|
-
wait_until_done: bool = True,
|
|
53
52
|
**kwargs: Any,
|
|
54
53
|
) -> Any:
|
|
55
54
|
r"""Crawl a URL and all accessible subpages. Customize the crawl by
|
|
@@ -60,14 +59,12 @@ class Firecrawl:
|
|
|
60
59
|
url (str): The URL to crawl.
|
|
61
60
|
params (Optional[Dict[str, Any]]): Additional parameters for the
|
|
62
61
|
crawl request. Defaults to `None`.
|
|
63
|
-
wait_until_done (bool): Whether to wait until the crawl job is
|
|
64
|
-
completed. Defaults to `True`.
|
|
65
62
|
**kwargs (Any): Additional keyword arguments, such as
|
|
66
|
-
`poll_interval`, `idempotency_key
|
|
63
|
+
`poll_interval`, `idempotency_key`.
|
|
67
64
|
|
|
68
65
|
Returns:
|
|
69
|
-
Any: The
|
|
70
|
-
|
|
66
|
+
Any: The crawl job ID or the crawl results if waiting until
|
|
67
|
+
completion.
|
|
71
68
|
|
|
72
69
|
Raises:
|
|
73
70
|
RuntimeError: If the crawling process fails.
|
|
@@ -78,13 +75,8 @@ class Firecrawl:
|
|
|
78
75
|
url=url,
|
|
79
76
|
params=params,
|
|
80
77
|
**kwargs,
|
|
81
|
-
wait_until_done=wait_until_done,
|
|
82
|
-
)
|
|
83
|
-
return (
|
|
84
|
-
crawl_response
|
|
85
|
-
if wait_until_done
|
|
86
|
-
else crawl_response.get("jobId")
|
|
87
78
|
)
|
|
79
|
+
return crawl_response
|
|
88
80
|
except Exception as e:
|
|
89
81
|
raise RuntimeError(f"Failed to crawl the URL: {e}")
|
|
90
82
|
|
|
@@ -103,7 +95,10 @@ class Firecrawl:
|
|
|
103
95
|
"""
|
|
104
96
|
|
|
105
97
|
try:
|
|
106
|
-
crawl_result = self.app.crawl_url(
|
|
98
|
+
crawl_result = self.app.crawl_url(
|
|
99
|
+
url,
|
|
100
|
+
{'formats': ['markdown']},
|
|
101
|
+
)
|
|
107
102
|
if not isinstance(crawl_result, list):
|
|
108
103
|
raise ValueError("Unexpected response format")
|
|
109
104
|
markdown_contents = [
|
|
@@ -180,41 +175,14 @@ class Firecrawl:
|
|
|
180
175
|
data = self.app.scrape_url(
|
|
181
176
|
url,
|
|
182
177
|
{
|
|
183
|
-
'
|
|
184
|
-
|
|
185
|
-
"extractionPrompt": "Based on the information on "
|
|
186
|
-
"the page, extract the information from the schema.",
|
|
187
|
-
'extractionSchema': output_schema.model_json_schema(),
|
|
188
|
-
},
|
|
189
|
-
'pageOptions': {'onlyMainContent': True},
|
|
178
|
+
'formats': ['extract'],
|
|
179
|
+
'extract': {'schema': output_schema.model_json_schema()},
|
|
190
180
|
},
|
|
191
181
|
)
|
|
192
|
-
return data.get("
|
|
182
|
+
return data.get("extract", {})
|
|
193
183
|
except Exception as e:
|
|
194
184
|
raise RuntimeError(f"Failed to perform structured scrape: {e}")
|
|
195
185
|
|
|
196
|
-
def tidy_scrape(self, url: str) -> str:
|
|
197
|
-
r"""Only return the main content of the page, excluding headers,
|
|
198
|
-
navigation bars, footers, etc. in Markdown format.
|
|
199
|
-
|
|
200
|
-
Args:
|
|
201
|
-
url (str): The URL to read.
|
|
202
|
-
|
|
203
|
-
Returns:
|
|
204
|
-
str: The markdown content of the URL.
|
|
205
|
-
|
|
206
|
-
Raises:
|
|
207
|
-
RuntimeError: If the scrape process fails.
|
|
208
|
-
"""
|
|
209
|
-
|
|
210
|
-
try:
|
|
211
|
-
scrape_result = self.app.scrape_url(
|
|
212
|
-
url, {'pageOptions': {'onlyMainContent': True}}
|
|
213
|
-
)
|
|
214
|
-
return scrape_result.get("markdown", "")
|
|
215
|
-
except Exception as e:
|
|
216
|
-
raise RuntimeError(f"Failed to perform tidy scrape: {e}")
|
|
217
|
-
|
|
218
186
|
def map_site(
|
|
219
187
|
self, url: str, params: Optional[Dict[str, Any]] = None
|
|
220
188
|
) -> list:
|
|
@@ -93,7 +93,7 @@ class MistralModel(BaseModelBackend):
|
|
|
93
93
|
"name": tool_call.function.name, # type: ignore[union-attr]
|
|
94
94
|
"arguments": tool_call.function.arguments, # type: ignore[union-attr]
|
|
95
95
|
},
|
|
96
|
-
type=tool_call.
|
|
96
|
+
type=tool_call.type, # type: ignore[union-attr]
|
|
97
97
|
)
|
|
98
98
|
for tool_call in response.choices[0].message.tool_calls
|
|
99
99
|
]
|
|
@@ -93,6 +93,22 @@ class OpenAIModel(BaseModelBackend):
|
|
|
93
93
|
`ChatCompletion` in the non-stream mode, or
|
|
94
94
|
`Stream[ChatCompletionChunk]` in the stream mode.
|
|
95
95
|
"""
|
|
96
|
+
# o1-preview and o1-mini have Beta limitations
|
|
97
|
+
# reference: https://platform.openai.com/docs/guides/reasoning
|
|
98
|
+
if self.model_type in [ModelType.O1_MINI, ModelType.O1_PREVIEW]:
|
|
99
|
+
# Remove system message that is not supported in o1 model.
|
|
100
|
+
messages = [msg for msg in messages if msg.get("role") != "system"]
|
|
101
|
+
|
|
102
|
+
# Remove unsupported parameters and reset the fixed parameters
|
|
103
|
+
del self.model_config_dict["stream"]
|
|
104
|
+
del self.model_config_dict["tools"]
|
|
105
|
+
del self.model_config_dict["tool_choice"]
|
|
106
|
+
self.model_config_dict["temperature"] = 1.0
|
|
107
|
+
self.model_config_dict["top_p"] = 1.0
|
|
108
|
+
self.model_config_dict["n"] = 1.0
|
|
109
|
+
self.model_config_dict["presence_penalty"] = 0.0
|
|
110
|
+
self.model_config_dict["frequency_penalty"] = 0.0
|
|
111
|
+
|
|
96
112
|
response = self._client.chat.completions.create(
|
|
97
113
|
messages=messages,
|
|
98
114
|
model=self.model_type.value,
|
|
@@ -93,6 +93,10 @@ class Task(BaseModel):
|
|
|
93
93
|
|
|
94
94
|
result: Optional[str] = ""
|
|
95
95
|
|
|
96
|
+
failure_count: int = 0
|
|
97
|
+
|
|
98
|
+
additional_info: Optional[str] = None
|
|
99
|
+
|
|
96
100
|
@classmethod
|
|
97
101
|
def from_message(cls, message: BaseMessage) -> "Task":
|
|
98
102
|
r"""Create a task from a message.
|
|
@@ -193,7 +197,7 @@ class Task(BaseModel):
|
|
|
193
197
|
def decompose(
|
|
194
198
|
self,
|
|
195
199
|
agent: ChatAgent,
|
|
196
|
-
|
|
200
|
+
prompt: Optional[str] = None,
|
|
197
201
|
task_parser: Callable[[str, str], List["Task"]] = parse_response,
|
|
198
202
|
) -> List["Task"]:
|
|
199
203
|
r"""Decompose a task to a list of sub-tasks. It can be used for data
|
|
@@ -201,8 +205,8 @@ class Task(BaseModel):
|
|
|
201
205
|
|
|
202
206
|
Args:
|
|
203
207
|
agent (ChatAgent): An agent that used to decompose the task.
|
|
204
|
-
|
|
205
|
-
|
|
208
|
+
prompt (str, optional): A prompt to decompose the task. If not
|
|
209
|
+
provided, the default prompt will be used.
|
|
206
210
|
task_parser (Callable[[str, str], List[Task]], optional): A
|
|
207
211
|
function to extract Task from response. If not provided,
|
|
208
212
|
the default parse_response will be used.
|
|
@@ -212,7 +216,7 @@ class Task(BaseModel):
|
|
|
212
216
|
"""
|
|
213
217
|
|
|
214
218
|
role_name = agent.role_name
|
|
215
|
-
content =
|
|
219
|
+
content = prompt or TASK_DECOMPOSE_PROMPT.format(
|
|
216
220
|
role_name=role_name,
|
|
217
221
|
content=self.content,
|
|
218
222
|
)
|
|
@@ -221,6 +225,8 @@ class Task(BaseModel):
|
|
|
221
225
|
)
|
|
222
226
|
response = agent.step(msg)
|
|
223
227
|
tasks = task_parser(response.msg.content, self.id)
|
|
228
|
+
for task in tasks:
|
|
229
|
+
task.additional_info = self.additional_info
|
|
224
230
|
return tasks
|
|
225
231
|
|
|
226
232
|
def compose(
|
|
@@ -248,6 +254,7 @@ class Task(BaseModel):
|
|
|
248
254
|
content = template.format(
|
|
249
255
|
role_name=role_name,
|
|
250
256
|
content=self.content,
|
|
257
|
+
additional_info=self.additional_info,
|
|
251
258
|
other_results=sub_tasks_result,
|
|
252
259
|
)
|
|
253
260
|
msg = BaseMessage.make_user_message(
|
|
@@ -19,19 +19,18 @@ from .openai_function import (
|
|
|
19
19
|
)
|
|
20
20
|
from .open_api_specs.security_config import openapi_security_config
|
|
21
21
|
|
|
22
|
-
from .google_maps_toolkit import
|
|
23
|
-
from .math_toolkit import
|
|
24
|
-
from .open_api_toolkit import
|
|
25
|
-
from .retrieval_toolkit import
|
|
26
|
-
from .search_toolkit import
|
|
27
|
-
from .twitter_toolkit import
|
|
28
|
-
from .weather_toolkit import
|
|
29
|
-
from .slack_toolkit import
|
|
30
|
-
from .dalle_toolkit import
|
|
31
|
-
from .linkedin_toolkit import
|
|
32
|
-
from .reddit_toolkit import
|
|
22
|
+
from .google_maps_toolkit import GoogleMapsToolkit
|
|
23
|
+
from .math_toolkit import MathToolkit, MATH_FUNCS
|
|
24
|
+
from .open_api_toolkit import OpenAPIToolkit
|
|
25
|
+
from .retrieval_toolkit import RetrievalToolkit
|
|
26
|
+
from .search_toolkit import SearchToolkit, SEARCH_FUNCS
|
|
27
|
+
from .twitter_toolkit import TwitterToolkit
|
|
28
|
+
from .weather_toolkit import WeatherToolkit, WEATHER_FUNCS
|
|
29
|
+
from .slack_toolkit import SlackToolkit
|
|
30
|
+
from .dalle_toolkit import DalleToolkit, DALLE_FUNCS
|
|
31
|
+
from .linkedin_toolkit import LinkedInToolkit
|
|
32
|
+
from .reddit_toolkit import RedditToolkit
|
|
33
33
|
|
|
34
|
-
from .base import BaseToolkit
|
|
35
34
|
from .code_execution import CodeExecutionToolkit
|
|
36
35
|
from .github_toolkit import GithubToolkit
|
|
37
36
|
|
|
@@ -40,18 +39,6 @@ __all__ = [
|
|
|
40
39
|
'get_openai_function_schema',
|
|
41
40
|
'get_openai_tool_schema',
|
|
42
41
|
'openapi_security_config',
|
|
43
|
-
'MATH_FUNCS',
|
|
44
|
-
'MAP_FUNCS',
|
|
45
|
-
'OPENAPI_FUNCS',
|
|
46
|
-
'RETRIEVAL_FUNCS',
|
|
47
|
-
'SEARCH_FUNCS',
|
|
48
|
-
'TWITTER_FUNCS',
|
|
49
|
-
'WEATHER_FUNCS',
|
|
50
|
-
'SLACK_FUNCS',
|
|
51
|
-
'DALLE_FUNCS',
|
|
52
|
-
'LINKEDIN_FUNCS',
|
|
53
|
-
'REDDIT_FUNCS',
|
|
54
|
-
'BaseToolkit',
|
|
55
42
|
'GithubToolkit',
|
|
56
43
|
'MathToolkit',
|
|
57
44
|
'GoogleMapsToolkit',
|
|
@@ -65,4 +52,8 @@ __all__ = [
|
|
|
65
52
|
'LinkedInToolkit',
|
|
66
53
|
'RedditToolkit',
|
|
67
54
|
'CodeExecutionToolkit',
|
|
55
|
+
'MATH_FUNCS',
|
|
56
|
+
'SEARCH_FUNCS',
|
|
57
|
+
'WEATHER_FUNCS',
|
|
58
|
+
'DALLE_FUNCS',
|
|
68
59
|
]
|
|
@@ -142,10 +142,6 @@ class GoogleMapsToolkit(BaseToolkit):
|
|
|
142
142
|
information on address completion, formatted address,
|
|
143
143
|
geographical coordinates (latitude and longitude), and metadata
|
|
144
144
|
types true for the address.
|
|
145
|
-
|
|
146
|
-
Raises:
|
|
147
|
-
ImportError: If the `googlemaps` library is not installed.
|
|
148
|
-
Exception: For unexpected errors during the address validation.
|
|
149
145
|
"""
|
|
150
146
|
addressvalidation_result = self.gmaps.addressvalidation(
|
|
151
147
|
[address],
|
|
@@ -304,6 +300,3 @@ class GoogleMapsToolkit(BaseToolkit):
|
|
|
304
300
|
OpenAIFunction(self.get_elevation),
|
|
305
301
|
OpenAIFunction(self.get_timezone),
|
|
306
302
|
]
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
MAP_FUNCS: List[OpenAIFunction] = GoogleMapsToolkit().get_tools()
|
|
@@ -410,7 +410,7 @@ class TwitterToolkit(BaseToolkit):
|
|
|
410
410
|
return TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET
|
|
411
411
|
|
|
412
412
|
def _get_oauth_session(self) -> requests.Session:
|
|
413
|
-
r
|
|
413
|
+
r"""Initiates an OAuth1Session with Twitter's API and returns it.
|
|
414
414
|
|
|
415
415
|
The function first fetches a request token, then prompts the user to
|
|
416
416
|
authorize the application. After the user has authorized the
|
|
@@ -431,7 +431,7 @@ class TwitterToolkit(BaseToolkit):
|
|
|
431
431
|
Manage-Tweets/create_tweet.py
|
|
432
432
|
https://github.com/twitterdev/Twitter-API-v2-sample-code/blob/main/
|
|
433
433
|
User-Lookup/get_users_me_user_context.py
|
|
434
|
-
|
|
434
|
+
"""
|
|
435
435
|
try:
|
|
436
436
|
from requests_oauthlib import OAuth1Session
|
|
437
437
|
except ImportError:
|
|
@@ -517,6 +517,3 @@ class TwitterToolkit(BaseToolkit):
|
|
|
517
517
|
return "HTTP Exception"
|
|
518
518
|
else:
|
|
519
519
|
return "Unexpected Exception"
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
TWITTER_FUNCS: List[OpenAIFunction] = TwitterToolkit().get_tools()
|
|
@@ -381,10 +381,17 @@ def json_to_function_code(json_obj: Dict) -> str:
|
|
|
381
381
|
docstring_args = []
|
|
382
382
|
return_keys = []
|
|
383
383
|
|
|
384
|
+
prop_to_python = {
|
|
385
|
+
'string': 'str',
|
|
386
|
+
'number': 'float',
|
|
387
|
+
'integer': 'int',
|
|
388
|
+
'boolean': 'bool',
|
|
389
|
+
}
|
|
390
|
+
|
|
384
391
|
for prop in required:
|
|
385
392
|
description = properties[prop]['description']
|
|
386
393
|
prop_type = properties[prop]['type']
|
|
387
|
-
python_type =
|
|
394
|
+
python_type = prop_to_python.get(prop_type, prop_type)
|
|
388
395
|
args.append(f"{prop}: {python_type}")
|
|
389
396
|
docstring_args.append(
|
|
390
397
|
f" {prop} ({python_type}): {description}."
|
|
@@ -193,8 +193,14 @@ def get_model_encoding(value_for_tiktoken: str):
|
|
|
193
193
|
try:
|
|
194
194
|
encoding = tiktoken.encoding_for_model(value_for_tiktoken)
|
|
195
195
|
except KeyError:
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
if value_for_tiktoken in [
|
|
197
|
+
ModelType.O1_MINI.value,
|
|
198
|
+
ModelType.O1_PREVIEW.value,
|
|
199
|
+
]:
|
|
200
|
+
encoding = tiktoken.get_encoding("o200k_base")
|
|
201
|
+
else:
|
|
202
|
+
print("Model not found. Using cl100k_base encoding.")
|
|
203
|
+
encoding = tiktoken.get_encoding("cl100k_base")
|
|
198
204
|
return encoding
|
|
199
205
|
|
|
200
206
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
|
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the “License”);
|
|
3
|
+
# you may not use this file except in compliance with the License.
|
|
4
|
+
# You may obtain a copy of the License at
|
|
5
|
+
#
|
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
#
|
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
# distributed under the License is distributed on an “AS IS” BASIS,
|
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
# See the License for the specific language governing permissions and
|
|
12
|
+
# limitations under the License.
|
|
13
|
+
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
|
|
14
|
+
|
|
15
|
+
from .role_playing_worker import RolePlayingWorker
|
|
16
|
+
from .single_agent_worker import SingleAgentWorker
|
|
17
|
+
from .workforce import Workforce
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"Workforce",
|
|
21
|
+
"SingleAgentWorker",
|
|
22
|
+
"RolePlayingWorker",
|
|
23
|
+
]
|
|
@@ -15,36 +15,40 @@ from abc import ABC, abstractmethod
|
|
|
15
15
|
from typing import Any
|
|
16
16
|
|
|
17
17
|
from camel.workforce.task_channel import TaskChannel
|
|
18
|
+
from camel.workforce.utils import check_if_running
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class BaseNode(ABC):
|
|
21
22
|
def __init__(self, description: str) -> None:
|
|
22
23
|
self.node_id = str(id(self))
|
|
23
24
|
self.description = description
|
|
24
|
-
# every node is initialized to use its own channel
|
|
25
25
|
self._channel: TaskChannel = TaskChannel()
|
|
26
26
|
self._running = False
|
|
27
27
|
|
|
28
|
+
@check_if_running(False)
|
|
28
29
|
def reset(self, *args: Any, **kwargs: Any) -> Any:
|
|
29
30
|
"""Resets the node to its initial state."""
|
|
30
|
-
|
|
31
|
+
self._channel = TaskChannel()
|
|
32
|
+
self._running = False
|
|
31
33
|
|
|
32
34
|
@abstractmethod
|
|
33
35
|
def set_channel(self, channel: TaskChannel):
|
|
34
36
|
r"""Sets the channel for the node."""
|
|
37
|
+
pass
|
|
35
38
|
|
|
36
39
|
@abstractmethod
|
|
37
40
|
async def _listen_to_channel(self):
|
|
38
41
|
r"""Listens to the channel and handle tasks. This method should be
|
|
39
42
|
the main loop for the node.
|
|
40
43
|
"""
|
|
44
|
+
pass
|
|
41
45
|
|
|
42
46
|
@abstractmethod
|
|
43
47
|
async def start(self):
|
|
44
48
|
r"""Start the node."""
|
|
49
|
+
pass
|
|
45
50
|
|
|
46
51
|
@abstractmethod
|
|
47
52
|
def stop(self):
|
|
48
|
-
r"""
|
|
49
|
-
|
|
50
|
-
"""
|
|
53
|
+
r"""Stop the node."""
|
|
54
|
+
pass
|