camel-ai 0.2.38__tar.gz → 0.2.39__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.2.38 → camel_ai-0.2.39}/PKG-INFO +3 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/__init__.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/chat_agent.py +4 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/repo_agent.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/benchmarks/apibank.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/benchmarks/apibench.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/__init__.py +3 -0
- camel_ai-0.2.39/camel/configs/modelscope_config.py +59 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_improving_cot.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datasets/__init__.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datasets/base_generator.py +22 -9
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datasets/few_shot_generator.py +2 -3
- camel_ai-0.2.39/camel/datasets/self_instruct_generator.py +415 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/openai_compatible_embedding.py +13 -5
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/environments/models.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/environments/single_step.py +155 -89
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/docker_interpreter.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/internal_python_interpreter.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/unstructured_io.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/blocks/chat_history_block.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/context_creators/score_based.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/__init__.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/model_factory.py +119 -0
- camel_ai-0.2.39/camel/models/modelscope_model.py +208 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/openai_audio_models.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/openai_model.py +49 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/togetherai_model.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/vllm_model.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/zhipuai_model.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/retrievers/vector_retriever.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/graph_storages/neo4j_graph.py +1 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/vectordb_storages/base.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/vectordb_storages/milvus.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/vectordb_storages/qdrant.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/tasks/task.py +2 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/__init__.py +4 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/arxiv_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/ask_news_toolkit.py +11 -3
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/audio_analysis_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/base.py +3 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/code_execution.py +3 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/dappier_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/data_commons_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/excel_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/file_write_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/github_toolkit.py +6 -4
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/google_scholar_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/human_toolkit.py +17 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/image_analysis_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/linkedin_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/math_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/mcp_toolkit.py +42 -52
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/meshy_toolkit.py +20 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/networkx_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/notion_toolkit.py +7 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/openbb_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/pubmed_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/reddit_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/retrieval_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/search_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/semantic_scholar_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/slack_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/stripe_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/sympy_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/terminal_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/twitter_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/video_analysis_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/video_download_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/weather_toolkit.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/whatsapp_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/zapier_toolkit.py +2 -1
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/types/enums.py +65 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/types/unified_model_type.py +5 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/__init__.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/chunker/code_chunker.py +9 -9
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/commons.py +50 -30
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/constants.py +2 -2
- camel_ai-0.2.39/camel/utils/mcp.py +79 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/verifiers/__init__.py +2 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/verifiers/base.py +15 -15
- camel_ai-0.2.39/camel/verifiers/math_verifier.py +182 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/verifiers/python_verifier.py +18 -26
- {camel_ai-0.2.38 → camel_ai-0.2.39}/pyproject.toml +15 -2
- {camel_ai-0.2.38 → camel_ai-0.2.39}/.gitignore +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/LICENSE +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/README.md +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/_types.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/_utils.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/critic_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/deductive_reasoner_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/embodied_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/knowledge_graph_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/multi_hop_generator_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/programmed_agent_instruction.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/role_assignment_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/search_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/task_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/tool_agents/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/tool_agents/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/benchmarks/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/benchmarks/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/benchmarks/gaia.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/benchmarks/nexus.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/benchmarks/ragbench.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/discord/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/discord/discord_app.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/discord/discord_installation.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/discord/discord_store.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/slack/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/slack/models.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/slack/slack_app.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/bots/telegram_bot.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/aiml_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/anthropic_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/base_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/cohere_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/deepseek_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/gemini_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/groq_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/internlm_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/litellm_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/mistral_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/moonshot_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/nvidia_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/ollama_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/openai_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/openrouter_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/qwen_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/reka_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/samba_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/sglang_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/siliconflow_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/togetherai_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/vllm_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/yi_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/configs/zhipuai_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/data_collector/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/data_collector/alpaca_collector.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/data_collector/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/data_collector/sharegpt_collector.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/cot_datagen.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/evol_instruct/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/evol_instruct/evol_instruct.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/evol_instruct/scorer.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/evol_instruct/templates.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_instruct/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_instruct/filter/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_instruct/filter/filter_function.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_instruct/filter/filter_registry.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_instruct/filter/instruction_filter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_instruct/self_instruct.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/self_instruct/templates.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/source2synth/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/source2synth/data_processor.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/source2synth/models.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datagen/source2synth/user_data_processor_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datahubs/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datahubs/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datahubs/huggingface.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datahubs/models.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datasets/models.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/datasets/static_dataset.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/jina_embedding.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/mistral_embedding.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/openai_embedding.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/embeddings/vlm_embedding.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/environments/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/environments/multi_step.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/extractors/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/extractors/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/extractors/python_strategies.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/generators.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/human.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/docker/Dockerfile +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/e2b_interpreter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/interpreter_error.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/ipython_interpreter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/interpreters/subprocess_interpreter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/apify_reader.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/base_io.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/chunkr_reader.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/firecrawl_reader.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/jina_url_reader.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/mineru_extractor.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/loaders/pandas_reader.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/logger.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/agent_memories.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/blocks/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/blocks/vectordb_block.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/context_creators/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/memories/records.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/conversion/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/conversion/alpaca.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/conversion/conversation_models.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/conversion/sharegpt/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/conversion/sharegpt/function_call_formatter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/conversion/sharegpt/hermes/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/conversion/sharegpt/hermes/hermes_function_formatter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/messages/func_message.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/_utils.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/aiml_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/anthropic_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/azure_openai_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/base_audio_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/base_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/cohere_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/deepseek_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/fish_audio_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/gemini_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/groq_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/internlm_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/litellm_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/mistral_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/model_manager.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/moonshot_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/nemotron_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/nvidia_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/ollama_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/openai_compatible_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/openrouter_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/qwen_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/reka_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/reward/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/reward/base_reward_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/reward/evaluator.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/reward/nemotron_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/reward/skywork_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/samba_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/sglang_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/siliconflow_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/stub_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/volcano_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/models/yi_model.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/personas/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/personas/persona.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/personas/persona_hub.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/ai_society.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/code.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/evaluation.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/generate_text_embedding_data.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/image_craft.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/misalignment.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/multi_condition_image_craft.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/object_recognition.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/persona_hub.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/prompt_templates.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/role_description_prompt_template.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/solution_extraction.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/task_prompt_template.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/translation.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/prompts/video_description_prompt.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/py.typed +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/responses/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/responses/agent_responses.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/retrievers/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/retrievers/auto_retriever.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/retrievers/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/retrievers/bm25_retriever.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/retrievers/cohere_rerank_retriever.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/retrievers/hybrid_retrival.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/api.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/configs.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/docker_runtime.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/llm_guard_runtime.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/remote_http_runtime.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/utils/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/utils/function_risk_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/runtime/utils/ignore_risk_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/schemas/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/schemas/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/schemas/openai_converter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/schemas/outlines_converter.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/babyagi_playing.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/role_playing.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/prompts.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/role_playing_worker.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/single_agent_worker.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/task_channel.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/utils.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/worker.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/societies/workforce/workforce.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/graph_storages/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/graph_storages/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/graph_storages/graph_element.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/graph_storages/nebula_graph.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/key_value_storages/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/key_value_storages/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/key_value_storages/in_memory.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/key_value_storages/json.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/key_value_storages/mem0_cloud.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/key_value_storages/redis.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/object_storages/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/object_storages/amazon_s3.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/object_storages/azure_blob.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/object_storages/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/object_storages/google_cloud.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/vectordb_storages/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/storages/vectordb_storages/tidb.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/tasks/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/tasks/task_prompt.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/terminators/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/terminators/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/terminators/response_terminator.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/terminators/token_limit_terminator.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/browser_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/dalle_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/function_tool.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/google_maps_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/memory_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/mineru_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/security_config.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/open_api_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/openai_agent_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/page_script.js +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/searxng_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/toolkits/thinking_toolkit.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/types/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/types/agents/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/types/agents/tool_calling_record.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/types/openai_types.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/async_func.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/chunker/__init__.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/chunker/base.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/chunker/uio_chunker.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/deduplication.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/response_format.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/utils/token_counting.py +0 -0
- {camel_ai-0.2.38 → camel_ai-0.2.39}/camel/verifiers/models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: camel-ai
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.39
|
|
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
|
|
@@ -55,6 +55,7 @@ Requires-Dist: ipykernel<7,>=6.0.0; extra == 'all'
|
|
|
55
55
|
Requires-Dist: jupyter-client<9,>=8.6.2; extra == 'all'
|
|
56
56
|
Requires-Dist: linkup-sdk<0.3,>=0.2.1; extra == 'all'
|
|
57
57
|
Requires-Dist: litellm<2,>=1.38.1; extra == 'all'
|
|
58
|
+
Requires-Dist: math-verify<0.8,>=0.7.0; extra == 'all'
|
|
58
59
|
Requires-Dist: mcp>=1.3.0; extra == 'all'
|
|
59
60
|
Requires-Dist: mem0ai>=0.1.67; extra == 'all'
|
|
60
61
|
Requires-Dist: mistralai<2,>=1.1.0; extra == 'all'
|
|
@@ -133,6 +134,7 @@ Provides-Extra: data-tools
|
|
|
133
134
|
Requires-Dist: aiosqlite<0.21,>=0.20.0; extra == 'data-tools'
|
|
134
135
|
Requires-Dist: datacommons-pandas<0.0.4,>=0.0.3; extra == 'data-tools'
|
|
135
136
|
Requires-Dist: datacommons<2,>=1.4.3; extra == 'data-tools'
|
|
137
|
+
Requires-Dist: math-verify<0.8,>=0.7.0; extra == 'data-tools'
|
|
136
138
|
Requires-Dist: networkx<4,>=3.4.2; extra == 'data-tools'
|
|
137
139
|
Requires-Dist: numpy~=1.26; extra == 'data-tools'
|
|
138
140
|
Requires-Dist: pandas<2,>=1.5.3; extra == 'data-tools'
|
|
@@ -526,6 +526,10 @@ class ChatAgent(BaseAgent):
|
|
|
526
526
|
message.content = response.output_messages[0].content
|
|
527
527
|
if not self._try_format_message(message, response_format):
|
|
528
528
|
logger.warning(f"Failed to parse response: {message.content}")
|
|
529
|
+
logger.warning(
|
|
530
|
+
"To improve reliability, consider using models "
|
|
531
|
+
"that are better equipped to handle structured output"
|
|
532
|
+
)
|
|
529
533
|
|
|
530
534
|
async def _aformat_response_if_needed(
|
|
531
535
|
self,
|
|
@@ -17,7 +17,7 @@ from string import Template
|
|
|
17
17
|
from typing import TYPE_CHECKING, List, Optional, Tuple, Union
|
|
18
18
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
|
-
from github import Github
|
|
20
|
+
from github.MainClass import Github
|
|
21
21
|
from pydantic import BaseModel
|
|
22
22
|
|
|
23
23
|
from camel.agents import ChatAgent
|
|
@@ -219,7 +219,7 @@ class RepoAgent(ChatAgent):
|
|
|
219
219
|
List[RepositoryInfo]: A list of objects containing information
|
|
220
220
|
about the all repositories, including the contents.
|
|
221
221
|
"""
|
|
222
|
-
from github import Github
|
|
222
|
+
from github.MainClass import Github
|
|
223
223
|
|
|
224
224
|
github_client = Github(self.github_auth_token)
|
|
225
225
|
res = []
|
|
@@ -48,7 +48,7 @@ def process_messages(
|
|
|
48
48
|
Args:
|
|
49
49
|
chat_history (List[Dict[str, Any]):
|
|
50
50
|
A list of dictionaries representing the chat history.
|
|
51
|
-
prompt (str): A
|
|
51
|
+
prompt (str): A prompt to be set as the system message.
|
|
52
52
|
|
|
53
53
|
Returns:
|
|
54
54
|
List[Dict[str, str]]: A list of dictionaries representing
|
|
@@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
# Mapping of dataset names to file names
|
|
33
|
-
# 'Oracle'
|
|
33
|
+
# 'Oracle' retriever used here which means all the full
|
|
34
34
|
# API documentation will be included in the prompt
|
|
35
35
|
dataset_mapping = {
|
|
36
36
|
"huggingface": {
|
|
@@ -21,6 +21,7 @@ from .groq_config import GROQ_API_PARAMS, GroqConfig
|
|
|
21
21
|
from .internlm_config import INTERNLM_API_PARAMS, InternLMConfig
|
|
22
22
|
from .litellm_config import LITELLM_API_PARAMS, LiteLLMConfig
|
|
23
23
|
from .mistral_config import MISTRAL_API_PARAMS, MistralConfig
|
|
24
|
+
from .modelscope_config import MODELSCOPE_API_PARAMS, ModelScopeConfig
|
|
24
25
|
from .moonshot_config import MOONSHOT_API_PARAMS, MoonshotConfig
|
|
25
26
|
from .nvidia_config import NVIDIA_API_PARAMS, NvidiaConfig
|
|
26
27
|
from .ollama_config import OLLAMA_API_PARAMS, OllamaConfig
|
|
@@ -85,6 +86,8 @@ __all__ = [
|
|
|
85
86
|
'INTERNLM_API_PARAMS',
|
|
86
87
|
'MoonshotConfig',
|
|
87
88
|
"MOONSHOT_API_PARAMS",
|
|
89
|
+
'ModelScopeConfig',
|
|
90
|
+
'MODELSCOPE_API_PARAMS',
|
|
88
91
|
'SiliconFlowConfig',
|
|
89
92
|
'SILICONFLOW_API_PARAMS',
|
|
90
93
|
'AIMLConfig',
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# ========= Copyright 2023-2024 @ 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-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from typing import Optional, Union
|
|
17
|
+
|
|
18
|
+
from camel.configs.base_config import BaseConfig
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ModelScopeConfig(BaseConfig):
|
|
22
|
+
r"""Defines the parameters for generating chat completions using the
|
|
23
|
+
ModelScope API. You can refer to the following link for more details:
|
|
24
|
+
https://www.modelscope.cn/docs/model-service/API-Inference/intro
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
tool_choice (Union[dict[str, str], str], optional): Controls which (if
|
|
28
|
+
any) tool is called by the model. :obj:`"none"` means the model
|
|
29
|
+
will not call any tool and instead generates a message.
|
|
30
|
+
:obj:`"auto"` means the model can pick between generating a
|
|
31
|
+
message or calling one or more tools. :obj:`"required"` or
|
|
32
|
+
specifying a particular tool via
|
|
33
|
+
{"type": "function", "function": {"name": "some_function"}}
|
|
34
|
+
can be used to guide the model to use tools more strongly.
|
|
35
|
+
(default: :obj:`None`)
|
|
36
|
+
max_tokens (int, optional): Specifies the maximum number of tokens
|
|
37
|
+
the model can generate. This sets an upper limit, but does not
|
|
38
|
+
guarantee that this number will always be reached.
|
|
39
|
+
(default: :obj:`None`)
|
|
40
|
+
top_p (float, optional): Controls the randomness of the generated
|
|
41
|
+
results. Lower values lead to less randomness, while higher
|
|
42
|
+
values increase randomness. (default: :obj:`None`)
|
|
43
|
+
temperature (float, optional): Controls the diversity and focus of
|
|
44
|
+
the generated results. Lower values make the output more focused,
|
|
45
|
+
while higher values make it more diverse. (default: :obj:`0.3`)
|
|
46
|
+
stream (bool, optional): If True, enables streaming output.
|
|
47
|
+
(default: :obj:`None`)
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
tool_choice: Optional[Union[dict[str, str], str]] = None
|
|
51
|
+
max_tokens: Optional[int] = None
|
|
52
|
+
top_p: Optional[float] = None
|
|
53
|
+
temperature: Optional[float] = None
|
|
54
|
+
stream: Optional[bool] = None
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
MODELSCOPE_API_PARAMS = {
|
|
58
|
+
param for param in ModelScopeConfig.model_fields.keys()
|
|
59
|
+
}
|
|
@@ -518,7 +518,7 @@ class SelfImprovingCoTPipeline:
|
|
|
518
518
|
self.reason_agent.model_backend.model_config_dict['n'] = (
|
|
519
519
|
self.rejection_sampling_n
|
|
520
520
|
)
|
|
521
|
-
# Generate multiple
|
|
521
|
+
# Generate multiple candidate traces in one call using parameter n
|
|
522
522
|
responses = self.reason_agent.step(prompt)
|
|
523
523
|
# Extract cancidate traces
|
|
524
524
|
candidate_traces = [choice.content for choice in responses.msgs]
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
from .base_generator import BaseGenerator
|
|
15
15
|
from .few_shot_generator import FewShotGenerator
|
|
16
16
|
from .models import DataPoint
|
|
17
|
+
from .self_instruct_generator import SelfInstructGenerator
|
|
17
18
|
from .static_dataset import StaticDataset
|
|
18
19
|
|
|
19
20
|
__all__ = [
|
|
@@ -21,4 +22,5 @@ __all__ = [
|
|
|
21
22
|
"DataPoint",
|
|
22
23
|
"FewShotGenerator",
|
|
23
24
|
"StaticDataset",
|
|
25
|
+
"SelfInstructGenerator",
|
|
24
26
|
]
|
|
@@ -39,6 +39,7 @@ class BaseGenerator(abc.ABC, IterableDataset):
|
|
|
39
39
|
def __init__(
|
|
40
40
|
self,
|
|
41
41
|
seed: int = 42,
|
|
42
|
+
buffer: int = 20,
|
|
42
43
|
cache: Union[str, Path, None] = None,
|
|
43
44
|
data_path: Union[str, Path, None] = None,
|
|
44
45
|
**kwargs,
|
|
@@ -47,6 +48,8 @@ class BaseGenerator(abc.ABC, IterableDataset):
|
|
|
47
48
|
|
|
48
49
|
Args:
|
|
49
50
|
seed (int): Random seed for reproducibility. (default: :obj:`42`)
|
|
51
|
+
buffer (int): Amount of DataPoints to be generated when the
|
|
52
|
+
iterator runs out of DataPoints in data. (default: :obj:`20`)
|
|
50
53
|
cache (Union[str, Path, None]): Optional path to save generated
|
|
51
54
|
datapoints during iteration. If None is provided, datapoints
|
|
52
55
|
will be discarded every 100 generations.
|
|
@@ -56,7 +59,7 @@ class BaseGenerator(abc.ABC, IterableDataset):
|
|
|
56
59
|
"""
|
|
57
60
|
self._rng = random.Random(seed)
|
|
58
61
|
self.cache = Path(cache) if cache else None
|
|
59
|
-
|
|
62
|
+
self._buffer = buffer
|
|
60
63
|
self._data: List[DataPoint] = []
|
|
61
64
|
self._batch_to_save: List[DataPoint] = []
|
|
62
65
|
|
|
@@ -72,15 +75,27 @@ class BaseGenerator(abc.ABC, IterableDataset):
|
|
|
72
75
|
)
|
|
73
76
|
|
|
74
77
|
@abc.abstractmethod
|
|
75
|
-
async def generate_new(self, n: int, **kwargs) ->
|
|
76
|
-
r"""Generate n new datapoints.
|
|
78
|
+
async def generate_new(self, n: int, **kwargs) -> None:
|
|
79
|
+
r"""Generate n new datapoints and append them to self._data.
|
|
80
|
+
|
|
81
|
+
Subclass implementations must generate the specified number of
|
|
82
|
+
datapoints and append them directly to the `self._data` list.
|
|
83
|
+
This method should not return the datapoints; the iterator
|
|
84
|
+
relies on `self._data` being populated.
|
|
77
85
|
|
|
78
86
|
Args:
|
|
79
|
-
n (int): Number of datapoints to generate.
|
|
87
|
+
n (int): Number of datapoints to generate and append.
|
|
80
88
|
**kwargs: Additional generation parameters.
|
|
81
89
|
|
|
82
90
|
Returns:
|
|
83
|
-
|
|
91
|
+
None: This method should not return anything.
|
|
92
|
+
|
|
93
|
+
Example:
|
|
94
|
+
```python
|
|
95
|
+
async def generate_new(self, n: int, **kwargs) -> None:
|
|
96
|
+
new_points = [DataPoint(...) for _ in range(n)]
|
|
97
|
+
self._data.extend(new_points)
|
|
98
|
+
```
|
|
84
99
|
"""
|
|
85
100
|
pass
|
|
86
101
|
|
|
@@ -99,8 +114,7 @@ class BaseGenerator(abc.ABC, IterableDataset):
|
|
|
99
114
|
async def generator():
|
|
100
115
|
while True:
|
|
101
116
|
if not self._data:
|
|
102
|
-
|
|
103
|
-
self._data.extend(new_datapoints)
|
|
117
|
+
await self.generate_new(self._buffer)
|
|
104
118
|
datapoint = self._data.pop(0)
|
|
105
119
|
yield datapoint
|
|
106
120
|
self._batch_to_save.append(datapoint)
|
|
@@ -137,8 +151,7 @@ class BaseGenerator(abc.ABC, IterableDataset):
|
|
|
137
151
|
|
|
138
152
|
while True:
|
|
139
153
|
if not self._data:
|
|
140
|
-
|
|
141
|
-
self._data.extend(new_datapoints)
|
|
154
|
+
asyncio.run(self.generate_new(self._buffer))
|
|
142
155
|
datapoint = self._data.pop(0)
|
|
143
156
|
yield datapoint
|
|
144
157
|
self._batch_to_save.append(datapoint)
|
|
@@ -126,7 +126,7 @@ class FewShotGenerator(BaseGenerator):
|
|
|
126
126
|
max_retries: int = 10,
|
|
127
127
|
num_examples: int = 3,
|
|
128
128
|
**kwargs,
|
|
129
|
-
) ->
|
|
129
|
+
) -> None:
|
|
130
130
|
r"""Generates and validates `n` new datapoints through
|
|
131
131
|
few-shot prompting, with a retry limit.
|
|
132
132
|
|
|
@@ -203,7 +203,7 @@ class FewShotGenerator(BaseGenerator):
|
|
|
203
203
|
try:
|
|
204
204
|
verifier_response = await self.verifier.verify(
|
|
205
205
|
solution=rationale,
|
|
206
|
-
|
|
206
|
+
reference_answer=None,
|
|
207
207
|
)
|
|
208
208
|
if not verifier_response or not verifier_response.result:
|
|
209
209
|
raise ValueError(
|
|
@@ -255,4 +255,3 @@ class FewShotGenerator(BaseGenerator):
|
|
|
255
255
|
# Thread-safe way to extend the data list
|
|
256
256
|
async with asyncio.Lock():
|
|
257
257
|
self._data.extend(valid_data_points)
|
|
258
|
-
return valid_data_points
|