camel-ai 0.2.18__tar.gz → 0.2.19__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 (302) hide show
  1. {camel_ai-0.2.18 → camel_ai-0.2.19}/PKG-INFO +5 -2
  2. {camel_ai-0.2.18 → camel_ai-0.2.19}/README.md +3 -0
  3. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/__init__.py +1 -1
  4. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/multi_hop_generator_agent.py +35 -3
  5. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/programmed_agent_instruction.py +73 -18
  6. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/gemini_config.py +1 -1
  7. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/sglang_config.py +4 -0
  8. camel_ai-0.2.19/camel/datagen/source2synth/__init__.py +31 -0
  9. {camel_ai-0.2.18/camel/synthetic_datagen → camel_ai-0.2.19/camel/datagen}/source2synth/data_processor.py +194 -29
  10. {camel_ai-0.2.18/camel/synthetic_datagen → camel_ai-0.2.19/camel/datagen}/source2synth/models.py +25 -0
  11. {camel_ai-0.2.18/camel/synthetic_datagen → camel_ai-0.2.19/camel/datagen}/source2synth/user_data_processor_config.py +9 -8
  12. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/embeddings/__init__.py +2 -0
  13. camel_ai-0.2.19/camel/embeddings/jina_embedding.py +156 -0
  14. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/func_message.py +1 -1
  15. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/deepseek_model.py +29 -11
  16. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/groq_model.py +0 -2
  17. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/openai_model.py +1 -9
  18. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/search_toolkit.py +5 -6
  19. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/types/enums.py +68 -10
  20. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/utils/token_counting.py +1 -1
  21. {camel_ai-0.2.18 → camel_ai-0.2.19}/pyproject.toml +2 -2
  22. {camel_ai-0.2.18 → camel_ai-0.2.19}/LICENSE +0 -0
  23. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/__init__.py +0 -0
  24. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/base.py +0 -0
  25. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/chat_agent.py +0 -0
  26. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/critic_agent.py +0 -0
  27. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/deductive_reasoner_agent.py +0 -0
  28. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/embodied_agent.py +0 -0
  29. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/knowledge_graph_agent.py +0 -0
  30. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/role_assignment_agent.py +0 -0
  31. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/search_agent.py +0 -0
  32. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/task_agent.py +0 -0
  33. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/tool_agents/__init__.py +0 -0
  34. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/tool_agents/base.py +0 -0
  35. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
  36. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/benchmarks/__init__.py +0 -0
  37. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/benchmarks/apibank.py +0 -0
  38. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/benchmarks/apibench.py +0 -0
  39. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/benchmarks/base.py +0 -0
  40. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/benchmarks/gaia.py +0 -0
  41. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/benchmarks/nexus.py +0 -0
  42. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/benchmarks/ragbench.py +0 -0
  43. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/__init__.py +0 -0
  44. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/discord/__init__.py +0 -0
  45. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/discord/discord_app.py +0 -0
  46. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/discord/discord_installation.py +0 -0
  47. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/discord/discord_store.py +0 -0
  48. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/slack/__init__.py +0 -0
  49. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/slack/models.py +0 -0
  50. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/slack/slack_app.py +0 -0
  51. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/bots/telegram_bot.py +0 -0
  52. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/__init__.py +0 -0
  53. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/anthropic_config.py +0 -0
  54. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/base_config.py +0 -0
  55. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/cohere_config.py +0 -0
  56. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/deepseek_config.py +0 -0
  57. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/groq_config.py +0 -0
  58. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/internlm_config.py +0 -0
  59. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/litellm_config.py +0 -0
  60. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/mistral_config.py +0 -0
  61. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/nvidia_config.py +0 -0
  62. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/ollama_config.py +0 -0
  63. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/openai_config.py +0 -0
  64. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/qwen_config.py +0 -0
  65. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/reka_config.py +0 -0
  66. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/samba_config.py +0 -0
  67. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/togetherai_config.py +0 -0
  68. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/vllm_config.py +0 -0
  69. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/yi_config.py +0 -0
  70. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/configs/zhipuai_config.py +0 -0
  71. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/data_collector/__init__.py +0 -0
  72. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/data_collector/alpaca_collector.py +0 -0
  73. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/data_collector/base.py +0 -0
  74. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/data_collector/sharegpt_collector.py +0 -0
  75. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/__init__.py +0 -0
  76. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/cotdatagen.py +0 -0
  77. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/self_instruct/__init__.py +0 -0
  78. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/self_instruct/filter/__init__.py +0 -0
  79. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/self_instruct/filter/filter_function.py +0 -0
  80. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/self_instruct/filter/filter_registry.py +0 -0
  81. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/self_instruct/filter/instruction_filter.py +0 -0
  82. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/self_instruct/self_instruct.py +0 -0
  83. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datagen/self_instruct/templates.py +0 -0
  84. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datahubs/__init__.py +0 -0
  85. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datahubs/base.py +0 -0
  86. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datahubs/huggingface.py +0 -0
  87. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/datahubs/models.py +0 -0
  88. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/embeddings/base.py +0 -0
  89. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/embeddings/mistral_embedding.py +0 -0
  90. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/embeddings/openai_compatible_embedding.py +0 -0
  91. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/embeddings/openai_embedding.py +0 -0
  92. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
  93. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/embeddings/vlm_embedding.py +0 -0
  94. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/generators.py +0 -0
  95. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/human.py +0 -0
  96. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/__init__.py +0 -0
  97. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/base.py +0 -0
  98. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/docker_interpreter.py +0 -0
  99. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/e2b_interpreter.py +0 -0
  100. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/internal_python_interpreter.py +0 -0
  101. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/interpreter_error.py +0 -0
  102. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/ipython_interpreter.py +0 -0
  103. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/interpreters/subprocess_interpreter.py +0 -0
  104. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/__init__.py +0 -0
  105. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/apify_reader.py +0 -0
  106. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/base_io.py +0 -0
  107. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/chunkr_reader.py +0 -0
  108. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/firecrawl_reader.py +0 -0
  109. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/jina_url_reader.py +0 -0
  110. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/panda_reader.py +0 -0
  111. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/loaders/unstructured_io.py +0 -0
  112. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/logger.py +0 -0
  113. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/__init__.py +0 -0
  114. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/agent_memories.py +0 -0
  115. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/base.py +0 -0
  116. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/blocks/__init__.py +0 -0
  117. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/blocks/chat_history_block.py +0 -0
  118. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/blocks/vectordb_block.py +0 -0
  119. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/context_creators/__init__.py +0 -0
  120. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/context_creators/score_based.py +0 -0
  121. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/memories/records.py +0 -0
  122. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/__init__.py +0 -0
  123. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/base.py +0 -0
  124. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/conversion/__init__.py +0 -0
  125. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/conversion/alpaca.py +0 -0
  126. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/conversion/conversation_models.py +0 -0
  127. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/conversion/sharegpt/__init__.py +0 -0
  128. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/conversion/sharegpt/function_call_formatter.py +0 -0
  129. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/conversion/sharegpt/hermes/__init__.py +0 -0
  130. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/messages/conversion/sharegpt/hermes/hermes_function_formatter.py +0 -0
  131. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/__init__.py +0 -0
  132. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/anthropic_model.py +0 -0
  133. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/azure_openai_model.py +0 -0
  134. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/base_model.py +0 -0
  135. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/cohere_model.py +0 -0
  136. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/fish_audio_model.py +0 -0
  137. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/gemini_model.py +0 -0
  138. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/internlm_model.py +0 -0
  139. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/litellm_model.py +0 -0
  140. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/mistral_model.py +0 -0
  141. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/model_factory.py +0 -0
  142. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/model_manager.py +0 -0
  143. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/nemotron_model.py +0 -0
  144. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/nvidia_model.py +0 -0
  145. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/ollama_model.py +0 -0
  146. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/openai_audio_models.py +0 -0
  147. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/openai_compatible_model.py +0 -0
  148. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/qwen_model.py +0 -0
  149. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/reka_model.py +0 -0
  150. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/reward/__init__.py +0 -0
  151. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/reward/base_reward_model.py +0 -0
  152. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/reward/evaluator.py +0 -0
  153. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/reward/nemotron_model.py +0 -0
  154. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/reward/skywork_model.py +0 -0
  155. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/samba_model.py +0 -0
  156. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/sglang_model.py +0 -0
  157. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/stub_model.py +0 -0
  158. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/togetherai_model.py +0 -0
  159. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/vllm_model.py +0 -0
  160. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/yi_model.py +0 -0
  161. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/models/zhipuai_model.py +0 -0
  162. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/personas/__init__.py +0 -0
  163. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/personas/persona.py +0 -0
  164. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/personas/persona_hub.py +0 -0
  165. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/__init__.py +0 -0
  166. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/ai_society.py +0 -0
  167. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/base.py +0 -0
  168. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/code.py +0 -0
  169. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/evaluation.py +0 -0
  170. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/generate_text_embedding_data.py +0 -0
  171. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/image_craft.py +0 -0
  172. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/misalignment.py +0 -0
  173. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/multi_condition_image_craft.py +0 -0
  174. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/object_recognition.py +0 -0
  175. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/persona_hub.py +0 -0
  176. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/prompt_templates.py +0 -0
  177. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/role_description_prompt_template.py +0 -0
  178. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/solution_extraction.py +0 -0
  179. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/task_prompt_template.py +0 -0
  180. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/translation.py +0 -0
  181. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/prompts/video_description_prompt.py +0 -0
  182. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/responses/__init__.py +0 -0
  183. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/responses/agent_responses.py +0 -0
  184. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/retrievers/__init__.py +0 -0
  185. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/retrievers/auto_retriever.py +0 -0
  186. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/retrievers/base.py +0 -0
  187. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/retrievers/bm25_retriever.py +0 -0
  188. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/retrievers/cohere_rerank_retriever.py +0 -0
  189. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/retrievers/vector_retriever.py +0 -0
  190. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/__init__.py +0 -0
  191. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/api.py +0 -0
  192. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/base.py +0 -0
  193. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/configs.py +0 -0
  194. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/docker_runtime.py +0 -0
  195. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/llm_guard_runtime.py +0 -0
  196. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/remote_http_runtime.py +0 -0
  197. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/utils/__init__.py +0 -0
  198. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/utils/function_risk_toolkit.py +0 -0
  199. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/runtime/utils/ignore_risk_toolkit.py +0 -0
  200. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/schemas/__init__.py +0 -0
  201. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/schemas/base.py +0 -0
  202. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/schemas/openai_converter.py +0 -0
  203. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/schemas/outlines_converter.py +0 -0
  204. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/__init__.py +0 -0
  205. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/babyagi_playing.py +0 -0
  206. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/role_playing.py +0 -0
  207. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/__init__.py +0 -0
  208. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/base.py +0 -0
  209. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/prompts.py +0 -0
  210. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/role_playing_worker.py +0 -0
  211. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/single_agent_worker.py +0 -0
  212. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/task_channel.py +0 -0
  213. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/utils.py +0 -0
  214. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/worker.py +0 -0
  215. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/societies/workforce/workforce.py +0 -0
  216. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/__init__.py +0 -0
  217. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/graph_storages/__init__.py +0 -0
  218. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/graph_storages/base.py +0 -0
  219. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/graph_storages/graph_element.py +0 -0
  220. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/graph_storages/nebula_graph.py +0 -0
  221. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/graph_storages/neo4j_graph.py +0 -0
  222. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/key_value_storages/__init__.py +0 -0
  223. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/key_value_storages/base.py +0 -0
  224. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/key_value_storages/in_memory.py +0 -0
  225. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/key_value_storages/json.py +0 -0
  226. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/key_value_storages/redis.py +0 -0
  227. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/object_storages/__init__.py +0 -0
  228. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/object_storages/amazon_s3.py +0 -0
  229. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/object_storages/azure_blob.py +0 -0
  230. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/object_storages/base.py +0 -0
  231. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/object_storages/google_cloud.py +0 -0
  232. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/vectordb_storages/__init__.py +0 -0
  233. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/vectordb_storages/base.py +0 -0
  234. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/vectordb_storages/milvus.py +0 -0
  235. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/storages/vectordb_storages/qdrant.py +0 -0
  236. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/tasks/__init__.py +0 -0
  237. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/tasks/task.py +0 -0
  238. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/tasks/task_prompt.py +0 -0
  239. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/terminators/__init__.py +0 -0
  240. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/terminators/base.py +0 -0
  241. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/terminators/response_terminator.py +0 -0
  242. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/terminators/token_limit_terminator.py +0 -0
  243. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/__init__.py +0 -0
  244. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/arxiv_toolkit.py +0 -0
  245. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/ask_news_toolkit.py +0 -0
  246. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/base.py +0 -0
  247. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/code_execution.py +0 -0
  248. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/dalle_toolkit.py +0 -0
  249. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/dappier_toolkit.py +0 -0
  250. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/data_commons_toolkit.py +0 -0
  251. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/function_tool.py +0 -0
  252. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/github_toolkit.py +0 -0
  253. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/google_maps_toolkit.py +0 -0
  254. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/google_scholar_toolkit.py +0 -0
  255. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/human_toolkit.py +0 -0
  256. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/linkedin_toolkit.py +0 -0
  257. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/math_toolkit.py +0 -0
  258. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/meshy_toolkit.py +0 -0
  259. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/notion_toolkit.py +0 -0
  260. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
  261. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
  262. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
  263. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
  264. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
  265. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
  266. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
  267. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
  268. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
  269. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
  270. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
  271. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
  272. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
  273. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
  274. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
  275. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
  276. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
  277. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/security_config.py +0 -0
  278. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
  279. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
  280. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
  281. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
  282. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
  283. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
  284. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
  285. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/open_api_toolkit.py +0 -0
  286. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/openbb_toolkit.py +0 -0
  287. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/reddit_toolkit.py +0 -0
  288. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/retrieval_toolkit.py +0 -0
  289. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/slack_toolkit.py +0 -0
  290. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/stripe_toolkit.py +0 -0
  291. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/twitter_toolkit.py +0 -0
  292. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/video_toolkit.py +0 -0
  293. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/weather_toolkit.py +0 -0
  294. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/toolkits/whatsapp_toolkit.py +0 -0
  295. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/types/__init__.py +0 -0
  296. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/types/openai_types.py +0 -0
  297. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/types/unified_model_type.py +0 -0
  298. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/utils/__init__.py +0 -0
  299. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/utils/async_func.py +0 -0
  300. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/utils/commons.py +0 -0
  301. {camel_ai-0.2.18 → camel_ai-0.2.19}/camel/utils/constants.py +0 -0
  302. {camel_ai-0.2.18 → camel_ai-0.2.19}/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.19
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
@@ -71,7 +71,7 @@ Requires-Dist: neo4j (>=5.18.0,<6.0.0) ; extra == "rag" or extra == "storage" or
71
71
  Requires-Dist: newspaper3k (>=0.2.8,<0.3.0) ; extra == "web-tools" or extra == "all"
72
72
  Requires-Dist: notion-client (>=2.2.1,<3.0.0) ; extra == "communication-tools" or extra == "all"
73
73
  Requires-Dist: numpy (>=1,<2)
74
- Requires-Dist: openai (>=1.58.1,<2.0.0)
74
+ Requires-Dist: openai (>=1.59.7,<2.0.0)
75
75
  Requires-Dist: openapi-spec-validator (>=0.7.1,<0.8.0) ; extra == "document-tools" or extra == "all"
76
76
  Requires-Dist: openbb (>=4.3.5,<5.0.0) ; extra == "data-tools" or extra == "all"
77
77
  Requires-Dist: opencv-python (>=4,<5) ; extra == "huggingface" or extra == "all"
@@ -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,8 @@ 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
+
459
462
  ## Other Research Works Based on Camel
460
463
  - [Agent Trust](http://agent-trust.camel-ai.org/): Can Large Language Model Agents Simulate Human Trust Behavior?
461
464
 
@@ -290,6 +290,7 @@ Practical guides and tutorials for implementing specific functionalities in CAME
290
290
  | **[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
291
  | **[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
292
  | **[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. |
293
+ | **[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
294
 
294
295
  ### Data Processing
295
296
  | Cookbook | Description |
@@ -328,6 +329,8 @@ We implemented amazing research ideas from other works for you to build, compare
328
329
 
329
330
  - `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
331
 
332
+ - `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)]
333
+
331
334
  ## Other Research Works Based on Camel
332
335
  - [Agent Trust](http://agent-trust.camel-ai.org/): Can Large Language Model Agents Simulate Human Trust Behavior?
333
336
 
@@ -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.19'
18
18
 
19
19
  __all__ = [
20
20
  '__version__',
@@ -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(
@@ -83,7 +83,7 @@ class GeminiConfig(BaseConfig):
83
83
  stop: Union[str, Sequence[str], NotGiven] = NOT_GIVEN
84
84
  max_tokens: Union[int, NotGiven] = NOT_GIVEN
85
85
  response_format: Union[Type[BaseModel], dict, NotGiven] = NOT_GIVEN
86
- tool_choice: Optional[Union[dict[str, str], str]] = None
86
+ tool_choice: Optional[Union[dict[str, str], str, NotGiven]] = NOT_GIVEN
87
87
 
88
88
  def as_dict(self) -> dict[str, Any]:
89
89
  r"""Convert the current configuration to a dictionary.
@@ -56,6 +56,10 @@ class SGLangConfig(BaseConfig):
56
56
  in the chat completion. The total length of input tokens and
57
57
  generated tokens is limited by the model's context length.
58
58
  (default: :obj:`None`)
59
+ tools (list[FunctionTool], optional): A list of tools the model may
60
+ call. Currently, only functions are supported as a tool. Use this
61
+ to provide a list of functions the model may generate JSON inputs
62
+ for. A max of 128 functions are supported.
59
63
  """
60
64
 
61
65
  stop: Union[str, Sequence[str], NotGiven] = NOT_GIVEN
@@ -0,0 +1,31 @@
1
+ # ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ # ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
14
+ from .data_processor import (
15
+ DataCurator,
16
+ ExampleConstructor,
17
+ UserDataProcessor,
18
+ )
19
+ from .models import MultiHopQA, ReasoningStep
20
+ from .user_data_processor_config import (
21
+ ProcessorConfig,
22
+ )
23
+
24
+ __all__ = [
25
+ "DataCurator",
26
+ "ExampleConstructor",
27
+ "ProcessorConfig",
28
+ "UserDataProcessor",
29
+ "ReasoningStep",
30
+ "MultiHopQA",
31
+ ]