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.

Files changed (272) hide show
  1. {camel_ai-0.2.12 → camel_ai-0.2.13}/PKG-INFO +13 -10
  2. {camel_ai-0.2.12 → camel_ai-0.2.13}/README.md +7 -5
  3. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/__init__.py +1 -1
  4. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/chat_agent.py +1 -1
  5. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/openai_compatible_embedding.py +1 -1
  6. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/openai_embedding.py +1 -1
  7. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/base.py +5 -5
  8. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/__init__.py +2 -0
  9. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/anthropic_model.py +1 -1
  10. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/azure_openai_model.py +1 -1
  11. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/deepseek_model.py +1 -1
  12. camel_ai-0.2.13/camel/models/fish_audio_model.py +146 -0
  13. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/gemini_model.py +1 -1
  14. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/groq_model.py +1 -1
  15. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/nemotron_model.py +1 -1
  16. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/nvidia_model.py +1 -1
  17. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/ollama_model.py +1 -1
  18. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/openai_compatible_model.py +1 -1
  19. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/openai_model.py +1 -1
  20. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/qwen_model.py +1 -1
  21. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/nemotron_model.py +1 -1
  22. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/samba_model.py +1 -1
  23. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/sglang_model.py +2 -2
  24. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/togetherai_model.py +1 -1
  25. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/vllm_model.py +1 -1
  26. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/yi_model.py +1 -1
  27. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/zhipuai_model.py +1 -1
  28. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/configs.py +12 -12
  29. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/docker_runtime.py +7 -7
  30. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/llm_guard_runtime.py +3 -3
  31. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/remote_http_runtime.py +5 -5
  32. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/utils/function_risk_toolkit.py +1 -1
  33. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/utils/ignore_risk_toolkit.py +2 -2
  34. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/arxiv_toolkit.py +6 -6
  35. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/ask_news_toolkit.py +2 -2
  36. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/github_toolkit.py +3 -3
  37. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/google_scholar_toolkit.py +16 -2
  38. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/meshy_toolkit.py +2 -2
  39. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/search_toolkit.py +2 -2
  40. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/token_counting.py +9 -2
  41. {camel_ai-0.2.12 → camel_ai-0.2.13}/pyproject.toml +19 -16
  42. {camel_ai-0.2.12 → camel_ai-0.2.13}/LICENSE +0 -0
  43. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/__init__.py +0 -0
  44. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/base.py +0 -0
  45. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/critic_agent.py +0 -0
  46. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/deductive_reasoner_agent.py +0 -0
  47. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/embodied_agent.py +0 -0
  48. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/knowledge_graph_agent.py +0 -0
  49. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/role_assignment_agent.py +0 -0
  50. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/search_agent.py +0 -0
  51. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/task_agent.py +0 -0
  52. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/tool_agents/__init__.py +0 -0
  53. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/tool_agents/base.py +0 -0
  54. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
  55. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/benchmarks/__init__.py +0 -0
  56. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/benchmarks/base.py +0 -0
  57. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/benchmarks/gaia.py +0 -0
  58. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/__init__.py +0 -0
  59. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/discord_app.py +0 -0
  60. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/slack/__init__.py +0 -0
  61. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/slack/models.py +0 -0
  62. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/slack/slack_app.py +0 -0
  63. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/bots/telegram_bot.py +0 -0
  64. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/__init__.py +0 -0
  65. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/anthropic_config.py +0 -0
  66. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/base_config.py +0 -0
  67. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/cohere_config.py +0 -0
  68. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/deepseek_config.py +0 -0
  69. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/gemini_config.py +0 -0
  70. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/groq_config.py +0 -0
  71. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/litellm_config.py +0 -0
  72. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/mistral_config.py +0 -0
  73. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/nvidia_config.py +0 -0
  74. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/ollama_config.py +0 -0
  75. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/openai_config.py +0 -0
  76. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/qwen_config.py +0 -0
  77. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/reka_config.py +0 -0
  78. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/samba_config.py +0 -0
  79. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/sglang_config.py +0 -0
  80. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/togetherai_config.py +0 -0
  81. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/vllm_config.py +0 -0
  82. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/yi_config.py +0 -0
  83. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/configs/zhipuai_config.py +0 -0
  84. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/__init__.py +0 -0
  85. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/alpaca_collector.py +0 -0
  86. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/base.py +0 -0
  87. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/data_collector/sharegpt_collector.py +0 -0
  88. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/__init__.py +0 -0
  89. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/base.py +0 -0
  90. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/huggingface.py +0 -0
  91. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/datahubs/models.py +0 -0
  92. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/__init__.py +0 -0
  93. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/base.py +0 -0
  94. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/mistral_embedding.py +0 -0
  95. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
  96. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/embeddings/vlm_embedding.py +0 -0
  97. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/generators.py +0 -0
  98. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/human.py +0 -0
  99. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/__init__.py +0 -0
  100. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/base.py +0 -0
  101. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/docker_interpreter.py +0 -0
  102. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/e2b_interpreter.py +0 -0
  103. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/internal_python_interpreter.py +0 -0
  104. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/interpreter_error.py +0 -0
  105. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/ipython_interpreter.py +0 -0
  106. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/interpreters/subprocess_interpreter.py +0 -0
  107. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/__init__.py +0 -0
  108. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/apify_reader.py +0 -0
  109. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/base_io.py +0 -0
  110. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/chunkr_reader.py +0 -0
  111. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/firecrawl_reader.py +0 -0
  112. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/jina_url_reader.py +0 -0
  113. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/loaders/unstructured_io.py +0 -0
  114. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/logger.py +0 -0
  115. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/__init__.py +0 -0
  116. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/agent_memories.py +0 -0
  117. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/base.py +0 -0
  118. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/blocks/__init__.py +0 -0
  119. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/blocks/chat_history_block.py +0 -0
  120. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/blocks/vectordb_block.py +0 -0
  121. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/context_creators/__init__.py +0 -0
  122. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/context_creators/score_based.py +0 -0
  123. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/memories/records.py +0 -0
  124. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/__init__.py +0 -0
  125. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/__init__.py +0 -0
  126. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/alpaca.py +0 -0
  127. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/conversation_models.py +0 -0
  128. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/__init__.py +0 -0
  129. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/function_call_formatter.py +0 -0
  130. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/hermes/__init__.py +0 -0
  131. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/conversion/sharegpt/hermes/hermes_function_formatter.py +0 -0
  132. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/messages/func_message.py +0 -0
  133. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/base_model.py +0 -0
  134. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/cohere_model.py +0 -0
  135. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/litellm_model.py +0 -0
  136. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/mistral_model.py +0 -0
  137. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/model_factory.py +0 -0
  138. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/model_manager.py +0 -0
  139. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/openai_audio_models.py +0 -0
  140. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reka_model.py +0 -0
  141. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/__init__.py +0 -0
  142. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/base_reward_model.py +0 -0
  143. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/reward/evaluator.py +0 -0
  144. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/models/stub_model.py +0 -0
  145. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/personas/__init__.py +0 -0
  146. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/personas/persona.py +0 -0
  147. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/personas/persona_hub.py +0 -0
  148. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/__init__.py +0 -0
  149. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/ai_society.py +0 -0
  150. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/base.py +0 -0
  151. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/code.py +0 -0
  152. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/evaluation.py +0 -0
  153. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/generate_text_embedding_data.py +0 -0
  154. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/image_craft.py +0 -0
  155. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/misalignment.py +0 -0
  156. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/multi_condition_image_craft.py +0 -0
  157. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/object_recognition.py +0 -0
  158. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/persona_hub.py +0 -0
  159. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/prompt_templates.py +0 -0
  160. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/role_description_prompt_template.py +0 -0
  161. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/solution_extraction.py +0 -0
  162. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/task_prompt_template.py +0 -0
  163. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/translation.py +0 -0
  164. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/prompts/video_description_prompt.py +0 -0
  165. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/responses/__init__.py +0 -0
  166. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/responses/agent_responses.py +0 -0
  167. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/__init__.py +0 -0
  168. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/auto_retriever.py +0 -0
  169. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/base.py +0 -0
  170. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/bm25_retriever.py +0 -0
  171. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/cohere_rerank_retriever.py +0 -0
  172. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/retrievers/vector_retriever.py +0 -0
  173. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/__init__.py +0 -0
  174. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/api.py +0 -0
  175. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/base.py +0 -0
  176. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/runtime/utils/__init__.py +0 -0
  177. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/schemas/__init__.py +0 -0
  178. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/schemas/base.py +0 -0
  179. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/schemas/openai_converter.py +0 -0
  180. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/__init__.py +0 -0
  181. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/babyagi_playing.py +0 -0
  182. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/role_playing.py +0 -0
  183. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/__init__.py +0 -0
  184. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/base.py +0 -0
  185. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/prompts.py +0 -0
  186. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/role_playing_worker.py +0 -0
  187. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/single_agent_worker.py +0 -0
  188. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/task_channel.py +0 -0
  189. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/utils.py +0 -0
  190. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/worker.py +0 -0
  191. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/societies/workforce/workforce.py +0 -0
  192. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/__init__.py +0 -0
  193. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/__init__.py +0 -0
  194. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/base.py +0 -0
  195. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/graph_element.py +0 -0
  196. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/nebula_graph.py +0 -0
  197. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/graph_storages/neo4j_graph.py +0 -0
  198. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/__init__.py +0 -0
  199. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/base.py +0 -0
  200. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/in_memory.py +0 -0
  201. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/json.py +0 -0
  202. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/key_value_storages/redis.py +0 -0
  203. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/__init__.py +0 -0
  204. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/amazon_s3.py +0 -0
  205. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/azure_blob.py +0 -0
  206. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/base.py +0 -0
  207. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/object_storages/google_cloud.py +0 -0
  208. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/__init__.py +0 -0
  209. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/base.py +0 -0
  210. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/milvus.py +0 -0
  211. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/storages/vectordb_storages/qdrant.py +0 -0
  212. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/tasks/__init__.py +0 -0
  213. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/tasks/task.py +0 -0
  214. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/tasks/task_prompt.py +0 -0
  215. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/__init__.py +0 -0
  216. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/base.py +0 -0
  217. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/response_terminator.py +0 -0
  218. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/terminators/token_limit_terminator.py +0 -0
  219. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/__init__.py +0 -0
  220. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/base.py +0 -0
  221. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/code_execution.py +0 -0
  222. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/dalle_toolkit.py +0 -0
  223. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/data_commons_toolkit.py +0 -0
  224. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/function_tool.py +0 -0
  225. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/google_maps_toolkit.py +0 -0
  226. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/human_toolkit.py +0 -0
  227. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/linkedin_toolkit.py +0 -0
  228. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/math_toolkit.py +0 -0
  229. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/notion_toolkit.py +0 -0
  230. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
  231. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
  232. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
  233. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
  234. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
  235. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
  236. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
  237. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
  238. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
  239. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
  240. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
  241. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
  242. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
  243. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
  244. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
  245. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
  246. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
  247. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/security_config.py +0 -0
  248. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
  249. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
  250. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
  251. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
  252. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
  253. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
  254. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
  255. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/open_api_toolkit.py +0 -0
  256. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/reddit_toolkit.py +0 -0
  257. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/retrieval_toolkit.py +0 -0
  258. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/slack_toolkit.py +0 -0
  259. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/stripe_toolkit.py +0 -0
  260. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/twitter_toolkit.py +0 -0
  261. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/video_toolkit.py +0 -0
  262. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/weather_toolkit.py +0 -0
  263. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/toolkits/whatsapp_toolkit.py +0 -0
  264. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/__init__.py +0 -0
  265. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/enums.py +0 -0
  266. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/openai_types.py +0 -0
  267. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/types/unified_model_type.py +0 -0
  268. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/__init__.py +0 -0
  269. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/async_func.py +0 -0
  270. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/commons.py +0 -0
  271. {camel_ai-0.2.12 → camel_ai-0.2.13}/camel/utils/constants.py +0 -0
  272. {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.12
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.8.1) ; extra == "tools" or extra == "all"
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 (>=10.2.0,<11.0.0) ; extra == "tools" or extra == "all"
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.18.0.post0,<0.19.0) ; extra == "tools" or extra == "all"
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] (>=0.14,<0.15) ; extra == "rag" or extra == "tools" or extra == "all"
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.12 https://github.com/camel-ai/camel.git
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 the Workforce module to the 🐫 CAMEL framework! For more details, see the [post](https://x.com/CamelAIOrg/status/1851682063830720912). (Oct 31, 2024)
484
- - Added subprocess support for Ollama and vLLM models. (Oct, 29, 2024)
485
- - Integrated Firecrawl's Map into the 🐫 CAMEL framework. (Oct, 22, 2024)
486
- - Integrated Nvidia's Llama-3.1-Nemotron-70b-Instruct! (Oct, 17, 2024)
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.12 https://github.com/camel-ai/camel.git
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 the Workforce module to the 🐫 CAMEL framework! For more details, see the [post](https://x.com/CamelAIOrg/status/1851682063830720912). (Oct 31, 2024)
366
- - Added subprocess support for Ollama and vLLM models. (Oct, 29, 2024)
367
- - Integrated Firecrawl's Map into the 🐫 CAMEL framework. (Oct, 22, 2024)
368
- - Integrated Nvidia's Llama-3.1-Nemotron-70b-Instruct! (Oct, 17, 2024)
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)
@@ -14,7 +14,7 @@
14
14
 
15
15
  from camel.logger import disable_logging, enable_logging, set_log_level
16
16
 
17
- __version__ = '0.2.12'
17
+ __version__ = '0.2.13'
18
18
 
19
19
  __all__ = [
20
20
  '__version__',
@@ -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::obj:`None`)
1045
+ (default: :obj:`None`)
1046
1046
 
1047
1047
  Returns:
1048
1048
  Dict[str, Any]: A dictionary containing information about the chat
@@ -46,7 +46,7 @@ class OpenAICompatibleEmbedding(BaseEmbedding[str]):
46
46
  )
47
47
  self._url = url or os.environ.get("OPENAI_COMPATIBILIY_API_BASE_URL")
48
48
  self._client = OpenAI(
49
- timeout=60,
49
+ timeout=180,
50
50
  max_retries=3,
51
51
  api_key=self._api_key,
52
52
  base_url=self._url,
@@ -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=60, max_retries=3, api_key=self._api_key)
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::obj:`None`)
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::obj:`None`)
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::obj:`auto`)
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::obj:`low`)
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::obj:`None`)
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::obj:`None`)
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.
@@ -91,7 +91,7 @@ class AzureOpenAIModel(BaseModelBackend):
91
91
  azure_deployment=self.azure_deployment_name,
92
92
  api_version=self.api_version,
93
93
  api_key=self._api_key,
94
- timeout=60,
94
+ timeout=180,
95
95
  max_retries=3,
96
96
  )
97
97
 
@@ -70,7 +70,7 @@ class DeepSeekModel(BaseModelBackend):
70
70
  )
71
71
 
72
72
  self._client = OpenAI(
73
- timeout=60,
73
+ timeout=180,
74
74
  max_retries=3,
75
75
  api_key=self._api_key,
76
76
  base_url=self._url,
@@ -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
@@ -71,7 +71,7 @@ class GeminiModel(BaseModelBackend):
71
71
  model_type, model_config_dict, api_key, url, token_counter
72
72
  )
73
73
  self._client = OpenAI(
74
- timeout=60,
74
+ timeout=180,
75
75
  max_retries=3,
76
76
  api_key=self._api_key,
77
77
  base_url=self._url,
@@ -69,7 +69,7 @@ class GroqModel(BaseModelBackend):
69
69
  model_type, model_config_dict, api_key, url, token_counter
70
70
  )
71
71
  self._client = OpenAI(
72
- timeout=60,
72
+ timeout=180,
73
73
  max_retries=3,
74
74
  api_key=self._api_key,
75
75
  base_url=self._url,
@@ -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=60,
55
+ timeout=180,
56
56
  max_retries=3,
57
57
  base_url=self._url,
58
58
  api_key=self._api_key,
@@ -66,7 +66,7 @@ class NvidiaModel(BaseModelBackend):
66
66
  model_type, model_config_dict, api_key, url, token_counter
67
67
  )
68
68
  self._client = OpenAI(
69
- timeout=60,
69
+ timeout=180,
70
70
  max_retries=3,
71
71
  api_key=self._api_key,
72
72
  base_url=self._url,
@@ -70,7 +70,7 @@ class OllamaModel(BaseModelBackend):
70
70
  self._start_server()
71
71
  # Use OpenAI client as interface call Ollama
72
72
  self._client = OpenAI(
73
- timeout=60,
73
+ timeout=180,
74
74
  max_retries=3,
75
75
  api_key="Set-but-ignored", # required but ignored
76
76
  base_url=self._url,
@@ -61,7 +61,7 @@ class OpenAICompatibleModel(BaseModelBackend):
61
61
  model_type, model_config_dict, api_key, url, token_counter
62
62
  )
63
63
  self._client = OpenAI(
64
- timeout=60,
64
+ timeout=180,
65
65
  max_retries=3,
66
66
  api_key=self._api_key,
67
67
  base_url=self._url,
@@ -67,7 +67,7 @@ class OpenAIModel(BaseModelBackend):
67
67
  model_type, model_config_dict, api_key, url, token_counter
68
68
  )
69
69
  self._client = OpenAI(
70
- timeout=60,
70
+ timeout=180,
71
71
  max_retries=3,
72
72
  base_url=self._url,
73
73
  api_key=self._api_key,
@@ -71,7 +71,7 @@ class QwenModel(BaseModelBackend):
71
71
  model_type, model_config_dict, api_key, url, token_counter
72
72
  )
73
73
  self._client = OpenAI(
74
- timeout=60,
74
+ timeout=180,
75
75
  max_retries=3,
76
76
  api_key=self._api_key,
77
77
  base_url=self._url,
@@ -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=60,
50
+ timeout=180,
51
51
  max_retries=3,
52
52
  base_url=self.url,
53
53
  api_key=self.api_key,
@@ -95,7 +95,7 @@ class SambaModel(BaseModelBackend):
95
95
 
96
96
  if self._url == "https://api.sambanova.ai/v1":
97
97
  self._client = OpenAI(
98
- timeout=60,
98
+ timeout=180,
99
99
  max_retries=3,
100
100
  base_url=self._url,
101
101
  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=60,
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=60,
116
+ timeout=180,
117
117
  max_retries=3,
118
118
  api_key="Set-but-ignored", # required but ignored
119
119
  base_url=self._url,
@@ -72,7 +72,7 @@ class TogetherAIModel(BaseModelBackend):
72
72
  )
73
73
 
74
74
  self._client = OpenAI(
75
- timeout=60,
75
+ timeout=180,
76
76
  max_retries=3,
77
77
  api_key=self._api_key,
78
78
  base_url=self._url,
@@ -72,7 +72,7 @@ class VLLMModel(BaseModelBackend):
72
72
  self._start_server()
73
73
  # Use OpenAI cilent as interface call vLLM
74
74
  self._client = OpenAI(
75
- timeout=60,
75
+ timeout=180,
76
76
  max_retries=3,
77
77
  api_key="EMPTY", # required but ignored
78
78
  base_url=self._url,
@@ -70,7 +70,7 @@ class YiModel(BaseModelBackend):
70
70
  model_type, model_config_dict, api_key, url, token_counter
71
71
  )
72
72
  self._client = OpenAI(
73
- timeout=60,
73
+ timeout=180,
74
74
  max_retries=3,
75
75
  api_key=self._api_key,
76
76
  base_url=self._url,
@@ -70,7 +70,7 @@ class ZhipuAIModel(BaseModelBackend):
70
70
  model_type, model_config_dict, api_key, url, token_counter
71
71
  )
72
72
  self._client = OpenAI(
73
- timeout=60,
73
+ timeout=180,
74
74
  max_retries=3,
75
75
  api_key=self._api_key,
76
76
  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::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: `""`)
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::obj: `False`)
32
- stream (bool): Stream response data. (default::obj: `False`)
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::obj: `False`)
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::obj: `None`)
37
+ ``{"PASSWORD": "xxx"}``. (default: :obj: `None`)
38
38
  workdir (str): Path to working directory for this exec session.
39
- (default::obj: `None`)
40
- demux (bool): Return stdout and stderr separately. (default::obj:
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::obj:
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::obj: `True`)
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::obj: `15`)
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::obj: `False`)
262
+ the function. (default: :obj: `False`)
263
263
  arguments (Optional[Dict[str, Any]]): The arguments for the
264
- function. (default::obj: `None`)
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::obj: `None`)
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::obj: `10`)
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::obj:
71
+ model (BaseModelBackend): The language model to use. (default: :obj:
72
72
  `None`)
73
- verbose (bool): Whether to print verbose output. (default::obj:
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::obj:`2`)
117
+ (default: :obj:`2`)
118
118
 
119
119
  Returns:
120
120
  LLMGuardRuntime: The current runtime.