camel-ai 0.2.12__tar.gz → 0.2.13__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.12 → camel_ai-0.2.13}/PKG-INFO +13 -10
- {camel_ai-0.2.12 → camel_ai-0.2.13}/README.md +7 -5
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/__init__.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/chat_agent.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/openai_compatible_embedding.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/openai_embedding.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/base.py +5 -5
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/__init__.py +2 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/anthropic_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/azure_openai_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/deepseek_model.py +1 -1
- camel_ai-0.2.13/camel/models/fish_audio_model.py +146 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/gemini_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/groq_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/nemotron_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/nvidia_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/ollama_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/openai_compatible_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/openai_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/qwen_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/nemotron_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/samba_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/sglang_model.py +2 -2
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/togetherai_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/vllm_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/yi_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/zhipuai_model.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/configs.py +12 -12
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/docker_runtime.py +7 -7
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/llm_guard_runtime.py +3 -3
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/remote_http_runtime.py +5 -5
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/utils/function_risk_toolkit.py +1 -1
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/utils/ignore_risk_toolkit.py +2 -2
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/arxiv_toolkit.py +6 -6
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/ask_news_toolkit.py +2 -2
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/github_toolkit.py +3 -3
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/google_scholar_toolkit.py +16 -2
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/meshy_toolkit.py +2 -2
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/search_toolkit.py +2 -2
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/token_counting.py +9 -2
- {camel_ai-0.2.12 → camel_ai-0.2.13}/pyproject.toml +19 -16
- {camel_ai-0.2.12 → camel_ai-0.2.13}/LICENSE +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/critic_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/deductive_reasoner_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/embodied_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/knowledge_graph_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/role_assignment_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/search_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/task_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/tool_agents/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/tool_agents/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/benchmarks/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/benchmarks/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/benchmarks/gaia.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/discord_app.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/slack/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/slack/models.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/slack/slack_app.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/telegram_bot.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/anthropic_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/base_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/cohere_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/deepseek_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/gemini_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/groq_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/litellm_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/mistral_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/nvidia_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/ollama_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/openai_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/qwen_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/reka_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/samba_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/sglang_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/togetherai_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/vllm_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/yi_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/zhipuai_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/alpaca_collector.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/sharegpt_collector.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/huggingface.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/models.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/mistral_embedding.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/vlm_embedding.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/generators.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/human.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/docker_interpreter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/e2b_interpreter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/internal_python_interpreter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/interpreter_error.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/ipython_interpreter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/subprocess_interpreter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/apify_reader.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/base_io.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/chunkr_reader.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/firecrawl_reader.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/jina_url_reader.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/unstructured_io.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/logger.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/agent_memories.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/blocks/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/blocks/chat_history_block.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/blocks/vectordb_block.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/context_creators/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/context_creators/score_based.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/records.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/alpaca.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/conversation_models.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/function_call_formatter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/hermes/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/hermes/hermes_function_formatter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/func_message.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/base_model.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/cohere_model.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/litellm_model.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/mistral_model.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/model_factory.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/model_manager.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/openai_audio_models.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reka_model.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/base_reward_model.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/evaluator.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/stub_model.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/personas/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/personas/persona.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/personas/persona_hub.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/ai_society.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/code.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/evaluation.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/generate_text_embedding_data.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/image_craft.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/misalignment.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/multi_condition_image_craft.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/object_recognition.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/persona_hub.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/prompt_templates.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/role_description_prompt_template.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/solution_extraction.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/task_prompt_template.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/translation.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/video_description_prompt.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/responses/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/responses/agent_responses.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/auto_retriever.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/bm25_retriever.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/cohere_rerank_retriever.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/vector_retriever.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/api.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/utils/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/schemas/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/schemas/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/schemas/openai_converter.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/babyagi_playing.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/role_playing.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/prompts.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/role_playing_worker.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/single_agent_worker.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/task_channel.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/utils.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/worker.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/workforce.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/graph_element.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/nebula_graph.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/neo4j_graph.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/in_memory.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/json.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/redis.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/amazon_s3.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/azure_blob.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/google_cloud.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/milvus.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/qdrant.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/tasks/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/tasks/task.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/tasks/task_prompt.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/response_terminator.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/token_limit_terminator.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/base.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/code_execution.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/dalle_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/data_commons_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/function_tool.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/google_maps_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/human_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/linkedin_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/math_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/notion_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/security_config.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/reddit_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/retrieval_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/slack_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/stripe_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/twitter_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/video_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/weather_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/whatsapp_toolkit.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/enums.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/openai_types.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/unified_model_type.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/__init__.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/async_func.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/commons.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/constants.py +0 -0
- {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/response_format.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: camel-ai
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: Communicative Agents for AI Society Study
|
|
5
5
|
Home-page: https://www.camel-ai.org/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -53,6 +53,7 @@ Requires-Dist: e2b-code-interpreter (>=1.0.3,<2.0.0) ; extra == "tools" or extra
|
|
|
53
53
|
Requires-Dist: eval-type-backport (==0.2.0)
|
|
54
54
|
Requires-Dist: ffmpeg-python (>=0.2.0,<0.3.0) ; extra == "tools" or extra == "all"
|
|
55
55
|
Requires-Dist: firecrawl-py (>=1.0.0,<2.0.0) ; extra == "tools" or extra == "all"
|
|
56
|
+
Requires-Dist: fish-audio-sdk (>=2024.12.5,<2025.0.0) ; extra == "model-platforms" or extra == "all"
|
|
56
57
|
Requires-Dist: google-cloud-storage (>=2.18.0,<3.0.0) ; extra == "object-storages" or extra == "all"
|
|
57
58
|
Requires-Dist: google-generativeai (>=0.6.0,<0.7.0) ; extra == "model-platforms" or extra == "all"
|
|
58
59
|
Requires-Dist: googlemaps (>=4.10.0,<5.0.0) ; extra == "tools" or extra == "all"
|
|
@@ -67,7 +68,7 @@ Requires-Dist: mock (>=5,<6) ; extra == "test"
|
|
|
67
68
|
Requires-Dist: nebula3-python (==3.8.2) ; extra == "rag" or extra == "graph-storages" or extra == "all"
|
|
68
69
|
Requires-Dist: neo4j (>=5.18.0,<6.0.0) ; extra == "rag" or extra == "graph-storages" or extra == "all"
|
|
69
70
|
Requires-Dist: newspaper3k (>=0.2.8,<0.3.0) ; extra == "tools" or extra == "all"
|
|
70
|
-
Requires-Dist: nltk (==3.
|
|
71
|
+
Requires-Dist: nltk (==3.9.1) ; extra == "tools" or extra == "all"
|
|
71
72
|
Requires-Dist: notion-client (>=2.2.1,<3.0.0) ; extra == "tools" or extra == "all"
|
|
72
73
|
Requires-Dist: numpy (>=1,<2)
|
|
73
74
|
Requires-Dist: openai (>=1.45.0,<2.0.0)
|
|
@@ -76,7 +77,7 @@ Requires-Dist: opencv-python (>=4,<5) ; extra == "huggingface-agent" or extra ==
|
|
|
76
77
|
Requires-Dist: pandoc
|
|
77
78
|
Requires-Dist: pathlib (>=1.0.1,<2.0.0)
|
|
78
79
|
Requires-Dist: pdfplumber (>=0.11.0,<0.12.0) ; extra == "tools" or extra == "all"
|
|
79
|
-
Requires-Dist: pillow (>=
|
|
80
|
+
Requires-Dist: pillow (>=11.0.0,<12.0.0) ; extra == "tools" or extra == "all"
|
|
80
81
|
Requires-Dist: prance (>=23.6.21.0,<24.0.0.0) ; extra == "tools" or extra == "all"
|
|
81
82
|
Requires-Dist: praw (>=7.7.1,<8.0.0) ; extra == "tools" or extra == "all"
|
|
82
83
|
Requires-Dist: protobuf (>=4,<5)
|
|
@@ -103,12 +104,12 @@ Requires-Dist: slack-sdk (>=3.27.2,<4.0.0) ; extra == "tools" or extra == "all"
|
|
|
103
104
|
Requires-Dist: soundfile (>=0,<1) ; extra == "huggingface-agent" or extra == "all"
|
|
104
105
|
Requires-Dist: stripe (>=11.3.0,<12.0.0) ; extra == "tools" or extra == "all"
|
|
105
106
|
Requires-Dist: tavily-python (>=0.5.0,<0.6.0) ; extra == "search-tools" or extra == "all"
|
|
106
|
-
Requires-Dist: textblob (>=0.
|
|
107
|
+
Requires-Dist: textblob (>=0.17.1,<0.18.0) ; extra == "tools" or extra == "all"
|
|
107
108
|
Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
|
|
108
109
|
Requires-Dist: torch (==2.2.1) ; (platform_system == "Darwin" and platform_machine != "arm64") and (extra == "huggingface-agent" or extra == "all")
|
|
109
110
|
Requires-Dist: torch (>=2,<3) ; (platform_system != "Darwin" or platform_machine == "arm64") and (extra == "huggingface-agent" or extra == "all")
|
|
110
111
|
Requires-Dist: transformers (>=4,<5) ; extra == "huggingface-agent" or extra == "all"
|
|
111
|
-
Requires-Dist: unstructured[all-docs] (
|
|
112
|
+
Requires-Dist: unstructured[all-docs] (==0.16.11) ; extra == "rag" or extra == "all"
|
|
112
113
|
Requires-Dist: wikipedia (>=1,<2) ; extra == "search-tools" or extra == "tools" or extra == "all"
|
|
113
114
|
Requires-Dist: wolframalpha (>=5.0.0,<6.0.0) ; extra == "search-tools" or extra == "tools" or extra == "all"
|
|
114
115
|
Requires-Dist: yt-dlp (>=2024.11.4,<2025.0.0) ; extra == "tools" or extra == "all"
|
|
@@ -262,7 +263,7 @@ conda create --name camel python=3.10
|
|
|
262
263
|
conda activate camel
|
|
263
264
|
|
|
264
265
|
# Clone github repo
|
|
265
|
-
git clone -b v0.2.
|
|
266
|
+
git clone -b v0.2.13 https://github.com/camel-ai/camel.git
|
|
266
267
|
|
|
267
268
|
# Change directory into project directory
|
|
268
269
|
cd camel
|
|
@@ -441,6 +442,8 @@ Practical guides and tutorials for implementing specific functionalities in CAME
|
|
|
441
442
|
| **[3 Ways to Ingest Data from Websites with Firecrawl](https://docs.camel-ai.org/cookbooks/ingest_data_from_websites_with_Firecrawl.html)** | Explore three methods for extracting and processing data from websites using Firecrawl. |
|
|
442
443
|
| **[Data Deneration with CAMEL and Finetuning with Unsloth](https://docs.camel-ai.org/cookbooks/sft_data_generation_and_unsloth_finetuning.html)** | Learn how to generate data with CAMEL and fine-tune models effectively with Unsloth. |
|
|
443
444
|
| **[Customer Service Discord Bot with Agentic RAG](https://docs.camel-ai.org/cookbooks/customer_service_Discord_bot_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG. |
|
|
445
|
+
| **[Create AI Agents that work with your PDFs using Chunkr & Mistral AI](https://docs.camel-ai.org/cookbooks/agent_with_chunkr_for_pdf_parsing.html)** | Learn how to create AI agents that work with your PDFs using Chunkr and Mistral AI. |
|
|
446
|
+
| **[Data Gen with Real Function Calls and Hermes Format](https://docs.camel-ai.org/cookbooks/data_gen_with_real_function_calls_and_hermes_format.html)** | Explore how to generate data with real function calls and the Hermes format. |
|
|
444
447
|
|
|
445
448
|
## Utilize Various LLMs as Backends
|
|
446
449
|
|
|
@@ -480,10 +483,10 @@ We implemented amazing research ideas from other works for you to build, compare
|
|
|
480
483
|
We warmly invite you to use CAMEL for your impactful research.
|
|
481
484
|
|
|
482
485
|
## News
|
|
483
|
-
📢 Added
|
|
484
|
-
-
|
|
485
|
-
- Integrated
|
|
486
|
-
-
|
|
486
|
+
📢 Added support for Qwen models, Deepseek models to the 🐫 CAMEL framework!. (Nov 28, 2024)
|
|
487
|
+
- Integrate SGLang into the 🐫 CAMEL framework. (Dec, 13, 2024)
|
|
488
|
+
- Integrated Reward Model into the 🐫 CAMEL framework. (Dec, 13, 2024)
|
|
489
|
+
- Added GAIA Benchmark! (Dec, 09, 2024)
|
|
487
490
|
- ...
|
|
488
491
|
- Released AI Society and Code dataset (April 2, 2023)
|
|
489
492
|
- Initial release of `CAMEL` python library (March 21, 2023)
|
|
@@ -144,7 +144,7 @@ conda create --name camel python=3.10
|
|
|
144
144
|
conda activate camel
|
|
145
145
|
|
|
146
146
|
# Clone github repo
|
|
147
|
-
git clone -b v0.2.
|
|
147
|
+
git clone -b v0.2.13 https://github.com/camel-ai/camel.git
|
|
148
148
|
|
|
149
149
|
# Change directory into project directory
|
|
150
150
|
cd camel
|
|
@@ -323,6 +323,8 @@ Practical guides and tutorials for implementing specific functionalities in CAME
|
|
|
323
323
|
| **[3 Ways to Ingest Data from Websites with Firecrawl](https://docs.camel-ai.org/cookbooks/ingest_data_from_websites_with_Firecrawl.html)** | Explore three methods for extracting and processing data from websites using Firecrawl. |
|
|
324
324
|
| **[Data Deneration with CAMEL and Finetuning with Unsloth](https://docs.camel-ai.org/cookbooks/sft_data_generation_and_unsloth_finetuning.html)** | Learn how to generate data with CAMEL and fine-tune models effectively with Unsloth. |
|
|
325
325
|
| **[Customer Service Discord Bot with Agentic RAG](https://docs.camel-ai.org/cookbooks/customer_service_Discord_bot_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG. |
|
|
326
|
+
| **[Create AI Agents that work with your PDFs using Chunkr & Mistral AI](https://docs.camel-ai.org/cookbooks/agent_with_chunkr_for_pdf_parsing.html)** | Learn how to create AI agents that work with your PDFs using Chunkr and Mistral AI. |
|
|
327
|
+
| **[Data Gen with Real Function Calls and Hermes Format](https://docs.camel-ai.org/cookbooks/data_gen_with_real_function_calls_and_hermes_format.html)** | Explore how to generate data with real function calls and the Hermes format. |
|
|
326
328
|
|
|
327
329
|
## Utilize Various LLMs as Backends
|
|
328
330
|
|
|
@@ -362,10 +364,10 @@ We implemented amazing research ideas from other works for you to build, compare
|
|
|
362
364
|
We warmly invite you to use CAMEL for your impactful research.
|
|
363
365
|
|
|
364
366
|
## News
|
|
365
|
-
📢 Added
|
|
366
|
-
-
|
|
367
|
-
- Integrated
|
|
368
|
-
-
|
|
367
|
+
📢 Added support for Qwen models, Deepseek models to the 🐫 CAMEL framework!. (Nov 28, 2024)
|
|
368
|
+
- Integrate SGLang into the 🐫 CAMEL framework. (Dec, 13, 2024)
|
|
369
|
+
- Integrated Reward Model into the 🐫 CAMEL framework. (Dec, 13, 2024)
|
|
370
|
+
- Added GAIA Benchmark! (Dec, 09, 2024)
|
|
369
371
|
- ...
|
|
370
372
|
- Released AI Society and Code dataset (April 2, 2023)
|
|
371
373
|
- Initial release of `CAMEL` python library (March 21, 2023)
|
|
@@ -1042,7 +1042,7 @@ class ChatAgent(BaseAgent):
|
|
|
1042
1042
|
num_tokens (int): The number of tokens used in this step.
|
|
1043
1043
|
external_tool_request (Optional[ChatCompletionMessageToolCall]):
|
|
1044
1044
|
Any external tool request made during this step.
|
|
1045
|
-
(default
|
|
1045
|
+
(default: :obj:`None`)
|
|
1046
1046
|
|
|
1047
1047
|
Returns:
|
|
1048
1048
|
Dict[str, Any]: A dictionary containing information about the chat
|
|
@@ -56,7 +56,7 @@ class OpenAIEmbedding(BaseEmbedding[str]):
|
|
|
56
56
|
assert isinstance(dimensions, int)
|
|
57
57
|
self.output_dim = dimensions
|
|
58
58
|
self._api_key = api_key or os.environ.get("OPENAI_API_KEY")
|
|
59
|
-
self.client = OpenAI(timeout=
|
|
59
|
+
self.client = OpenAI(timeout=180, max_retries=3, api_key=self._api_key)
|
|
60
60
|
|
|
61
61
|
@api_keys_required("OPENAI_API_KEY")
|
|
62
62
|
def embed_list(
|
|
@@ -52,15 +52,15 @@ class BaseMessage:
|
|
|
52
52
|
for the message.
|
|
53
53
|
content (str): The content of the message.
|
|
54
54
|
video_bytes (Optional[bytes]): Optional bytes of a video associated
|
|
55
|
-
with the message. (default
|
|
55
|
+
with the message. (default: :obj:`None`)
|
|
56
56
|
image_list (Optional[List[Image.Image]]): Optional list of PIL Image
|
|
57
|
-
objects associated with the message. (default
|
|
57
|
+
objects associated with the message. (default: :obj:`None`)
|
|
58
58
|
image_detail (Literal["auto", "low", "high"]): Detail level of the
|
|
59
|
-
images associated with the message. (default
|
|
59
|
+
images associated with the message. (default: :obj:`auto`)
|
|
60
60
|
video_detail (Literal["auto", "low", "high"]): Detail level of the
|
|
61
|
-
videos associated with the message. (default
|
|
61
|
+
videos associated with the message. (default: :obj:`low`)
|
|
62
62
|
parsed: Optional[Union[Type[BaseModel], dict]]: Optional object which
|
|
63
|
-
is parsed from the content. (default
|
|
63
|
+
is parsed from the content. (default: :obj:`None`)
|
|
64
64
|
"""
|
|
65
65
|
|
|
66
66
|
role_name: str
|
|
@@ -16,6 +16,7 @@ from .azure_openai_model import AzureOpenAIModel
|
|
|
16
16
|
from .base_model import BaseModelBackend
|
|
17
17
|
from .cohere_model import CohereModel
|
|
18
18
|
from .deepseek_model import DeepSeekModel
|
|
19
|
+
from .fish_audio_model import FishAudioModel
|
|
19
20
|
from .gemini_model import GeminiModel
|
|
20
21
|
from .groq_model import GroqModel
|
|
21
22
|
from .litellm_model import LiteLLMModel
|
|
@@ -66,4 +67,5 @@ __all__ = [
|
|
|
66
67
|
'QwenModel',
|
|
67
68
|
'ModelProcessingError',
|
|
68
69
|
'DeepSeekModel',
|
|
70
|
+
'FishAudioModel',
|
|
69
71
|
]
|
|
@@ -35,7 +35,7 @@ class AnthropicModel(BaseModelBackend):
|
|
|
35
35
|
model_config_dict (Optional[Dict[str, Any]], optional): A dictionary
|
|
36
36
|
that will be fed into Anthropic.messages.create(). If
|
|
37
37
|
:obj:`None`, :obj:`AnthropicConfig().as_dict()` will be used.
|
|
38
|
-
(default
|
|
38
|
+
(default: :obj:`None`)
|
|
39
39
|
api_key (Optional[str], optional): The API key for authenticating with
|
|
40
40
|
the Anthropic service. (default: :obj:`None`)
|
|
41
41
|
url (Optional[str], optional): The url to the Anthropic service.
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
import os
|
|
16
|
+
from typing import Any, Optional
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class FishAudioModel:
|
|
20
|
+
r"""Provides access to FishAudio's Text-to-Speech (TTS) and Speech_to_Text
|
|
21
|
+
(STT) models.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
def __init__(
|
|
25
|
+
self,
|
|
26
|
+
api_key: Optional[str] = None,
|
|
27
|
+
url: Optional[str] = None,
|
|
28
|
+
) -> None:
|
|
29
|
+
r"""Initialize an instance of FishAudioModel.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
api_key (Optional[str]): API key for FishAudio service. If not
|
|
33
|
+
provided, the environment variable `FISHAUDIO_API_KEY` will be
|
|
34
|
+
used.
|
|
35
|
+
url (Optional[str]): Base URL for FishAudio API. If not provided,
|
|
36
|
+
the environment variable `FISHAUDIO_API_BASE_URL` will be used.
|
|
37
|
+
"""
|
|
38
|
+
from fish_audio_sdk import Session
|
|
39
|
+
|
|
40
|
+
self._api_key = api_key or os.environ.get("FISHAUDIO_API_KEY")
|
|
41
|
+
self._url = url or os.environ.get(
|
|
42
|
+
"FISHAUDIO_API_BASE_URL", "https://api.fish.audio"
|
|
43
|
+
)
|
|
44
|
+
self.session = Session(apikey=self._api_key, base_url=self._url)
|
|
45
|
+
|
|
46
|
+
def text_to_speech(
|
|
47
|
+
self,
|
|
48
|
+
input: str,
|
|
49
|
+
storage_path: str,
|
|
50
|
+
reference_id: Optional[str] = None,
|
|
51
|
+
reference_audio: Optional[str] = None,
|
|
52
|
+
reference_audio_text: Optional[str] = None,
|
|
53
|
+
**kwargs: Any,
|
|
54
|
+
) -> Any:
|
|
55
|
+
r"""Convert text to speech and save the output to a file.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
input_text (str): The text to convert to speech.
|
|
59
|
+
storage_path (str): The file path where the resulting speech will
|
|
60
|
+
be saved.
|
|
61
|
+
reference_id (Optional[str]): An optional reference ID to
|
|
62
|
+
associate with the request. (default: :obj:`None`)
|
|
63
|
+
reference_audio (Optional[str]): Path to an audio file for
|
|
64
|
+
reference speech. (default: :obj:`None`)
|
|
65
|
+
reference_audio_text (Optional[str]): Text for the reference audio.
|
|
66
|
+
(default: :obj:`None`)
|
|
67
|
+
**kwargs (Any): Additional parameters to pass to the TTS request.
|
|
68
|
+
|
|
69
|
+
Raises:
|
|
70
|
+
FileNotFoundError: If the reference audio file cannot be found.
|
|
71
|
+
"""
|
|
72
|
+
from fish_audio_sdk import ReferenceAudio, TTSRequest
|
|
73
|
+
|
|
74
|
+
directory = os.path.dirname(storage_path)
|
|
75
|
+
if directory and not os.path.exists(directory):
|
|
76
|
+
os.makedirs(directory)
|
|
77
|
+
|
|
78
|
+
if not reference_audio:
|
|
79
|
+
with open(f"{storage_path}", "wb") as f:
|
|
80
|
+
for chunk in self.session.tts(
|
|
81
|
+
TTSRequest(reference_id=reference_id, text=input, **kwargs)
|
|
82
|
+
):
|
|
83
|
+
f.write(chunk)
|
|
84
|
+
else:
|
|
85
|
+
if not os.path.exists(reference_audio):
|
|
86
|
+
raise FileNotFoundError(
|
|
87
|
+
f"Reference audio file not found: {reference_audio}"
|
|
88
|
+
)
|
|
89
|
+
if not reference_audio_text:
|
|
90
|
+
raise ValueError("reference_audio_text should be provided")
|
|
91
|
+
with open(f"{reference_audio}", "rb") as audio_file:
|
|
92
|
+
with open(f"{storage_path}", "wb") as f:
|
|
93
|
+
for chunk in self.session.tts(
|
|
94
|
+
TTSRequest(
|
|
95
|
+
text=input,
|
|
96
|
+
references=[
|
|
97
|
+
ReferenceAudio(
|
|
98
|
+
audio=audio_file.read(),
|
|
99
|
+
text=reference_audio_text,
|
|
100
|
+
)
|
|
101
|
+
],
|
|
102
|
+
**kwargs,
|
|
103
|
+
)
|
|
104
|
+
):
|
|
105
|
+
f.write(chunk)
|
|
106
|
+
|
|
107
|
+
def speech_to_text(
|
|
108
|
+
self,
|
|
109
|
+
audio_file_path: str,
|
|
110
|
+
language: Optional[str] = None,
|
|
111
|
+
ignore_timestamps: Optional[bool] = None,
|
|
112
|
+
**kwargs: Any,
|
|
113
|
+
) -> str:
|
|
114
|
+
r"""Convert speech to text from an audio file.
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
audio_file_path (str): The path to the audio file to transcribe.
|
|
118
|
+
language (Optional[str]): The language of the audio. (default:
|
|
119
|
+
:obj:`None`)
|
|
120
|
+
ignore_timestamps (Optional[bool]): Whether to ignore timestamps.
|
|
121
|
+
(default: :obj:`None`)
|
|
122
|
+
**kwargs (Any): Additional parameters to pass to the STT request.
|
|
123
|
+
|
|
124
|
+
Returns:
|
|
125
|
+
str: The transcribed text from the audio.
|
|
126
|
+
|
|
127
|
+
Raises:
|
|
128
|
+
FileNotFoundError: If the audio file cannot be found.
|
|
129
|
+
"""
|
|
130
|
+
from fish_audio_sdk import ASRRequest
|
|
131
|
+
|
|
132
|
+
if not os.path.exists(audio_file_path):
|
|
133
|
+
raise FileNotFoundError(f"Audio file not found: {audio_file_path}")
|
|
134
|
+
|
|
135
|
+
with open(f"{audio_file_path}", "rb") as audio_file:
|
|
136
|
+
audio_data = audio_file.read()
|
|
137
|
+
|
|
138
|
+
response = self.session.asr(
|
|
139
|
+
ASRRequest(
|
|
140
|
+
audio=audio_data,
|
|
141
|
+
language=language,
|
|
142
|
+
ignore_timestamps=ignore_timestamps,
|
|
143
|
+
**kwargs,
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
return response.text
|
|
@@ -52,7 +52,7 @@ class NemotronModel(BaseModelBackend):
|
|
|
52
52
|
api_key = api_key or os.environ.get("NVIDIA_API_KEY")
|
|
53
53
|
super().__init__(model_type, {}, api_key, url)
|
|
54
54
|
self._client = OpenAI(
|
|
55
|
-
timeout=
|
|
55
|
+
timeout=180,
|
|
56
56
|
max_retries=3,
|
|
57
57
|
base_url=self._url,
|
|
58
58
|
api_key=self._api_key,
|
|
@@ -47,7 +47,7 @@ class NemotronRewardModel(BaseRewardModel):
|
|
|
47
47
|
api_key = api_key or os.environ.get("NVIDIA_API_KEY")
|
|
48
48
|
super().__init__(model_type, api_key, url)
|
|
49
49
|
self._client = OpenAI(
|
|
50
|
-
timeout=
|
|
50
|
+
timeout=180,
|
|
51
51
|
max_retries=3,
|
|
52
52
|
base_url=self.url,
|
|
53
53
|
api_key=self.api_key,
|
|
@@ -80,7 +80,7 @@ class SGLangModel(BaseModelBackend):
|
|
|
80
80
|
if self._url:
|
|
81
81
|
# Initialize the client if an existing URL is provided
|
|
82
82
|
self._client = OpenAI(
|
|
83
|
-
timeout=
|
|
83
|
+
timeout=180,
|
|
84
84
|
max_retries=3,
|
|
85
85
|
api_key="Set-but-ignored", # required but ignored
|
|
86
86
|
base_url=self._url,
|
|
@@ -113,7 +113,7 @@ class SGLangModel(BaseModelBackend):
|
|
|
113
113
|
self.last_run_time = time.time()
|
|
114
114
|
# Initialize the client after the server starts
|
|
115
115
|
self._client = OpenAI(
|
|
116
|
-
timeout=
|
|
116
|
+
timeout=180,
|
|
117
117
|
max_retries=3,
|
|
118
118
|
api_key="Set-but-ignored", # required but ignored
|
|
119
119
|
base_url=self._url,
|
|
@@ -21,23 +21,23 @@ class TaskConfig(BaseModel):
|
|
|
21
21
|
|
|
22
22
|
Arttributes:
|
|
23
23
|
cmd (str or list): Command to be executed
|
|
24
|
-
stdout (bool): Attach to stdout. (default
|
|
25
|
-
stderr (bool): Attach to stderr. (default
|
|
26
|
-
stdin (bool): Attach to stdin. (default
|
|
27
|
-
tty (bool): Allocate a pseudo-TTY. (default
|
|
28
|
-
privileged (bool): Run as privileged. (default
|
|
29
|
-
user (str): User to execute command as. (default
|
|
24
|
+
stdout (bool): Attach to stdout. (default: :obj: `True`)
|
|
25
|
+
stderr (bool): Attach to stderr. (default: :obj: `True`)
|
|
26
|
+
stdin (bool): Attach to stdin. (default: :obj: `False`)
|
|
27
|
+
tty (bool): Allocate a pseudo-TTY. (default: :obj: `False`)
|
|
28
|
+
privileged (bool): Run as privileged. (default: :obj: `False`)
|
|
29
|
+
user (str): User to execute command as. (default: :obj: `""`)
|
|
30
30
|
detach (bool): If true, detach from the exec command.
|
|
31
|
-
(default
|
|
32
|
-
stream (bool): Stream response data. (default
|
|
31
|
+
(default: :obj: `False`)
|
|
32
|
+
stream (bool): Stream response data. (default: :obj: `False`)
|
|
33
33
|
socket (bool): Return the connection socket to allow custom
|
|
34
|
-
read/write operations. (default
|
|
34
|
+
read/write operations. (default: :obj: `False`)
|
|
35
35
|
environment (dict or list): A dictionary or a list of strings in
|
|
36
36
|
the following format ``["PASSWORD=xxx"]`` or
|
|
37
|
-
``{"PASSWORD": "xxx"}``. (default
|
|
37
|
+
``{"PASSWORD": "xxx"}``. (default: :obj: `None`)
|
|
38
38
|
workdir (str): Path to working directory for this exec session.
|
|
39
|
-
(default
|
|
40
|
-
demux (bool): Return stdout and stderr separately. (default
|
|
39
|
+
(default: :obj: `None`)
|
|
40
|
+
demux (bool): Return stdout and stderr separately. (default: :obj:
|
|
41
41
|
`False`)
|
|
42
42
|
"""
|
|
43
43
|
|
|
@@ -42,10 +42,10 @@ class DockerRuntime(BaseRuntime):
|
|
|
42
42
|
|
|
43
43
|
Args:
|
|
44
44
|
image (str): The name of the Docker image to use for the runtime.
|
|
45
|
-
port (int): The port number to use for the runtime API. (default
|
|
45
|
+
port (int): The port number to use for the runtime API. (default: :obj:
|
|
46
46
|
`8000`)
|
|
47
47
|
remove (bool): Whether to remove the container after stopping it. '
|
|
48
|
-
(default
|
|
48
|
+
(default: :obj: `True`)
|
|
49
49
|
kwargs (dict): Additional keyword arguments to pass to the
|
|
50
50
|
Docker client.
|
|
51
51
|
"""
|
|
@@ -170,7 +170,7 @@ class DockerRuntime(BaseRuntime):
|
|
|
170
170
|
|
|
171
171
|
Args:
|
|
172
172
|
time_out (int): The number of seconds to wait for the container to
|
|
173
|
-
start. (default
|
|
173
|
+
start. (default: :obj: `15`)
|
|
174
174
|
|
|
175
175
|
Returns:
|
|
176
176
|
DockerRuntime: The DockerRuntime instance.
|
|
@@ -259,9 +259,9 @@ class DockerRuntime(BaseRuntime):
|
|
|
259
259
|
list of functions to add.
|
|
260
260
|
entrypoint (str): The entrypoint for the function.
|
|
261
261
|
redirect_stdout (bool): Whether to return the stdout of
|
|
262
|
-
the function. (default
|
|
262
|
+
the function. (default: :obj: `False`)
|
|
263
263
|
arguments (Optional[Dict[str, Any]]): The arguments for the
|
|
264
|
-
function. (default
|
|
264
|
+
function. (default: :obj: `None`)
|
|
265
265
|
|
|
266
266
|
Returns:
|
|
267
267
|
DockerRuntime: The DockerRuntime instance.
|
|
@@ -330,7 +330,7 @@ class DockerRuntime(BaseRuntime):
|
|
|
330
330
|
|
|
331
331
|
Args:
|
|
332
332
|
remove (Optional[bool]): Whether to remove the container
|
|
333
|
-
after stopping it. (default
|
|
333
|
+
after stopping it. (default: :obj: `None`)
|
|
334
334
|
|
|
335
335
|
Returns:
|
|
336
336
|
DockerRuntime: The DockerRuntime instance.
|
|
@@ -366,7 +366,7 @@ class DockerRuntime(BaseRuntime):
|
|
|
366
366
|
r"""Wait for the API Server to be ready.
|
|
367
367
|
|
|
368
368
|
Args:
|
|
369
|
-
timeout (int): The number of seconds to wait. (default
|
|
369
|
+
timeout (int): The number of seconds to wait. (default: :obj: `10`)
|
|
370
370
|
|
|
371
371
|
Returns:
|
|
372
372
|
bool: Whether the API Server is ready.
|
|
@@ -68,9 +68,9 @@ class LLMGuardRuntime(BaseRuntime):
|
|
|
68
68
|
Arguments:
|
|
69
69
|
prompt (str): The prompt to use for the language model. (default:
|
|
70
70
|
:obj:`GUARDPROMPT`)
|
|
71
|
-
model (BaseModelBackend): The language model to use. (default
|
|
71
|
+
model (BaseModelBackend): The language model to use. (default: :obj:
|
|
72
72
|
`None`)
|
|
73
|
-
verbose (bool): Whether to print verbose output. (default
|
|
73
|
+
verbose (bool): Whether to print verbose output. (default: :obj:
|
|
74
74
|
`False`)
|
|
75
75
|
"""
|
|
76
76
|
|
|
@@ -114,7 +114,7 @@ class LLMGuardRuntime(BaseRuntime):
|
|
|
114
114
|
funcs (FunctionTool or List[FunctionTool]): The function or
|
|
115
115
|
list of functions to add.
|
|
116
116
|
threshold (int): The risk threshold for functions.
|
|
117
|
-
(default
|
|
117
|
+
(default: :obj:`2`)
|
|
118
118
|
|
|
119
119
|
Returns:
|
|
120
120
|
LLMGuardRuntime: The current runtime.
|