camel-ai 0.2.41__tar.gz → 0.2.43__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.41 → camel_ai-0.2.43}/PKG-INFO +21 -2
- {camel_ai-0.2.41 → camel_ai-0.2.43}/README.md +7 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/__init__.py +1 -1
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/chat_agent.py +24 -4
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/__init__.py +3 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/anthropic_config.py +2 -24
- camel_ai-0.2.43/camel/configs/ppio_config.py +102 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/reka_config.py +1 -7
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/samba_config.py +1 -7
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/togetherai_config.py +1 -7
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/__init__.py +4 -0
- camel_ai-0.2.43/camel/embeddings/azure_embedding.py +119 -0
- camel_ai-0.2.43/camel/embeddings/together_embedding.py +136 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/environments/__init__.py +3 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/environments/multi_step.py +12 -10
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/environments/single_step.py +28 -11
- camel_ai-0.2.43/camel/environments/tic_tac_toe.py +518 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/__init__.py +2 -0
- camel_ai-0.2.43/camel/loaders/crawl4ai_reader.py +230 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/__init__.py +2 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/azure_openai_model.py +10 -2
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/base_model.py +111 -28
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/cohere_model.py +5 -1
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/deepseek_model.py +4 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/gemini_model.py +8 -2
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/model_factory.py +3 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/ollama_model.py +8 -2
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/openai_compatible_model.py +8 -2
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/openai_model.py +16 -4
- camel_ai-0.2.43/camel/models/ppio_model.py +184 -0
- camel_ai-0.2.43/camel/models/vllm_model.py +314 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/workforce.py +26 -3
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/__init__.py +2 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/browser_toolkit.py +7 -3
- camel_ai-0.2.43/camel/toolkits/google_calendar_toolkit.py +432 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/search_toolkit.py +119 -1
- camel_ai-0.2.43/camel/toolkits/terminal_toolkit.py +1037 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/types/enums.py +68 -3
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/types/unified_model_type.py +5 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/verifiers/python_verifier.py +93 -9
- {camel_ai-0.2.41 → camel_ai-0.2.43}/pyproject.toml +20 -3
- camel_ai-0.2.41/camel/models/vllm_model.py +0 -215
- camel_ai-0.2.41/camel/toolkits/terminal_toolkit.py +0 -423
- {camel_ai-0.2.41 → camel_ai-0.2.43}/.gitignore +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/LICENSE +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/_types.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/_utils.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/critic_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/deductive_reasoner_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/embodied_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/knowledge_graph_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/multi_hop_generator_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/programmed_agent_instruction.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/repo_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/role_assignment_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/search_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/task_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/tool_agents/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/tool_agents/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/benchmarks/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/benchmarks/apibank.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/benchmarks/apibench.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/benchmarks/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/benchmarks/gaia.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/benchmarks/nexus.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/benchmarks/ragbench.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/discord/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/discord/discord_app.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/discord/discord_installation.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/discord/discord_store.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/slack/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/slack/models.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/slack/slack_app.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/bots/telegram_bot.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/aiml_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/base_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/cohere_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/deepseek_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/gemini_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/groq_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/internlm_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/litellm_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/mistral_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/modelscope_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/moonshot_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/nvidia_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/ollama_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/openai_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/openrouter_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/qwen_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/sglang_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/siliconflow_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/vllm_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/yi_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/configs/zhipuai_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/data_collector/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/data_collector/alpaca_collector.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/data_collector/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/data_collector/sharegpt_collector.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/cot_datagen.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/evol_instruct/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/evol_instruct/evol_instruct.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/evol_instruct/scorer.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/evol_instruct/templates.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_improving_cot.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_instruct/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_instruct/filter/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_instruct/filter/filter_function.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_instruct/filter/filter_registry.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_instruct/filter/instruction_filter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_instruct/self_instruct.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/self_instruct/templates.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/source2synth/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/source2synth/data_processor.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/source2synth/models.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datagen/source2synth/user_data_processor_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datahubs/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datahubs/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datahubs/huggingface.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datahubs/models.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datasets/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datasets/base_generator.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datasets/few_shot_generator.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datasets/models.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datasets/self_instruct_generator.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/datasets/static_dataset.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/jina_embedding.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/mistral_embedding.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/openai_compatible_embedding.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/openai_embedding.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/embeddings/vlm_embedding.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/environments/models.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/extractors/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/extractors/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/extractors/python_strategies.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/generators.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/human.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/docker/Dockerfile +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/docker_interpreter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/e2b_interpreter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/internal_python_interpreter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/interpreter_error.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/ipython_interpreter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/interpreters/subprocess_interpreter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/apify_reader.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/base_io.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/chunkr_reader.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/firecrawl_reader.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/jina_url_reader.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/mineru_extractor.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/pandas_reader.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/loaders/unstructured_io.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/logger.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/agent_memories.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/blocks/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/blocks/chat_history_block.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/blocks/vectordb_block.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/context_creators/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/context_creators/score_based.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/memories/records.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/conversion/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/conversion/alpaca.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/conversion/conversation_models.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/conversion/sharegpt/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/conversion/sharegpt/function_call_formatter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/conversion/sharegpt/hermes/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/conversion/sharegpt/hermes/hermes_function_formatter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/messages/func_message.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/_utils.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/aiml_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/anthropic_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/base_audio_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/fish_audio_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/groq_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/internlm_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/litellm_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/mistral_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/model_manager.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/modelscope_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/moonshot_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/nemotron_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/nvidia_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/openai_audio_models.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/openrouter_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/qwen_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/reka_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/reward/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/reward/base_reward_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/reward/evaluator.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/reward/nemotron_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/reward/skywork_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/samba_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/sglang_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/siliconflow_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/stub_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/togetherai_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/volcano_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/yi_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/models/zhipuai_model.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/personas/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/personas/persona.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/personas/persona_hub.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/ai_society.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/code.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/evaluation.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/generate_text_embedding_data.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/image_craft.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/misalignment.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/multi_condition_image_craft.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/object_recognition.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/persona_hub.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/prompt_templates.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/role_description_prompt_template.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/solution_extraction.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/task_prompt_template.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/translation.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/prompts/video_description_prompt.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/py.typed +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/responses/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/responses/agent_responses.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/retrievers/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/retrievers/auto_retriever.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/retrievers/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/retrievers/bm25_retriever.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/retrievers/cohere_rerank_retriever.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/retrievers/hybrid_retrival.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/retrievers/vector_retriever.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/api.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/configs.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/docker_runtime.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/llm_guard_runtime.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/remote_http_runtime.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/utils/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/utils/function_risk_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/runtime/utils/ignore_risk_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/schemas/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/schemas/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/schemas/openai_converter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/schemas/outlines_converter.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/babyagi_playing.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/role_playing.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/prompts.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/role_playing_worker.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/single_agent_worker.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/task_channel.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/utils.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/societies/workforce/worker.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/graph_storages/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/graph_storages/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/graph_storages/graph_element.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/graph_storages/nebula_graph.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/graph_storages/neo4j_graph.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/key_value_storages/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/key_value_storages/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/key_value_storages/in_memory.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/key_value_storages/json.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/key_value_storages/mem0_cloud.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/key_value_storages/redis.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/object_storages/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/object_storages/amazon_s3.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/object_storages/azure_blob.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/object_storages/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/object_storages/google_cloud.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/vectordb_storages/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/vectordb_storages/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/vectordb_storages/milvus.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/vectordb_storages/qdrant.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/storages/vectordb_storages/tidb.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/tasks/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/tasks/task.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/tasks/task_prompt.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/terminators/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/terminators/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/terminators/response_terminator.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/terminators/token_limit_terminator.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/arxiv_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/ask_news_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/audio_analysis_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/code_execution.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/dalle_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/dappier_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/data_commons_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/excel_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/file_write_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/function_tool.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/github_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/google_maps_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/google_scholar_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/human_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/image_analysis_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/linkedin_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/math_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/mcp_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/memory_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/meshy_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/mineru_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/networkx_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/notion_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/security_config.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/open_api_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/openai_agent_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/openbb_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/page_script.js +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/pubmed_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/reddit_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/retrieval_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/searxng_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/semantic_scholar_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/slack_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/stripe_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/sympy_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/thinking_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/twitter_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/video_analysis_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/video_download_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/weather_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/whatsapp_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/toolkits/zapier_toolkit.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/types/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/types/agents/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/types/agents/tool_calling_record.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/types/openai_types.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/async_func.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/chunker/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/chunker/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/chunker/code_chunker.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/chunker/uio_chunker.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/commons.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/constants.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/deduplication.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/mcp.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/response_format.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/utils/token_counting.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/verifiers/__init__.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/verifiers/base.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/camel/verifiers/math_verifier.py +0 -0
- {camel_ai-0.2.41 → camel_ai-0.2.43}/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.43
|
|
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
|
|
@@ -17,7 +17,7 @@ Requires-Dist: jsonschema<5,>=4
|
|
|
17
17
|
Requires-Dist: mcp>=1.3.0
|
|
18
18
|
Requires-Dist: openai<2,>=1.68.0
|
|
19
19
|
Requires-Dist: psutil<6,>=5.9.8
|
|
20
|
-
Requires-Dist: pydantic
|
|
20
|
+
Requires-Dist: pydantic>=2.10.6
|
|
21
21
|
Requires-Dist: tiktoken<0.8,>=0.7.0
|
|
22
22
|
Provides-Extra: all
|
|
23
23
|
Requires-Dist: accelerate<0.27,>=0.26.0; extra == 'all'
|
|
@@ -31,6 +31,7 @@ Requires-Dist: azure-storage-blob<13,>=12.21.0; extra == 'all'
|
|
|
31
31
|
Requires-Dist: beautifulsoup4<5,>=4; extra == 'all'
|
|
32
32
|
Requires-Dist: botocore<2,>=1.35.3; extra == 'all'
|
|
33
33
|
Requires-Dist: cohere<6,>=5.11.0; extra == 'all'
|
|
34
|
+
Requires-Dist: crawl4ai>=0.3.745; extra == 'all'
|
|
34
35
|
Requires-Dist: dappier<0.4,>=0.3.3; extra == 'all'
|
|
35
36
|
Requires-Dist: datacommons-pandas<0.0.4,>=0.0.3; extra == 'all'
|
|
36
37
|
Requires-Dist: datacommons<2,>=1.4.3; extra == 'all'
|
|
@@ -42,11 +43,15 @@ Requires-Dist: docx2txt<0.9,>=0.8; extra == 'all'
|
|
|
42
43
|
Requires-Dist: docx>=0.2.4; extra == 'all'
|
|
43
44
|
Requires-Dist: duckduckgo-search<7,>=6.3.5; extra == 'all'
|
|
44
45
|
Requires-Dist: e2b-code-interpreter<2,>=1.0.3; extra == 'all'
|
|
46
|
+
Requires-Dist: exa-py<2,>=1.10.0; extra == 'all'
|
|
45
47
|
Requires-Dist: fastapi>=0.115.11; extra == 'all'
|
|
46
48
|
Requires-Dist: ffmpeg-python<0.3,>=0.2.0; extra == 'all'
|
|
47
49
|
Requires-Dist: firecrawl-py<2,>=1.0.0; extra == 'all'
|
|
48
50
|
Requires-Dist: fish-audio-sdk<2025,>=2024.12.5; extra == 'all'
|
|
49
51
|
Requires-Dist: fpdf>=1.7.2; extra == 'all'
|
|
52
|
+
Requires-Dist: google-api-python-client==2.166.0; extra == 'all'
|
|
53
|
+
Requires-Dist: google-auth-httplib2==0.2.0; extra == 'all'
|
|
54
|
+
Requires-Dist: google-auth-oauthlib==1.2.1; extra == 'all'
|
|
50
55
|
Requires-Dist: google-cloud-storage<3,>=2.18.0; extra == 'all'
|
|
51
56
|
Requires-Dist: googlemaps<5,>=4.10.0; extra == 'all'
|
|
52
57
|
Requires-Dist: gradio<4,>=3; extra == 'all'
|
|
@@ -178,6 +183,7 @@ Requires-Dist: sphinx<8,>=7; extra == 'docs'
|
|
|
178
183
|
Requires-Dist: sphinxext-rediraffe<0.3,>=0.2.7; extra == 'docs'
|
|
179
184
|
Provides-Extra: document-tools
|
|
180
185
|
Requires-Dist: beautifulsoup4<5,>=4; extra == 'document-tools'
|
|
186
|
+
Requires-Dist: crawl4ai>=0.3.745; extra == 'document-tools'
|
|
181
187
|
Requires-Dist: docx2txt<0.9,>=0.8; extra == 'document-tools'
|
|
182
188
|
Requires-Dist: docx>=0.2.4; extra == 'document-tools'
|
|
183
189
|
Requires-Dist: fpdf>=1.7.2; extra == 'document-tools'
|
|
@@ -217,6 +223,7 @@ Provides-Extra: owl
|
|
|
217
223
|
Requires-Dist: anthropic<0.50.0,>=0.47.0; extra == 'owl'
|
|
218
224
|
Requires-Dist: beautifulsoup4<5,>=4; extra == 'owl'
|
|
219
225
|
Requires-Dist: chunkr-ai>=0.0.41; extra == 'owl'
|
|
226
|
+
Requires-Dist: crawl4ai>=0.3.745; extra == 'owl'
|
|
220
227
|
Requires-Dist: datasets<4,>=3; extra == 'owl'
|
|
221
228
|
Requires-Dist: docx2txt<0.9,>=0.8; extra == 'owl'
|
|
222
229
|
Requires-Dist: docx>=0.2.4; extra == 'owl'
|
|
@@ -258,6 +265,7 @@ Requires-Dist: xls2xlsx>=0.2.0; extra == 'owl'
|
|
|
258
265
|
Requires-Dist: yt-dlp<2025,>=2024.11.4; extra == 'owl'
|
|
259
266
|
Provides-Extra: rag
|
|
260
267
|
Requires-Dist: cohere<6,>=5.11.0; extra == 'rag'
|
|
268
|
+
Requires-Dist: crawl4ai>=0.3.745; extra == 'rag'
|
|
261
269
|
Requires-Dist: nebula3-python==3.8.2; extra == 'rag'
|
|
262
270
|
Requires-Dist: neo4j<6,>=5.18.0; extra == 'rag'
|
|
263
271
|
Requires-Dist: numpy~=1.26; extra == 'rag'
|
|
@@ -292,8 +300,12 @@ Requires-Dist: apify-client<2,>=1.8.1; extra == 'web-tools'
|
|
|
292
300
|
Requires-Dist: beautifulsoup4<5,>=4; extra == 'web-tools'
|
|
293
301
|
Requires-Dist: dappier<0.4,>=0.3.3; extra == 'web-tools'
|
|
294
302
|
Requires-Dist: duckduckgo-search<7,>=6.3.5; extra == 'web-tools'
|
|
303
|
+
Requires-Dist: exa-py<2,>=1.10.0; extra == 'web-tools'
|
|
295
304
|
Requires-Dist: fastapi>=0.115.11; extra == 'web-tools'
|
|
296
305
|
Requires-Dist: firecrawl-py<2,>=1.0.0; extra == 'web-tools'
|
|
306
|
+
Requires-Dist: google-api-python-client==2.166.0; extra == 'web-tools'
|
|
307
|
+
Requires-Dist: google-auth-httplib2==0.2.0; extra == 'web-tools'
|
|
308
|
+
Requires-Dist: google-auth-oauthlib==1.2.1; extra == 'web-tools'
|
|
297
309
|
Requires-Dist: googlemaps<5,>=4.10.0; extra == 'web-tools'
|
|
298
310
|
Requires-Dist: html2text>=2024.2.26; extra == 'web-tools'
|
|
299
311
|
Requires-Dist: linkup-sdk<0.3,>=0.2.1; extra == 'web-tools'
|
|
@@ -725,6 +737,13 @@ For more information please contact camel-ai@eigent.ai
|
|
|
725
737
|
|
|
726
738
|
- **Ambassador Project:** Advocate for CAMEL-AI, host events, and contribute content. [Learn more](https://www.camel-ai.org/community)
|
|
727
739
|
|
|
740
|
+
- **WeChat Community:** Scan the QR code below to join our WeChat community.
|
|
741
|
+
|
|
742
|
+
<div align="center">
|
|
743
|
+
<img src="misc/wechat.jpg" alt="WeChat QR Code" width="200">
|
|
744
|
+
</div>
|
|
745
|
+
|
|
746
|
+
|
|
728
747
|
<br>
|
|
729
748
|
|
|
730
749
|
## Citation
|
|
@@ -416,6 +416,13 @@ For more information please contact camel-ai@eigent.ai
|
|
|
416
416
|
|
|
417
417
|
- **Ambassador Project:** Advocate for CAMEL-AI, host events, and contribute content. [Learn more](https://www.camel-ai.org/community)
|
|
418
418
|
|
|
419
|
+
- **WeChat Community:** Scan the QR code below to join our WeChat community.
|
|
420
|
+
|
|
421
|
+
<div align="center">
|
|
422
|
+
<img src="misc/wechat.jpg" alt="WeChat QR Code" width="200">
|
|
423
|
+
</div>
|
|
424
|
+
|
|
425
|
+
|
|
419
426
|
<br>
|
|
420
427
|
|
|
421
428
|
## Citation
|
|
@@ -327,7 +327,10 @@ class ChatAgent(BaseAgent):
|
|
|
327
327
|
return False
|
|
328
328
|
|
|
329
329
|
def update_memory(
|
|
330
|
-
self,
|
|
330
|
+
self,
|
|
331
|
+
message: BaseMessage,
|
|
332
|
+
role: OpenAIBackendRole,
|
|
333
|
+
timestamp: Optional[float] = None,
|
|
331
334
|
) -> None:
|
|
332
335
|
r"""Updates the agent memory with a new message.
|
|
333
336
|
|
|
@@ -335,12 +338,19 @@ class ChatAgent(BaseAgent):
|
|
|
335
338
|
message (BaseMessage): The new message to add to the stored
|
|
336
339
|
messages.
|
|
337
340
|
role (OpenAIBackendRole): The backend role type.
|
|
341
|
+
timestamp (Optional[float], optional): Custom timestamp for the
|
|
342
|
+
memory record. If None, current timestamp will be used.
|
|
343
|
+
(default: :obj:`None`)
|
|
338
344
|
"""
|
|
345
|
+
from datetime import timezone
|
|
346
|
+
|
|
339
347
|
self.memory.write_record(
|
|
340
348
|
MemoryRecord(
|
|
341
349
|
message=message,
|
|
342
350
|
role_at_backend=role,
|
|
343
|
-
timestamp=
|
|
351
|
+
timestamp=timestamp
|
|
352
|
+
if timestamp is not None
|
|
353
|
+
else datetime.now(timezone.utc).timestamp(),
|
|
344
354
|
agent_id=self.agent_id,
|
|
345
355
|
)
|
|
346
356
|
)
|
|
@@ -1331,8 +1341,18 @@ class ChatAgent(BaseAgent):
|
|
|
1331
1341
|
tool_call_id=tool_call_id,
|
|
1332
1342
|
)
|
|
1333
1343
|
|
|
1334
|
-
|
|
1335
|
-
|
|
1344
|
+
# Use slightly different timestamps to ensure correct ordering
|
|
1345
|
+
# This ensures the assistant message (tool call) always appears before
|
|
1346
|
+
# the function message (tool result) in the conversation context
|
|
1347
|
+
current_time = datetime.now().timestamp()
|
|
1348
|
+
self.update_memory(
|
|
1349
|
+
assist_msg, OpenAIBackendRole.ASSISTANT, timestamp=current_time
|
|
1350
|
+
)
|
|
1351
|
+
self.update_memory(
|
|
1352
|
+
func_msg,
|
|
1353
|
+
OpenAIBackendRole.FUNCTION,
|
|
1354
|
+
timestamp=current_time + 0.001,
|
|
1355
|
+
)
|
|
1336
1356
|
|
|
1337
1357
|
# Record information about this tool call
|
|
1338
1358
|
tool_record = ToolCallingRecord(
|
|
@@ -27,6 +27,7 @@ from .nvidia_config import NVIDIA_API_PARAMS, NvidiaConfig
|
|
|
27
27
|
from .ollama_config import OLLAMA_API_PARAMS, OllamaConfig
|
|
28
28
|
from .openai_config import OPENAI_API_PARAMS, ChatGPTConfig
|
|
29
29
|
from .openrouter_config import OPENROUTER_API_PARAMS, OpenRouterConfig
|
|
30
|
+
from .ppio_config import PPIO_API_PARAMS, PPIOConfig
|
|
30
31
|
from .qwen_config import QWEN_API_PARAMS, QwenConfig
|
|
31
32
|
from .reka_config import REKA_API_PARAMS, RekaConfig
|
|
32
33
|
from .samba_config import (
|
|
@@ -82,6 +83,8 @@ __all__ = [
|
|
|
82
83
|
'QWEN_API_PARAMS',
|
|
83
84
|
'DeepSeekConfig',
|
|
84
85
|
'DEEPSEEK_API_PARAMS',
|
|
86
|
+
'PPIOConfig',
|
|
87
|
+
'PPIO_API_PARAMS',
|
|
85
88
|
'InternLMConfig',
|
|
86
89
|
'INTERNLM_API_PARAMS',
|
|
87
90
|
'MoonshotConfig',
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
14
|
from __future__ import annotations
|
|
15
15
|
|
|
16
|
-
from typing import
|
|
16
|
+
from typing import List, Optional
|
|
17
17
|
|
|
18
18
|
from camel.configs.base_config import BaseConfig
|
|
19
19
|
|
|
@@ -23,6 +23,7 @@ class AnthropicConfig(BaseConfig):
|
|
|
23
23
|
Anthropic API.
|
|
24
24
|
|
|
25
25
|
See: https://docs.anthropic.com/en/api/messages
|
|
26
|
+
|
|
26
27
|
Args:
|
|
27
28
|
max_tokens (int, optional): The maximum number of tokens to
|
|
28
29
|
generate before stopping. Note that Anthropic models may stop
|
|
@@ -75,28 +76,5 @@ class AnthropicConfig(BaseConfig):
|
|
|
75
76
|
thinking: Optional[dict] = None
|
|
76
77
|
tool_choice: Optional[dict] = None
|
|
77
78
|
|
|
78
|
-
def as_dict(self) -> dict[str, Any]:
|
|
79
|
-
config_dict = super().as_dict()
|
|
80
|
-
# Create a list of keys to remove to avoid modifying dict
|
|
81
|
-
keys_to_remove = [
|
|
82
|
-
key for key, value in config_dict.items() if value is None
|
|
83
|
-
]
|
|
84
|
-
|
|
85
|
-
for key in keys_to_remove:
|
|
86
|
-
del config_dict[key]
|
|
87
|
-
|
|
88
|
-
# remove some keys if thinking is enabled
|
|
89
|
-
thinking_enabled = (
|
|
90
|
-
self.thinking is not None
|
|
91
|
-
and self.thinking.get("type") == "enabled"
|
|
92
|
-
)
|
|
93
|
-
if thinking_enabled:
|
|
94
|
-
# `top_p`, `top_k`, `temperature` must be unset when thinking is
|
|
95
|
-
# enabled.
|
|
96
|
-
config_dict.pop("top_k", None)
|
|
97
|
-
config_dict.pop("top_p", None)
|
|
98
|
-
config_dict.pop("temperature", None)
|
|
99
|
-
return config_dict
|
|
100
|
-
|
|
101
79
|
|
|
102
80
|
ANTHROPIC_API_PARAMS = {param for param in AnthropicConfig.model_fields.keys()}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 Dict, Optional, Sequence, Type, Union
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel
|
|
19
|
+
|
|
20
|
+
from camel.configs.base_config import BaseConfig
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class PPIOConfig(BaseConfig):
|
|
24
|
+
r"""Defines the parameters for generating chat completions using the
|
|
25
|
+
OpenAI API.
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
temperature (float, optional): Sampling temperature to use, between
|
|
29
|
+
:obj:`0` and :obj:`2`. Higher values make the output more random,
|
|
30
|
+
while lower values make it more focused and deterministic.
|
|
31
|
+
(default: :obj:`None`)
|
|
32
|
+
top_p (float, optional): An alternative to sampling with temperature,
|
|
33
|
+
called nucleus sampling, where the model considers the results of
|
|
34
|
+
the tokens with top_p probability mass. So :obj:`0.1` means only
|
|
35
|
+
the tokens comprising the top 10% probability mass are considered.
|
|
36
|
+
(default: :obj:`None`)
|
|
37
|
+
n (int, optional): How many chat completion choices to generate for
|
|
38
|
+
each input message. (default: :obj:`None`)
|
|
39
|
+
response_format (object, optional): An object specifying the format
|
|
40
|
+
that the model must output. Compatible with GPT-4 Turbo and all
|
|
41
|
+
GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106. Setting to
|
|
42
|
+
{"type": "json_object"} enables JSON mode, which guarantees the
|
|
43
|
+
message the model generates is valid JSON. Important: when using
|
|
44
|
+
JSON mode, you must also instruct the model to produce JSON
|
|
45
|
+
yourself via a system or user message. Without this, the model
|
|
46
|
+
may generate an unending stream of whitespace until the generation
|
|
47
|
+
reaches the token limit, resulting in a long-running and seemingly
|
|
48
|
+
"stuck" request. Also note that the message content may be
|
|
49
|
+
partially cut off if finish_reason="length", which indicates the
|
|
50
|
+
generation exceeded max_tokens or the conversation exceeded the
|
|
51
|
+
max context length.
|
|
52
|
+
stream (bool, optional): If True, partial message deltas will be sent
|
|
53
|
+
as data-only server-sent events as they become available.
|
|
54
|
+
(default: :obj:`None`)
|
|
55
|
+
stop (str or list, optional): Up to :obj:`4` sequences where the API
|
|
56
|
+
will stop generating further tokens. (default: :obj:`None`)
|
|
57
|
+
max_tokens (int, optional): The maximum number of tokens to generate
|
|
58
|
+
in the chat completion. The total length of input tokens and
|
|
59
|
+
generated tokens is limited by the model's context length.
|
|
60
|
+
(default: :obj:`None`)
|
|
61
|
+
presence_penalty (float, optional): Number between :obj:`-2.0` and
|
|
62
|
+
:obj:`2.0`. Positive values penalize new tokens based on whether
|
|
63
|
+
they appear in the text so far, increasing the model's likelihood
|
|
64
|
+
to talk about new topics. See more information about frequency and
|
|
65
|
+
presence penalties. (default: :obj:`None`)
|
|
66
|
+
frequency_penalty (float, optional): Number between :obj:`-2.0` and
|
|
67
|
+
:obj:`2.0`. Positive values penalize new tokens based on their
|
|
68
|
+
existing frequency in the text so far, decreasing the model's
|
|
69
|
+
likelihood to repeat the same line verbatim. See more information
|
|
70
|
+
about frequency and presence penalties. (default: :obj:`None`)
|
|
71
|
+
logit_bias (dict, optional): Modify the likelihood of specified tokens
|
|
72
|
+
appearing in the completion. Accepts a json object that maps tokens
|
|
73
|
+
(specified by their token ID in the tokenizer) to an associated
|
|
74
|
+
bias value from :obj:`-100` to :obj:`100`. Mathematically, the bias
|
|
75
|
+
is added to the logits generated by the model prior to sampling.
|
|
76
|
+
The exact effect will vary per model, but values between:obj:` -1`
|
|
77
|
+
and :obj:`1` should decrease or increase likelihood of selection;
|
|
78
|
+
values like :obj:`-100` or :obj:`100` should result in a ban or
|
|
79
|
+
exclusive selection of the relevant token. (default: :obj:`None`)
|
|
80
|
+
user (str, optional): A unique identifier representing your end-user,
|
|
81
|
+
which can help OpenAI to monitor and detect abuse.
|
|
82
|
+
(default: :obj:`None`)
|
|
83
|
+
tools (list[FunctionTool], optional): A list of tools the model may
|
|
84
|
+
call. Currently, only functions are supported as a tool. Use this
|
|
85
|
+
to provide a list of functions the model may generate JSON inputs
|
|
86
|
+
for. A max of 128 functions are supported.
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
temperature: Optional[float] = None
|
|
90
|
+
top_p: Optional[float] = None
|
|
91
|
+
n: Optional[int] = None
|
|
92
|
+
stream: Optional[bool] = None
|
|
93
|
+
stop: Optional[Union[str, Sequence[str]]] = None
|
|
94
|
+
max_tokens: Optional[int] = None
|
|
95
|
+
presence_penalty: Optional[float] = None
|
|
96
|
+
response_format: Optional[Union[Type[BaseModel], Dict]] = None
|
|
97
|
+
frequency_penalty: Optional[float] = None
|
|
98
|
+
logit_bias: Optional[Dict] = None
|
|
99
|
+
user: Optional[str] = None
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
PPIO_API_PARAMS = {param for param in PPIOConfig.model_fields.keys()}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
14
|
from __future__ import annotations
|
|
15
15
|
|
|
16
|
-
from typing import
|
|
16
|
+
from typing import Optional, Union
|
|
17
17
|
|
|
18
18
|
from camel.configs.base_config import BaseConfig
|
|
19
19
|
|
|
@@ -65,11 +65,5 @@ class RekaConfig(BaseConfig):
|
|
|
65
65
|
presence_penalty: Optional[float] = None
|
|
66
66
|
use_search_engine: Optional[bool] = None
|
|
67
67
|
|
|
68
|
-
def as_dict(self) -> dict[str, Any]:
|
|
69
|
-
config_dict = super().as_dict()
|
|
70
|
-
if "tools" in config_dict:
|
|
71
|
-
del config_dict["tools"] # Reka does not support tool calling
|
|
72
|
-
return config_dict
|
|
73
|
-
|
|
74
68
|
|
|
75
69
|
REKA_API_PARAMS = {param for param in RekaConfig().model_fields.keys()}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
14
|
from __future__ import annotations
|
|
15
15
|
|
|
16
|
-
from typing import
|
|
16
|
+
from typing import Optional, Sequence, Union
|
|
17
17
|
|
|
18
18
|
from pydantic import Field
|
|
19
19
|
|
|
@@ -63,12 +63,6 @@ class SambaVerseAPIConfig(BaseConfig):
|
|
|
63
63
|
stop: Optional[Union[str, list[str]]] = None
|
|
64
64
|
stream: Optional[bool] = None
|
|
65
65
|
|
|
66
|
-
def as_dict(self) -> dict[str, Any]:
|
|
67
|
-
config_dict = super().as_dict()
|
|
68
|
-
if "tools" in config_dict:
|
|
69
|
-
del config_dict["tools"] # SambaNova does not support tool calling
|
|
70
|
-
return config_dict
|
|
71
|
-
|
|
72
66
|
|
|
73
67
|
SAMBA_VERSE_API_PARAMS = {
|
|
74
68
|
param for param in SambaVerseAPIConfig().model_fields.keys()
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
14
|
from __future__ import annotations
|
|
15
15
|
|
|
16
|
-
from typing import
|
|
16
|
+
from typing import Optional, Sequence, Union
|
|
17
17
|
|
|
18
18
|
from pydantic import Field
|
|
19
19
|
|
|
@@ -94,12 +94,6 @@ class TogetherAIConfig(BaseConfig):
|
|
|
94
94
|
logit_bias: dict = Field(default_factory=dict)
|
|
95
95
|
user: Optional[str] = None
|
|
96
96
|
|
|
97
|
-
def as_dict(self) -> dict[str, Any]:
|
|
98
|
-
config_dict = super().as_dict()
|
|
99
|
-
if "tools" in config_dict:
|
|
100
|
-
del config_dict["tools"] # Currently does not support tool calling
|
|
101
|
-
return config_dict
|
|
102
|
-
|
|
103
97
|
|
|
104
98
|
TOGETHERAI_API_PARAMS = {
|
|
105
99
|
param for param in TogetherAIConfig.model_fields.keys()
|
|
@@ -11,20 +11,24 @@
|
|
|
11
11
|
# See the License for the specific language governing permissions and
|
|
12
12
|
# limitations under the License.
|
|
13
13
|
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
|
+
from .azure_embedding import AzureEmbedding
|
|
14
15
|
from .base import BaseEmbedding
|
|
15
16
|
from .jina_embedding import JinaEmbedding
|
|
16
17
|
from .mistral_embedding import MistralEmbedding
|
|
17
18
|
from .openai_compatible_embedding import OpenAICompatibleEmbedding
|
|
18
19
|
from .openai_embedding import OpenAIEmbedding
|
|
19
20
|
from .sentence_transformers_embeddings import SentenceTransformerEncoder
|
|
21
|
+
from .together_embedding import TogetherEmbedding
|
|
20
22
|
from .vlm_embedding import VisionLanguageEmbedding
|
|
21
23
|
|
|
22
24
|
__all__ = [
|
|
23
25
|
"BaseEmbedding",
|
|
24
26
|
"OpenAIEmbedding",
|
|
27
|
+
"AzureEmbedding",
|
|
25
28
|
"SentenceTransformerEncoder",
|
|
26
29
|
"VisionLanguageEmbedding",
|
|
27
30
|
"MistralEmbedding",
|
|
28
31
|
"OpenAICompatibleEmbedding",
|
|
29
32
|
"JinaEmbedding",
|
|
33
|
+
"TogetherEmbedding",
|
|
30
34
|
]
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import os
|
|
19
|
+
from typing import Any, Union
|
|
20
|
+
|
|
21
|
+
from openai import AzureOpenAI
|
|
22
|
+
|
|
23
|
+
from camel.embeddings.base import BaseEmbedding
|
|
24
|
+
from camel.types import EmbeddingModelType
|
|
25
|
+
from camel.utils import api_keys_required # Add this import
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class AzureEmbedding(BaseEmbedding[str]):
|
|
29
|
+
r"""Provides text embedding functionalities using Azure's OpenAI models.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
model_type (EmbeddingModelType, optional): The model type to be
|
|
33
|
+
used for text embeddings.
|
|
34
|
+
(default: :obj:`TEXT_EMBEDDING_3_SMALL`)
|
|
35
|
+
url (Optional[str], optional): The url to the Azure OpenAI service.
|
|
36
|
+
(default: :obj:`None`)
|
|
37
|
+
api_key (str, optional): The API key for authenticating with the
|
|
38
|
+
Azure OpenAI service. (default: :obj:`None`)
|
|
39
|
+
api_version (str, optional): The API version for Azure OpenAI service.
|
|
40
|
+
(default: :obj:`None`)
|
|
41
|
+
dimensions (Optional[int], optional): The text embedding output
|
|
42
|
+
dimensions. (default: :obj:`None`)
|
|
43
|
+
|
|
44
|
+
Raises:
|
|
45
|
+
RuntimeError: If an unsupported model type is specified.
|
|
46
|
+
ValueError: If required API configuration is missing.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
@api_keys_required(
|
|
50
|
+
[
|
|
51
|
+
("api_key", 'AZURE_OPENAI_API_KEY'),
|
|
52
|
+
("url", 'AZURE_OPENAI_BASE_URL'),
|
|
53
|
+
]
|
|
54
|
+
)
|
|
55
|
+
def __init__(
|
|
56
|
+
self,
|
|
57
|
+
model_type: EmbeddingModelType = (
|
|
58
|
+
EmbeddingModelType.TEXT_EMBEDDING_3_SMALL
|
|
59
|
+
),
|
|
60
|
+
url: Union[str, None] = None,
|
|
61
|
+
api_key: Union[str, None] = None,
|
|
62
|
+
api_version: Union[str, None] = None,
|
|
63
|
+
dimensions: Union[int, None] = None,
|
|
64
|
+
) -> None:
|
|
65
|
+
self.model_type = model_type
|
|
66
|
+
self.api_version = api_version or os.environ.get("AZURE_API_VERSION")
|
|
67
|
+
if dimensions is None:
|
|
68
|
+
self.output_dim = model_type.output_dim
|
|
69
|
+
else:
|
|
70
|
+
if not isinstance(dimensions, int):
|
|
71
|
+
raise ValueError("dimensions must be an integer")
|
|
72
|
+
self.output_dim = dimensions
|
|
73
|
+
|
|
74
|
+
self._api_key = api_key or os.environ.get("AZURE_OPENAI_API_KEY")
|
|
75
|
+
self._url = url or os.environ.get("AZURE_OPENAI_BASE_URL")
|
|
76
|
+
|
|
77
|
+
self.client = AzureOpenAI(
|
|
78
|
+
api_key=self._api_key,
|
|
79
|
+
api_version=self.api_version,
|
|
80
|
+
azure_endpoint=str(self._url),
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def embed_list(
|
|
84
|
+
self,
|
|
85
|
+
objs: list[str],
|
|
86
|
+
**kwargs: Any,
|
|
87
|
+
) -> list[list[float]]:
|
|
88
|
+
r"""Embeds a list of texts using the Azure OpenAI model.
|
|
89
|
+
|
|
90
|
+
Args:
|
|
91
|
+
objs (list[str]): The list of texts to embed.
|
|
92
|
+
**kwargs (Any): Additional keyword arguments to pass to the API.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
list[list[float]]: The embeddings for the input texts.
|
|
96
|
+
"""
|
|
97
|
+
if self.model_type == EmbeddingModelType.TEXT_EMBEDDING_ADA_2:
|
|
98
|
+
response = self.client.embeddings.create(
|
|
99
|
+
input=objs,
|
|
100
|
+
model=self.model_type.value,
|
|
101
|
+
**kwargs,
|
|
102
|
+
)
|
|
103
|
+
return [data.embedding for data in response.data]
|
|
104
|
+
|
|
105
|
+
response = self.client.embeddings.create(
|
|
106
|
+
input=objs,
|
|
107
|
+
model=self.model_type.value,
|
|
108
|
+
dimensions=self.output_dim,
|
|
109
|
+
**kwargs,
|
|
110
|
+
)
|
|
111
|
+
return [data.embedding for data in response.data]
|
|
112
|
+
|
|
113
|
+
def get_output_dim(self) -> int:
|
|
114
|
+
r"""Returns the output dimension of the embeddings.
|
|
115
|
+
|
|
116
|
+
Returns:
|
|
117
|
+
int: The dimensionality of the embedding for the current model.
|
|
118
|
+
"""
|
|
119
|
+
return self.output_dim
|