camel-ai 0.2.18__tar.gz → 0.2.20__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 (312) hide show
  1. {camel_ai-0.2.18 → camel_ai-0.2.20}/PKG-INFO +17 -12
  2. {camel_ai-0.2.18 → camel_ai-0.2.20}/README.md +7 -1
  3. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/__init__.py +1 -1
  4. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/chat_agent.py +29 -30
  5. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/knowledge_graph_agent.py +1 -5
  6. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/multi_hop_generator_agent.py +35 -3
  7. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/programmed_agent_instruction.py +73 -18
  8. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/benchmarks/apibench.py +1 -5
  9. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/benchmarks/nexus.py +1 -5
  10. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/benchmarks/ragbench.py +2 -2
  11. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/telegram_bot.py +1 -5
  12. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/__init__.py +9 -0
  13. camel_ai-0.2.20/camel/configs/aiml_config.py +80 -0
  14. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/gemini_config.py +1 -1
  15. camel_ai-0.2.20/camel/configs/moonshot_config.py +63 -0
  16. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/sglang_config.py +4 -0
  17. camel_ai-0.2.20/camel/configs/siliconflow_config.py +91 -0
  18. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/__init__.py +3 -1
  19. camel_ai-0.2.20/camel/datagen/self_improving_cot.py +821 -0
  20. camel_ai-0.2.20/camel/datagen/source2synth/__init__.py +31 -0
  21. {camel_ai-0.2.18/camel/synthetic_datagen → camel_ai-0.2.20/camel/datagen}/source2synth/data_processor.py +194 -29
  22. {camel_ai-0.2.18/camel/synthetic_datagen → camel_ai-0.2.20/camel/datagen}/source2synth/models.py +25 -0
  23. {camel_ai-0.2.18/camel/synthetic_datagen → camel_ai-0.2.20/camel/datagen}/source2synth/user_data_processor_config.py +9 -8
  24. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datahubs/huggingface.py +3 -3
  25. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/embeddings/__init__.py +2 -0
  26. camel_ai-0.2.20/camel/embeddings/jina_embedding.py +161 -0
  27. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/func_message.py +1 -1
  28. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/__init__.py +4 -0
  29. camel_ai-0.2.20/camel/models/aiml_model.py +147 -0
  30. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/deepseek_model.py +29 -11
  31. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/groq_model.py +0 -2
  32. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/model_factory.py +9 -0
  33. camel_ai-0.2.20/camel/models/moonshot_model.py +138 -0
  34. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/openai_model.py +1 -9
  35. camel_ai-0.2.20/camel/models/siliconflow_model.py +142 -0
  36. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/role_playing_worker.py +2 -4
  37. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/single_agent_worker.py +1 -6
  38. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/workforce.py +3 -9
  39. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/__init__.py +4 -0
  40. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/reddit_toolkit.py +8 -38
  41. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/search_toolkit.py +17 -6
  42. camel_ai-0.2.20/camel/toolkits/semantic_scholar_toolkit.py +308 -0
  43. camel_ai-0.2.20/camel/toolkits/sympy_toolkit.py +778 -0
  44. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/whatsapp_toolkit.py +11 -32
  45. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/types/enums.py +205 -16
  46. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/types/unified_model_type.py +5 -0
  47. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/utils/__init__.py +7 -2
  48. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/utils/commons.py +198 -21
  49. camel_ai-0.2.20/camel/utils/deduplication.py +199 -0
  50. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/utils/token_counting.py +1 -39
  51. {camel_ai-0.2.18 → camel_ai-0.2.20}/pyproject.toml +15 -15
  52. {camel_ai-0.2.18 → camel_ai-0.2.20}/LICENSE +0 -0
  53. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/__init__.py +0 -0
  54. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/base.py +0 -0
  55. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/critic_agent.py +0 -0
  56. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/deductive_reasoner_agent.py +0 -0
  57. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/embodied_agent.py +0 -0
  58. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/role_assignment_agent.py +0 -0
  59. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/search_agent.py +0 -0
  60. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/task_agent.py +0 -0
  61. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/tool_agents/__init__.py +0 -0
  62. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/tool_agents/base.py +0 -0
  63. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
  64. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/benchmarks/__init__.py +0 -0
  65. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/benchmarks/apibank.py +0 -0
  66. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/benchmarks/base.py +0 -0
  67. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/benchmarks/gaia.py +0 -0
  68. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/__init__.py +0 -0
  69. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/discord/__init__.py +0 -0
  70. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/discord/discord_app.py +0 -0
  71. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/discord/discord_installation.py +0 -0
  72. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/discord/discord_store.py +0 -0
  73. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/slack/__init__.py +0 -0
  74. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/slack/models.py +0 -0
  75. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/bots/slack/slack_app.py +0 -0
  76. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/anthropic_config.py +0 -0
  77. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/base_config.py +0 -0
  78. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/cohere_config.py +0 -0
  79. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/deepseek_config.py +0 -0
  80. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/groq_config.py +0 -0
  81. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/internlm_config.py +0 -0
  82. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/litellm_config.py +0 -0
  83. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/mistral_config.py +0 -0
  84. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/nvidia_config.py +0 -0
  85. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/ollama_config.py +0 -0
  86. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/openai_config.py +0 -0
  87. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/qwen_config.py +0 -0
  88. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/reka_config.py +0 -0
  89. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/samba_config.py +0 -0
  90. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/togetherai_config.py +0 -0
  91. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/vllm_config.py +0 -0
  92. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/yi_config.py +0 -0
  93. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/configs/zhipuai_config.py +0 -0
  94. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/data_collector/__init__.py +0 -0
  95. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/data_collector/alpaca_collector.py +0 -0
  96. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/data_collector/base.py +0 -0
  97. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/data_collector/sharegpt_collector.py +0 -0
  98. /camel_ai-0.2.18/camel/datagen/cotdatagen.py → /camel_ai-0.2.20/camel/datagen/cot_datagen.py +0 -0
  99. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/self_instruct/__init__.py +0 -0
  100. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/self_instruct/filter/__init__.py +0 -0
  101. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/self_instruct/filter/filter_function.py +0 -0
  102. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/self_instruct/filter/filter_registry.py +0 -0
  103. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/self_instruct/filter/instruction_filter.py +0 -0
  104. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/self_instruct/self_instruct.py +0 -0
  105. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datagen/self_instruct/templates.py +0 -0
  106. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datahubs/__init__.py +0 -0
  107. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datahubs/base.py +0 -0
  108. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/datahubs/models.py +0 -0
  109. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/embeddings/base.py +0 -0
  110. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/embeddings/mistral_embedding.py +0 -0
  111. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/embeddings/openai_compatible_embedding.py +0 -0
  112. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/embeddings/openai_embedding.py +0 -0
  113. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
  114. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/embeddings/vlm_embedding.py +0 -0
  115. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/generators.py +0 -0
  116. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/human.py +0 -0
  117. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/__init__.py +0 -0
  118. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/base.py +0 -0
  119. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/docker_interpreter.py +0 -0
  120. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/e2b_interpreter.py +0 -0
  121. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/internal_python_interpreter.py +0 -0
  122. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/interpreter_error.py +0 -0
  123. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/ipython_interpreter.py +0 -0
  124. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/interpreters/subprocess_interpreter.py +0 -0
  125. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/__init__.py +0 -0
  126. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/apify_reader.py +0 -0
  127. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/base_io.py +0 -0
  128. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/chunkr_reader.py +0 -0
  129. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/firecrawl_reader.py +0 -0
  130. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/jina_url_reader.py +0 -0
  131. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/panda_reader.py +0 -0
  132. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/loaders/unstructured_io.py +0 -0
  133. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/logger.py +0 -0
  134. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/__init__.py +0 -0
  135. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/agent_memories.py +0 -0
  136. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/base.py +0 -0
  137. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/blocks/__init__.py +0 -0
  138. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/blocks/chat_history_block.py +0 -0
  139. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/blocks/vectordb_block.py +0 -0
  140. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/context_creators/__init__.py +0 -0
  141. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/context_creators/score_based.py +0 -0
  142. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/memories/records.py +0 -0
  143. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/__init__.py +0 -0
  144. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/base.py +0 -0
  145. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/conversion/__init__.py +0 -0
  146. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/conversion/alpaca.py +0 -0
  147. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/conversion/conversation_models.py +0 -0
  148. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/conversion/sharegpt/__init__.py +0 -0
  149. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/conversion/sharegpt/function_call_formatter.py +0 -0
  150. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/conversion/sharegpt/hermes/__init__.py +0 -0
  151. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/messages/conversion/sharegpt/hermes/hermes_function_formatter.py +0 -0
  152. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/anthropic_model.py +0 -0
  153. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/azure_openai_model.py +0 -0
  154. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/base_model.py +0 -0
  155. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/cohere_model.py +0 -0
  156. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/fish_audio_model.py +0 -0
  157. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/gemini_model.py +0 -0
  158. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/internlm_model.py +0 -0
  159. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/litellm_model.py +0 -0
  160. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/mistral_model.py +0 -0
  161. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/model_manager.py +0 -0
  162. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/nemotron_model.py +0 -0
  163. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/nvidia_model.py +0 -0
  164. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/ollama_model.py +0 -0
  165. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/openai_audio_models.py +0 -0
  166. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/openai_compatible_model.py +0 -0
  167. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/qwen_model.py +0 -0
  168. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/reka_model.py +0 -0
  169. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/reward/__init__.py +0 -0
  170. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/reward/base_reward_model.py +0 -0
  171. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/reward/evaluator.py +0 -0
  172. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/reward/nemotron_model.py +0 -0
  173. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/reward/skywork_model.py +0 -0
  174. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/samba_model.py +0 -0
  175. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/sglang_model.py +0 -0
  176. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/stub_model.py +0 -0
  177. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/togetherai_model.py +0 -0
  178. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/vllm_model.py +0 -0
  179. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/yi_model.py +0 -0
  180. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/models/zhipuai_model.py +0 -0
  181. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/personas/__init__.py +0 -0
  182. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/personas/persona.py +0 -0
  183. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/personas/persona_hub.py +0 -0
  184. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/__init__.py +0 -0
  185. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/ai_society.py +0 -0
  186. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/base.py +0 -0
  187. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/code.py +0 -0
  188. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/evaluation.py +0 -0
  189. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/generate_text_embedding_data.py +0 -0
  190. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/image_craft.py +0 -0
  191. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/misalignment.py +0 -0
  192. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/multi_condition_image_craft.py +0 -0
  193. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/object_recognition.py +0 -0
  194. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/persona_hub.py +0 -0
  195. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/prompt_templates.py +0 -0
  196. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/role_description_prompt_template.py +0 -0
  197. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/solution_extraction.py +0 -0
  198. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/task_prompt_template.py +0 -0
  199. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/translation.py +0 -0
  200. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/prompts/video_description_prompt.py +0 -0
  201. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/responses/__init__.py +0 -0
  202. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/responses/agent_responses.py +0 -0
  203. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/retrievers/__init__.py +0 -0
  204. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/retrievers/auto_retriever.py +0 -0
  205. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/retrievers/base.py +0 -0
  206. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/retrievers/bm25_retriever.py +0 -0
  207. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/retrievers/cohere_rerank_retriever.py +0 -0
  208. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/retrievers/vector_retriever.py +0 -0
  209. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/__init__.py +0 -0
  210. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/api.py +0 -0
  211. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/base.py +0 -0
  212. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/configs.py +0 -0
  213. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/docker_runtime.py +0 -0
  214. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/llm_guard_runtime.py +0 -0
  215. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/remote_http_runtime.py +0 -0
  216. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/utils/__init__.py +0 -0
  217. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/utils/function_risk_toolkit.py +0 -0
  218. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/runtime/utils/ignore_risk_toolkit.py +0 -0
  219. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/schemas/__init__.py +0 -0
  220. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/schemas/base.py +0 -0
  221. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/schemas/openai_converter.py +0 -0
  222. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/schemas/outlines_converter.py +0 -0
  223. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/__init__.py +0 -0
  224. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/babyagi_playing.py +0 -0
  225. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/role_playing.py +0 -0
  226. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/__init__.py +0 -0
  227. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/base.py +0 -0
  228. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/prompts.py +0 -0
  229. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/task_channel.py +0 -0
  230. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/utils.py +0 -0
  231. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/societies/workforce/worker.py +0 -0
  232. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/__init__.py +0 -0
  233. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/graph_storages/__init__.py +0 -0
  234. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/graph_storages/base.py +0 -0
  235. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/graph_storages/graph_element.py +0 -0
  236. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/graph_storages/nebula_graph.py +0 -0
  237. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/graph_storages/neo4j_graph.py +0 -0
  238. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/key_value_storages/__init__.py +0 -0
  239. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/key_value_storages/base.py +0 -0
  240. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/key_value_storages/in_memory.py +0 -0
  241. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/key_value_storages/json.py +0 -0
  242. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/key_value_storages/redis.py +0 -0
  243. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/object_storages/__init__.py +0 -0
  244. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/object_storages/amazon_s3.py +0 -0
  245. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/object_storages/azure_blob.py +0 -0
  246. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/object_storages/base.py +0 -0
  247. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/object_storages/google_cloud.py +0 -0
  248. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/vectordb_storages/__init__.py +0 -0
  249. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/vectordb_storages/base.py +0 -0
  250. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/vectordb_storages/milvus.py +0 -0
  251. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/storages/vectordb_storages/qdrant.py +0 -0
  252. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/tasks/__init__.py +0 -0
  253. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/tasks/task.py +0 -0
  254. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/tasks/task_prompt.py +0 -0
  255. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/terminators/__init__.py +0 -0
  256. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/terminators/base.py +0 -0
  257. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/terminators/response_terminator.py +0 -0
  258. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/terminators/token_limit_terminator.py +0 -0
  259. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/arxiv_toolkit.py +0 -0
  260. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/ask_news_toolkit.py +0 -0
  261. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/base.py +0 -0
  262. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/code_execution.py +0 -0
  263. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/dalle_toolkit.py +0 -0
  264. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/dappier_toolkit.py +0 -0
  265. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/data_commons_toolkit.py +0 -0
  266. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/function_tool.py +0 -0
  267. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/github_toolkit.py +0 -0
  268. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/google_maps_toolkit.py +0 -0
  269. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/google_scholar_toolkit.py +0 -0
  270. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/human_toolkit.py +0 -0
  271. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/linkedin_toolkit.py +0 -0
  272. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/math_toolkit.py +0 -0
  273. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/meshy_toolkit.py +0 -0
  274. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/notion_toolkit.py +0 -0
  275. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
  276. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
  277. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
  278. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
  279. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
  280. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
  281. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
  282. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
  283. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
  284. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
  285. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
  286. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
  287. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
  288. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
  289. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
  290. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
  291. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
  292. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/security_config.py +0 -0
  293. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
  294. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
  295. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
  296. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
  297. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
  298. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
  299. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
  300. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/open_api_toolkit.py +0 -0
  301. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/openbb_toolkit.py +0 -0
  302. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/retrieval_toolkit.py +0 -0
  303. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/slack_toolkit.py +0 -0
  304. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/stripe_toolkit.py +0 -0
  305. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/twitter_toolkit.py +0 -0
  306. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/video_toolkit.py +0 -0
  307. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/toolkits/weather_toolkit.py +0 -0
  308. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/types/__init__.py +0 -0
  309. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/types/openai_types.py +0 -0
  310. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/utils/async_func.py +0 -0
  311. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/utils/constants.py +0 -0
  312. {camel_ai-0.2.18 → camel_ai-0.2.20}/camel/utils/response_format.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: camel-ai
3
- Version: 0.2.18
3
+ Version: 0.2.20
4
4
  Summary: Communicative Agents for AI Society Study
5
5
  License: Apache-2.0
6
6
  Keywords: communicative-ai,ai-societies,artificial-intelligence,deep-learning,multi-agent-systems,cooperative-ai,natural-language-processing,large-language-models
@@ -37,7 +37,7 @@ Requires-Dist: azure-storage-blob (>=12.21.0,<13.0.0) ; extra == "storage" or ex
37
37
  Requires-Dist: beautifulsoup4 (>=4,<5) ; extra == "document-tools" or extra == "all"
38
38
  Requires-Dist: botocore (>=1.35.3,<2.0.0) ; extra == "storage" or extra == "all"
39
39
  Requires-Dist: cohere (>=5.11.0,<6.0.0) ; extra == "rag" or extra == "model-platforms" or extra == "all"
40
- Requires-Dist: colorama (>=0,<1)
40
+ Requires-Dist: colorama (>=0.4.6,<0.5.0)
41
41
  Requires-Dist: curl_cffi (==0.6.2)
42
42
  Requires-Dist: dappier (>=0.3.3,<0.4.0) ; extra == "web-tools" or extra == "all"
43
43
  Requires-Dist: datacommons (>=1.4.3,<2.0.0) ; extra == "data-tools" or extra == "all"
@@ -55,7 +55,6 @@ Requires-Dist: ffmpeg-python (>=0.2.0,<0.3.0) ; extra == "media-tools" or extra
55
55
  Requires-Dist: firecrawl-py (>=1.0.0,<2.0.0) ; extra == "web-tools" or extra == "all"
56
56
  Requires-Dist: fish-audio-sdk (>=2024.12.5,<2025.0.0) ; extra == "model-platforms" or extra == "all"
57
57
  Requires-Dist: google-cloud-storage (>=2.18.0,<3.0.0) ; extra == "storage" or extra == "all"
58
- Requires-Dist: google-generativeai (>=0.6.0,<0.7.0) ; extra == "model-platforms" or extra == "all"
59
58
  Requires-Dist: googlemaps (>=4.10.0,<5.0.0) ; extra == "web-tools" or extra == "all"
60
59
  Requires-Dist: httpx (>=0.23.0,<0.27.3)
61
60
  Requires-Dist: imageio[pyav] (>=2.34.2,<3.0.0) ; extra == "media-tools" or extra == "all"
@@ -70,21 +69,21 @@ Requires-Dist: nebula3-python (==3.8.2) ; extra == "rag" or extra == "storage" o
70
69
  Requires-Dist: neo4j (>=5.18.0,<6.0.0) ; extra == "rag" or extra == "storage" or extra == "all"
71
70
  Requires-Dist: newspaper3k (>=0.2.8,<0.3.0) ; extra == "web-tools" or extra == "all"
72
71
  Requires-Dist: notion-client (>=2.2.1,<3.0.0) ; extra == "communication-tools" or extra == "all"
73
- Requires-Dist: numpy (>=1,<2)
74
- Requires-Dist: openai (>=1.58.1,<2.0.0)
72
+ Requires-Dist: numpy (>=1.26,<2.0)
73
+ Requires-Dist: openai (>=1.59.7,<2.0.0)
75
74
  Requires-Dist: openapi-spec-validator (>=0.7.1,<0.8.0) ; extra == "document-tools" or extra == "all"
76
75
  Requires-Dist: openbb (>=4.3.5,<5.0.0) ; extra == "data-tools" or extra == "all"
77
76
  Requires-Dist: opencv-python (>=4,<5) ; extra == "huggingface" or extra == "all"
78
77
  Requires-Dist: outlines (>=0.1.7,<0.2.0) ; extra == "all"
79
78
  Requires-Dist: pandas (>=1.5.3,<2.0.0) ; extra == "data-tools" or extra == "all"
80
79
  Requires-Dist: pandasai (>=2.3.0,<3.0.0) ; extra == "rag" or extra == "document-tools" or extra == "all"
81
- Requires-Dist: pandoc
82
- Requires-Dist: pathlib (>=1.0.1,<2.0.0)
80
+ Requires-Dist: pandoc (>=2.4,<3.0)
83
81
  Requires-Dist: pdfplumber (>=0.11.0,<0.12.0) ; extra == "document-tools" or extra == "all"
84
82
  Requires-Dist: pillow (>=10.1.0,<11.0.0) ; extra == "media-tools" or extra == "all"
85
83
  Requires-Dist: prance (>=23.6.21.0,<24.0.0.0) ; extra == "document-tools" or extra == "all"
86
84
  Requires-Dist: praw (>=7.7.1,<8.0.0) ; extra == "communication-tools" or extra == "all"
87
- Requires-Dist: protobuf (>=4,<5)
85
+ Requires-Dist: protobuf (>=5,<6)
86
+ Requires-Dist: psutil (>=5.9.8,<6.0.0)
88
87
  Requires-Dist: pyTelegramBotAPI (>=4.18.0,<5.0.0) ; extra == "communication-tools" or extra == "all"
89
88
  Requires-Dist: pydantic (>=1.9,<2.10)
90
89
  Requires-Dist: pydub (>=0.25.1,<0.26.0) ; extra == "media-tools" or extra == "all"
@@ -95,7 +94,6 @@ Requires-Dist: pytest (>=7,<8) ; extra == "test"
95
94
  Requires-Dist: pytest-asyncio (>=0.23.0,<0.24.0) ; extra == "test"
96
95
  Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
97
96
  Requires-Dist: qdrant-client (>=1.9.0,<2.0.0) ; extra == "rag" or extra == "storage" or extra == "all"
98
- Requires-Dist: ragas (<=0.1.6) ; extra == "all"
99
97
  Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0) ; extra == "rag" or extra == "all"
100
98
  Requires-Dist: redis (>=5.0.6,<6.0.0) ; extra == "storage" or extra == "all"
101
99
  Requires-Dist: reka-api (>=3.0.8,<4.0.0) ; extra == "model-platforms" or extra == "all"
@@ -103,12 +101,13 @@ Requires-Dist: requests_oauthlib (>=1.3.1,<2.0.0) ; extra == "web-tools" or extr
103
101
  Requires-Dist: rouge (>=1.0.1,<2.0.0) ; extra == "data-tools" or extra == "all"
104
102
  Requires-Dist: scholarly[tor] (==1.7.11) ; extra == "research-tools" or extra == "all"
105
103
  Requires-Dist: sentence-transformers (>=3.0.1,<4.0.0) ; extra == "rag" or extra == "all"
106
- Requires-Dist: sentencepiece (>=0,<1) ; extra == "huggingface" or extra == "all"
104
+ Requires-Dist: sentencepiece (>=0.2,<0.3) ; extra == "huggingface" or extra == "all"
107
105
  Requires-Dist: sglang (>=0.4.0,<0.5.0) ; extra == "model-platforms" or extra == "all"
108
106
  Requires-Dist: slack-bolt (>=1.20.1,<2.0.0) ; extra == "communication-tools" or extra == "all"
109
107
  Requires-Dist: slack-sdk (>=3.27.2,<4.0.0) ; extra == "communication-tools" or extra == "all"
110
- Requires-Dist: soundfile (>=0,<1) ; extra == "huggingface" or extra == "all"
108
+ Requires-Dist: soundfile (>=0.13,<0.14) ; extra == "huggingface" or extra == "all"
111
109
  Requires-Dist: stripe (>=11.3.0,<12.0.0) ; extra == "data-tools" or extra == "all"
110
+ Requires-Dist: sympy (>=1.13.3,<2.0.0) ; extra == "web-tools" or extra == "all"
112
111
  Requires-Dist: tavily-python (>=0.5.0,<0.6.0) ; extra == "web-tools" or extra == "all"
113
112
  Requires-Dist: textblob (>=0.17.1,<0.18.0) ; extra == "data-tools" or extra == "all"
114
113
  Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
@@ -408,7 +407,8 @@ Practical guides and tutorials for implementing specific functionalities in CAME
408
407
  | **[CoT Data Generation and SFT Qwen with Unsolth](https://docs.camel-ai.org/cookbooks/data_generation/cot_data_gen_sft_qwen_unsolth_upload_huggingface.html)** | Discover how to generate CoT data using CAMEL and SFT Qwen with Unsolth, and seamlessly upload your data and model to Huggingface. |
409
408
  | **[Agentic Data Generation, Evaluation & Filtering with Reward Models](https://docs.camel-ai.org/cookbooks/data_generation/synthetic_dataevaluation&filter_with_reward_model.html)** | Discover methods for generating, evaluating, and filtering agentic data using reward models to enhance the quality and efficiency of your synthetic data pipelines. |
410
409
  | **[Data Model Generation and Structured Output with Qwen Model](https://docs.camel-ai.org/cookbooks/data_generation/data_model_generation_and_structured_output_with_qwen.html)** |Learn how to generate data models and structured outputs using the Qwen Model for improved data representation.|
411
-
410
+ | **[Distill Math Reasoning Data from DeepSeek R1](https://docs.camel-ai.org/cookbooks/data_generation/distill_math_reasoning_data_from_deepseek_r1.html)** |Learn how to set up and leverage CAMEL's data distillation pipline for distilling high-quality maths reasoning data with thought process (Long CoT data)from deepseek R1, and uploading the results to Hugging Face.|
411
+ | **[Self-Improving Math Reasoning Data Distillation from DeepSeek R1](https://docs.camel-ai.org/cookbooks/data_generation/self_improving_math_reasoning_data_distillation_from_deepSeek_r1.html)** |Learn how to set up and leverage CAMEL's data distillation pipline for self-improving math reasoning data distillation from deepseek R1, and uploading the results to Hugging Face.|
412
412
 
413
413
  ### Multi-Agent Systems & Applications
414
414
  | Cookbook | Description |
@@ -418,6 +418,7 @@ Practical guides and tutorials for implementing specific functionalities in CAME
418
418
  | **[Dynamic Travel Planner Role-Playing: Multi-Agent System with Real-Time Insights Powered by Dappier](https://docs.camel-ai.org/cookbooks/applications/dynamic_travel_planner.html)** | Explore an innovative approach to travel planning, blending AI-driven role-playing and real-time data for seamless experiences. |
419
419
  | **[Customer Service Discord Bot with Agentic RAG](https://docs.camel-ai.org/cookbooks/applications/customer_service_Discord_bot_using_SambaNova_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG. |
420
420
  | **[Customer Service Discord Bot with Local Model](https://docs.camel-ai.org/cookbooks/applications/customer_service_Discord_bot_using_local_model_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG which supports local deployment. |
421
+ | **[Customer Service Discord Bot for Finance with OpenBB](https://docs.camel-ai.org/cookbooks/applications/finance_discord_bot.html)**| Learn how to build a sipmle yet powerful financial data assistant Discord bot using OpenBB tools. |
421
422
 
422
423
  ### Data Processing
423
424
  | Cookbook | Description |
@@ -456,6 +457,10 @@ We implemented amazing research ideas from other works for you to build, compare
456
457
 
457
458
  - `Self-Instruct` from *Yizhong Wang et al.*: [SELF-INSTRUCT: Aligning Language Models with Self-Generated Instructions](https://arxiv.org/pdf/2212.10560). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/self_instruct/self_instruct.py)]
458
459
 
460
+ - `Source2Synth` from *Alisia Lupidi et al.*: [Source2Synth: Synthetic Data Generation and Curation Grounded in Real Data Sources](https://arxiv.org/abs/2409.08239). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/source2synth.py)]
461
+
462
+ - `STaR` from *Eric Zelikman et al.*: [STaR: Bootstrapping Reasoning With Reasoning](https://arxiv.org/abs/2203.14465). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/star)]
463
+
459
464
  ## Other Research Works Based on Camel
460
465
  - [Agent Trust](http://agent-trust.camel-ai.org/): Can Large Language Model Agents Simulate Human Trust Behavior?
461
466
 
@@ -280,7 +280,8 @@ Practical guides and tutorials for implementing specific functionalities in CAME
280
280
  | **[CoT Data Generation and SFT Qwen with Unsolth](https://docs.camel-ai.org/cookbooks/data_generation/cot_data_gen_sft_qwen_unsolth_upload_huggingface.html)** | Discover how to generate CoT data using CAMEL and SFT Qwen with Unsolth, and seamlessly upload your data and model to Huggingface. |
281
281
  | **[Agentic Data Generation, Evaluation & Filtering with Reward Models](https://docs.camel-ai.org/cookbooks/data_generation/synthetic_dataevaluation&filter_with_reward_model.html)** | Discover methods for generating, evaluating, and filtering agentic data using reward models to enhance the quality and efficiency of your synthetic data pipelines. |
282
282
  | **[Data Model Generation and Structured Output with Qwen Model](https://docs.camel-ai.org/cookbooks/data_generation/data_model_generation_and_structured_output_with_qwen.html)** |Learn how to generate data models and structured outputs using the Qwen Model for improved data representation.|
283
-
283
+ | **[Distill Math Reasoning Data from DeepSeek R1](https://docs.camel-ai.org/cookbooks/data_generation/distill_math_reasoning_data_from_deepseek_r1.html)** |Learn how to set up and leverage CAMEL's data distillation pipline for distilling high-quality maths reasoning data with thought process (Long CoT data)from deepseek R1, and uploading the results to Hugging Face.|
284
+ | **[Self-Improving Math Reasoning Data Distillation from DeepSeek R1](https://docs.camel-ai.org/cookbooks/data_generation/self_improving_math_reasoning_data_distillation_from_deepSeek_r1.html)** |Learn how to set up and leverage CAMEL's data distillation pipline for self-improving math reasoning data distillation from deepseek R1, and uploading the results to Hugging Face.|
284
285
 
285
286
  ### Multi-Agent Systems & Applications
286
287
  | Cookbook | Description |
@@ -290,6 +291,7 @@ Practical guides and tutorials for implementing specific functionalities in CAME
290
291
  | **[Dynamic Travel Planner Role-Playing: Multi-Agent System with Real-Time Insights Powered by Dappier](https://docs.camel-ai.org/cookbooks/applications/dynamic_travel_planner.html)** | Explore an innovative approach to travel planning, blending AI-driven role-playing and real-time data for seamless experiences. |
291
292
  | **[Customer Service Discord Bot with Agentic RAG](https://docs.camel-ai.org/cookbooks/applications/customer_service_Discord_bot_using_SambaNova_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG. |
292
293
  | **[Customer Service Discord Bot with Local Model](https://docs.camel-ai.org/cookbooks/applications/customer_service_Discord_bot_using_local_model_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG which supports local deployment. |
294
+ | **[Customer Service Discord Bot for Finance with OpenBB](https://docs.camel-ai.org/cookbooks/applications/finance_discord_bot.html)**| Learn how to build a sipmle yet powerful financial data assistant Discord bot using OpenBB tools. |
293
295
 
294
296
  ### Data Processing
295
297
  | Cookbook | Description |
@@ -328,6 +330,10 @@ We implemented amazing research ideas from other works for you to build, compare
328
330
 
329
331
  - `Self-Instruct` from *Yizhong Wang et al.*: [SELF-INSTRUCT: Aligning Language Models with Self-Generated Instructions](https://arxiv.org/pdf/2212.10560). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/self_instruct/self_instruct.py)]
330
332
 
333
+ - `Source2Synth` from *Alisia Lupidi et al.*: [Source2Synth: Synthetic Data Generation and Curation Grounded in Real Data Sources](https://arxiv.org/abs/2409.08239). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/source2synth.py)]
334
+
335
+ - `STaR` from *Eric Zelikman et al.*: [STaR: Bootstrapping Reasoning With Reasoning](https://arxiv.org/abs/2203.14465). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/star)]
336
+
331
337
  ## Other Research Works Based on Camel
332
338
  - [Agent Trust](http://agent-trust.camel-ai.org/): Can Large Language Model Agents Simulate Human Trust Behavior?
333
339
 
@@ -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.18'
17
+ __version__ = '0.2.20'
18
18
 
19
19
  __all__ = [
20
20
  '__version__',
@@ -86,18 +86,18 @@ except (ImportError, AttributeError):
86
86
  from camel.utils import track_agent
87
87
 
88
88
 
89
- class FunctionCallingRecord(BaseModel):
90
- r"""Historical records of functions called in the conversation.
89
+ class ToolCallingRecord(BaseModel):
90
+ r"""Historical records of tools called in the conversation.
91
91
 
92
92
  Attributes:
93
- func_name (str): The name of the function being called.
93
+ tool_name (str): The name of the tool being called.
94
94
  args (Dict[str, Any]): The dictionary of arguments passed to
95
- the function.
96
- result (Any): The execution result of calling this function.
95
+ the tools.
96
+ result (Any): The execution result of calling this tool.
97
97
  tool_call_id (str): The ID of the tool call, if available.
98
98
  """
99
99
 
100
- func_name: str
100
+ tool_name: str
101
101
  args: Dict[str, Any]
102
102
  result: Any
103
103
  tool_call_id: str
@@ -106,10 +106,10 @@ class FunctionCallingRecord(BaseModel):
106
106
  r"""Overridden version of the string function.
107
107
 
108
108
  Returns:
109
- str: Modified string to represent the function calling.
109
+ str: Modified string to represent the tool calling.
110
110
  """
111
111
  return (
112
- f"Function Execution: {self.func_name}\n"
112
+ f"Tool Execution: {self.tool_name}\n"
113
113
  f"\tArgs: {self.args}\n"
114
114
  f"\tResult: {self.result}\n"
115
115
  )
@@ -489,7 +489,7 @@ class ChatAgent(BaseAgent):
489
489
  usage: Optional[Dict[str, int]],
490
490
  termination_reasons: List[str],
491
491
  num_tokens: int,
492
- tool_calls: List[FunctionCallingRecord],
492
+ tool_calls: List[ToolCallingRecord],
493
493
  external_tool_request: Optional[ChatCompletionMessageToolCall] = None,
494
494
  ) -> Dict[str, Any]:
495
495
  r"""Returns a dictionary containing information about the chat session.
@@ -501,7 +501,7 @@ class ChatAgent(BaseAgent):
501
501
  termination_reasons (List[str]): The reasons for the termination
502
502
  of the chat session.
503
503
  num_tokens (int): The number of tokens used in the chat session.
504
- tool_calls (List[FunctionCallingRecord]): The list of function
504
+ tool_calls (List[ToolCallingRecord]): The list of function
505
505
  calling records, containing the information of called tools.
506
506
  external_tool_request
507
507
  (Optional[ChatCompletionMessageToolCall], optional):
@@ -573,9 +573,8 @@ class ChatAgent(BaseAgent):
573
573
  self.model_backend.model_config_dict.get("response_format")
574
574
  and response_format
575
575
  ):
576
- raise ValueError(
577
- "The `response_format` parameter cannot be set both in "
578
- "the model configuration and in the ChatAgent step."
576
+ logger.warning(
577
+ f"Overriding the response format with {response_format}."
579
578
  )
580
579
 
581
580
  self.original_model_dict = self.model_backend.model_config_dict
@@ -645,7 +644,7 @@ class ChatAgent(BaseAgent):
645
644
  )
646
645
 
647
646
  # Record function calls made during the session
648
- tool_call_records: List[FunctionCallingRecord] = []
647
+ tool_call_records: List[ToolCallingRecord] = []
649
648
 
650
649
  external_tool_request = None
651
650
 
@@ -885,7 +884,7 @@ class ChatAgent(BaseAgent):
885
884
 
886
885
  self.update_memory(input_message, OpenAIBackendRole.USER)
887
886
 
888
- tool_call_records: List[FunctionCallingRecord] = []
887
+ tool_call_records: List[ToolCallingRecord] = []
889
888
  while True:
890
889
  try:
891
890
  openai_messages, num_tokens = self.memory.get_context()
@@ -970,7 +969,7 @@ class ChatAgent(BaseAgent):
970
969
 
971
970
  def _step_tool_call_and_update(
972
971
  self, response: ChatCompletion
973
- ) -> FunctionCallingRecord:
972
+ ) -> ToolCallingRecord:
974
973
  r"""Processes a function call within the chat completion response,
975
974
  records the function call in the provided list of tool calls and
976
975
  updates the memory of the current agent.
@@ -980,7 +979,7 @@ class ChatAgent(BaseAgent):
980
979
  completion.
981
980
 
982
981
  Returns:
983
- FunctionCallingRecord: The record of calling the function.
982
+ ToolCallingRecord: The record of calling the function.
984
983
  """
985
984
 
986
985
  # Perform function calling
@@ -996,7 +995,7 @@ class ChatAgent(BaseAgent):
996
995
 
997
996
  async def _step_tool_call_and_update_async(
998
997
  self, response: ChatCompletion
999
- ) -> FunctionCallingRecord:
998
+ ) -> ToolCallingRecord:
1000
999
  (
1001
1000
  func_assistant_msg,
1002
1001
  func_result_msg,
@@ -1015,7 +1014,7 @@ class ChatAgent(BaseAgent):
1015
1014
  List[str],
1016
1015
  Dict[str, int],
1017
1016
  str,
1018
- FunctionCallingRecord,
1017
+ ToolCallingRecord,
1019
1018
  int,
1020
1019
  ]:
1021
1020
  r"""Internal function of structuring the output of the agent based on
@@ -1027,7 +1026,7 @@ class ChatAgent(BaseAgent):
1027
1026
 
1028
1027
  Returns:
1029
1028
  Tuple[List[BaseMessage], List[str], Dict[str, int], str,
1030
- FunctionCallingRecord, int]:
1029
+ ToolCallingRecord, int]:
1031
1030
  A tuple containing the output messages, finish reasons, usage
1032
1031
  dictionary, response ID, function calling record, and number of
1033
1032
  tokens.
@@ -1141,7 +1140,7 @@ class ChatAgent(BaseAgent):
1141
1140
  finish_reasons: List[str],
1142
1141
  usage_dict: Dict[str, int],
1143
1142
  response_id: str,
1144
- tool_calls: List[FunctionCallingRecord],
1143
+ tool_calls: List[ToolCallingRecord],
1145
1144
  num_tokens: int,
1146
1145
  external_tool_request: Optional[ChatCompletionMessageToolCall] = None,
1147
1146
  ) -> Dict[str, Any]:
@@ -1160,7 +1159,7 @@ class ChatAgent(BaseAgent):
1160
1159
  usage_dict (Dict[str, int]): Dictionary containing token usage
1161
1160
  information.
1162
1161
  response_id (str): The ID of the response from the model.
1163
- tool_calls (List[FunctionCallingRecord]): Records of function calls
1162
+ tool_calls (List[ToolCallingRecord]): Records of function calls
1164
1163
  made during this step.
1165
1164
  num_tokens (int): The number of tokens used in this step.
1166
1165
  external_tool_request (Optional[ChatCompletionMessageToolCall]):
@@ -1335,7 +1334,7 @@ class ChatAgent(BaseAgent):
1335
1334
  def _step_token_exceed(
1336
1335
  self,
1337
1336
  num_tokens: int,
1338
- tool_calls: List[FunctionCallingRecord],
1337
+ tool_calls: List[ToolCallingRecord],
1339
1338
  termination_reason: str,
1340
1339
  ) -> ChatAgentResponse:
1341
1340
  r"""Return trivial response containing number of tokens and information
@@ -1343,7 +1342,7 @@ class ChatAgent(BaseAgent):
1343
1342
 
1344
1343
  Args:
1345
1344
  num_tokens (int): Number of tokens in the messages.
1346
- tool_calls (List[FunctionCallingRecord]): List of information
1345
+ tool_calls (List[ToolCallingRecord]): List of information
1347
1346
  objects of functions called in the current step.
1348
1347
  termination_reason (str): String of termination reason.
1349
1348
 
@@ -1372,7 +1371,7 @@ class ChatAgent(BaseAgent):
1372
1371
  self,
1373
1372
  response: ChatCompletion,
1374
1373
  ) -> Tuple[
1375
- FunctionCallingMessage, FunctionCallingMessage, FunctionCallingRecord
1374
+ FunctionCallingMessage, FunctionCallingMessage, ToolCallingRecord
1376
1375
  ]:
1377
1376
  r"""Execute the function with arguments following the model's response.
1378
1377
 
@@ -1418,8 +1417,8 @@ class ChatAgent(BaseAgent):
1418
1417
  )
1419
1418
 
1420
1419
  # Record information about this function call
1421
- func_record = FunctionCallingRecord(
1422
- func_name=func_name,
1420
+ func_record = ToolCallingRecord(
1421
+ tool_name=func_name,
1423
1422
  args=args,
1424
1423
  result=result,
1425
1424
  tool_call_id=tool_call_id,
@@ -1442,7 +1441,7 @@ class ChatAgent(BaseAgent):
1442
1441
  self,
1443
1442
  response: ChatCompletion,
1444
1443
  ) -> Tuple[
1445
- FunctionCallingMessage, FunctionCallingMessage, FunctionCallingRecord
1444
+ FunctionCallingMessage, FunctionCallingMessage, ToolCallingRecord
1446
1445
  ]:
1447
1446
  r"""Execute the async function with arguments following the model's
1448
1447
  response.
@@ -1488,8 +1487,8 @@ class ChatAgent(BaseAgent):
1488
1487
  )
1489
1488
 
1490
1489
  # Record information about this function call
1491
- func_record = FunctionCallingRecord(
1492
- func_name=func_name,
1490
+ func_record = ToolCallingRecord(
1491
+ tool_name=func_name,
1493
1492
  args=args,
1494
1493
  result=result,
1495
1494
  tool_call_id=tool_call_id,
@@ -165,11 +165,7 @@ class KnowledgeGraphAgent(ChatAgent):
165
165
  task=str(element)
166
166
  )
167
167
 
168
- knowledge_graph_generation_msg = BaseMessage.make_user_message(
169
- role_name="Graphify", content=knowledge_graph_generation
170
- )
171
-
172
- response = self.step(input_message=knowledge_graph_generation_msg)
168
+ response = self.step(input_message=knowledge_graph_generation)
173
169
 
174
170
  content = response.msg.content
175
171
 
@@ -22,17 +22,36 @@ from camel.agents.programmed_agent_instruction import (
22
22
  ProgrammedAgentInstructionResult,
23
23
  programmable_capability,
24
24
  )
25
- from camel.messages import BaseMessage
26
- from camel.synthetic_datagen.source2synth.models import (
25
+ from camel.datagen.source2synth.models import (
27
26
  ContextPrompt,
28
27
  MultiHopQA,
29
28
  )
29
+ from camel.messages import BaseMessage
30
30
 
31
31
 
32
32
  class MultiHopGeneratorAgent(ProgrammableChatAgent):
33
+ r"""An agent specialized in generating multi-hop question-answer pairs.
34
+
35
+ This agent is designed to create complex questions that require multiple
36
+ steps of reasoning to answer. It analyzes context to identify related
37
+ facts and generates questions that require connecting these facts
38
+ logically.
39
+
40
+ Attributes:
41
+ model_config (ConfigDict): Configuration for model behavior.
42
+ system_message (BaseMessage): System message defining agent's role and
43
+ instructions.
44
+ """
45
+
33
46
  model_config = ConfigDict(arbitrary_types_allowed=True)
34
47
 
35
- def __init__(self, **kwargs: Any):
48
+ def __init__(self, **kwargs: Any) -> None:
49
+ r"""Initialize the MultiHopGeneratorAgent.
50
+
51
+ Args:
52
+ **kwargs (Any): Additional keyword arguments to pass to parent
53
+ class.
54
+ """
36
55
  super().__init__(**kwargs)
37
56
 
38
57
  system_text: str = textwrap.dedent(
@@ -64,6 +83,19 @@ class MultiHopGeneratorAgent(ProgrammableChatAgent):
64
83
  def generate_multi_hop_qa(
65
84
  self, context: str
66
85
  ) -> ProgrammedAgentInstructionResult[MultiHopQA]:
86
+ r"""Generate a multi-hop question-answer pair from given context.
87
+
88
+ Args:
89
+ context (str): The input text context to generate QA from.
90
+
91
+ Returns:
92
+ ProgrammedAgentInstructionResult[MultiHopQA]: Result containing the
93
+ generated question, reasoning steps, answer, and supporting
94
+ facts.
95
+
96
+ Raises:
97
+ RuntimeError: If the agent fails to generate a response.
98
+ """
67
99
  context_prompt = ContextPrompt(
68
100
  main_context=context, related_contexts=None
69
101
  )
@@ -26,6 +26,16 @@ T = TypeVar('T')
26
26
 
27
27
 
28
28
  class ProgrammableAgentRequirement(Enum):
29
+ r"""Requirements for programmable agent state.
30
+
31
+ Defines the possible requirements that can be used to repair the state
32
+ of a programmable agent.
33
+
34
+ Attributes:
35
+ LAST_MESSAGE_NOT_USER (str): Requires that the last message in the
36
+ conversation was not from the user.
37
+ """
38
+
29
39
  LAST_MESSAGE_NOT_USER = "LAST_MESSAGE_NOT_USER"
30
40
 
31
41
 
@@ -34,6 +44,11 @@ class ProgrammedAgentInstructionResult(BaseModel, Generic[T]):
34
44
 
35
45
  Contains the messages exchanged during execution and the computed value.
36
46
  The value type is specified by the generic type parameter T.
47
+
48
+ Attributes:
49
+ user_message (BaseMessage): The message sent by the user.
50
+ agent_message (BaseMessage): The message sent by the agent.
51
+ value (T): The computed result value of type T.
37
52
  """
38
53
 
39
54
  user_message: BaseMessage
@@ -48,8 +63,7 @@ class AbstractProgrammableAgent(abc.ABC):
48
63
 
49
64
  A programmable agent is an agent that can be programmed to perform a
50
65
  specific function or task. This class defines the interface for a
51
- programmable
52
- agent.
66
+ programmable agent.
53
67
 
54
68
  These methods should be implemented in order to ensure the agent supports
55
69
  the necessary guarantees to enable a programming interface while
@@ -68,16 +82,15 @@ class AbstractProgrammableAgent(abc.ABC):
68
82
  An atomic operation is an operation that is guaranteed to
69
83
  be executed without interruption by any other operation.
70
84
 
71
- If the operation fails or times out the agents state should be
72
- unchanged.
85
+ Args:
86
+ callback (Callable[[], ProgrammedAgentInstructionResult[T]]): The
87
+ operation to execute atomically.
73
88
 
74
- If an operation is already in progress, this method should throw an
75
- exception. (It is up to the caller to do any queuing)
89
+ Returns:
90
+ ProgrammedAgentInstructionResult[T]: The result of the operation.
76
91
 
77
- If the agent is in a state where it can perform the operation,
78
- it must leave the agent in a state where it can perform the
79
- operation again. Though if state changes in successful operation
80
- improve its ability to perform the operation, it should keep them.
92
+ Raises:
93
+ RuntimeError: If an operation is already in progress.
81
94
  """
82
95
  raise NotImplementedError
83
96
 
@@ -86,10 +99,13 @@ class AbstractProgrammableAgent(abc.ABC):
86
99
  r"""Repair the state of the agent.
87
100
 
88
101
  Agents may have other non-atomic interfaces, such as a user interface,
89
- or chat between other agents.
102
+ or chat between other agents. This method should restore the agent to
103
+ a state where it can perform operations according to the specified
104
+ requirement.
90
105
 
91
- This method should restore the agent to a state where it can perform
92
- operations according to the specified requirement.
106
+ Args:
107
+ requirement (ProgrammableAgentRequirement): The requirement to
108
+ repair the state for.
93
109
  """
94
110
  raise NotImplementedError
95
111
 
@@ -99,10 +115,16 @@ def programmable_capability(
99
115
  ) -> Callable[..., ProgrammedAgentInstructionResult[T]]:
100
116
  r"""Decorator for programmable agent capabilities.
101
117
 
102
- Wraps a method to ensure it is executed atomically via the agent's
103
- run_atomic interface.
104
- The decorated method must return a ProgrammedAgentInstructionResult with
105
- appropriate type parameter.
118
+ This decorator ensures that the decorated method is executed atomically
119
+ and maintains the agent's state guarantees.
120
+
121
+ Args:
122
+ func (Callable[..., ProgrammedAgentInstructionResult[T]]): The method
123
+ to decorate.
124
+
125
+ Returns:
126
+ Callable[..., ProgrammedAgentInstructionResult[T]]: The decorated
127
+ method that ensures atomic execution.
106
128
  """
107
129
 
108
130
  @wraps(func)
@@ -120,9 +142,20 @@ class ProgrammableChatAgent(ChatAgent, AbstractProgrammableAgent):
120
142
  Provides a default implementation of atomic execution using threading locks
121
143
  and basic state tracking for message roles. Implementing classes need to
122
144
  provide specific repair logic for their use cases.
145
+
146
+ Attributes:
147
+ _operation_lock (threading.Lock): Lock for ensuring atomic operations.
148
+ _last_message_role (Optional[str]): Role of the last message in the
149
+ conversation.
123
150
  """
124
151
 
125
- def __init__(self, **kwargs: Any):
152
+ def __init__(self, **kwargs: Any) -> None:
153
+ r"""Initialize the ProgrammableChatAgent.
154
+
155
+ Args:
156
+ **kwargs (Any): Additional keyword arguments to pass to parent
157
+ class.
158
+ """
126
159
  super().__init__(**kwargs)
127
160
  self._operation_lock = threading.Lock()
128
161
  self._last_message_role: Optional[str] = None
@@ -130,6 +163,20 @@ class ProgrammableChatAgent(ChatAgent, AbstractProgrammableAgent):
130
163
  def run_atomic(
131
164
  self, callback: Callable[[], ProgrammedAgentInstructionResult[T]]
132
165
  ) -> ProgrammedAgentInstructionResult[T]:
166
+ r"""Run an atomic operation on the agent.
167
+
168
+ Ensures thread-safe execution of the callback function by using a lock.
169
+
170
+ Args:
171
+ callback (Callable[[], ProgrammedAgentInstructionResult[T]]): The
172
+ operation to execute atomically.
173
+
174
+ Returns:
175
+ ProgrammedAgentInstructionResult[T]: The result of the operation.
176
+
177
+ Raises:
178
+ RuntimeError: If an operation is already in progress.
179
+ """
133
180
  if not self._operation_lock.acquire(blocking=False):
134
181
  raise RuntimeError("Operation already in progress")
135
182
 
@@ -141,6 +188,14 @@ class ProgrammableChatAgent(ChatAgent, AbstractProgrammableAgent):
141
188
  self._operation_lock.release()
142
189
 
143
190
  def repair_state(self, requirement: ProgrammableAgentRequirement) -> None:
191
+ r"""Repair the state of the agent.
192
+
193
+ Implements basic state repair for message role requirements.
194
+
195
+ Args:
196
+ requirement (ProgrammableAgentRequirement): The requirement to
197
+ repair the state for.
198
+ """
144
199
  if requirement == ProgrammableAgentRequirement.LAST_MESSAGE_NOT_USER:
145
200
  if self._last_message_role == "user":
146
201
  raise NotImplementedError(
@@ -24,7 +24,6 @@ from tree_sitter import Language, Parser
24
24
 
25
25
  from camel.agents import ChatAgent
26
26
  from camel.benchmarks.base import BaseBenchmark
27
- from camel.messages import BaseMessage
28
27
  from camel.utils import download_github_subdirectory
29
28
 
30
29
  logger = logging.getLogger(__name__)
@@ -281,12 +280,9 @@ class APIBenchBenchmark(BaseBenchmark):
281
280
  with open(self.save_to, "w") as f:
282
281
  for question in tqdm(datas, desc="Running"):
283
282
  prompt = encode_question(question["text"], dataset_name)
284
- msg = BaseMessage.make_user_message(
285
- role_name="User", content=prompt
286
- )
287
283
  try:
288
284
  # Generate response
289
- responses = agent.step(msg)
285
+ responses = agent.step(prompt)
290
286
  response = responses.msgs[0].content
291
287
  api_database = self._data['api']
292
288
  qa_pairs = self._data['eval']
@@ -28,7 +28,6 @@ from tqdm import tqdm
28
28
 
29
29
  from camel.agents import ChatAgent
30
30
  from camel.benchmarks.base import BaseBenchmark
31
- from camel.messages import BaseMessage
32
31
 
33
32
  logger = logging.getLogger(__name__)
34
33
 
@@ -309,13 +308,10 @@ class NexusBenchmark(BaseBenchmark):
309
308
  with open(self.save_to, "w") as f:
310
309
  for sample in tqdm(datas, desc="Running"):
311
310
  prompt = construct_prompt(input=sample.input, tools=tools)
312
- msg = BaseMessage.make_user_message(
313
- role_name="User", content=prompt
314
- )
315
311
  ground_truth_call = sample.output
316
312
  try:
317
313
  # Generate response
318
- response = agent.step(msg)
314
+ response = agent.step(prompt)
319
315
  agent_call = response.msgs[0].content
320
316
 
321
317
  # Evaluate response
@@ -188,8 +188,8 @@ def ragas_evaluate_dataset(
188
188
  Returns:
189
189
  Dataset: Dataset with added evaluation metrics.
190
190
  """
191
- from ragas import evaluate
192
- from ragas.metrics import ( # type: ignore[import-untyped]
191
+ from ragas import evaluate # type: ignore[import]
192
+ from ragas.metrics import ( # type: ignore[import]
193
193
  context_relevancy,
194
194
  faithfulness,
195
195
  )
@@ -15,7 +15,6 @@ import os
15
15
  from typing import TYPE_CHECKING, Optional
16
16
 
17
17
  from camel.agents import ChatAgent
18
- from camel.messages import BaseMessage
19
18
  from camel.utils import dependencies_required
20
19
 
21
20
  # Conditionally import telebot types only for type checking
@@ -74,9 +73,6 @@ class TelegramBot:
74
73
  if not message.text:
75
74
  return
76
75
 
77
- user_msg = BaseMessage.make_user_message(
78
- role_name="User", content=message.text
79
- )
80
- assistant_response = self.chat_agent.step(user_msg)
76
+ assistant_response = self.chat_agent.step(message.text)
81
77
 
82
78
  self.bot.reply_to(message, assistant_response.msg.content)