camel-ai 0.1.6.4__tar.gz → 0.1.6.6__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 (188) hide show
  1. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/PKG-INFO +2 -2
  2. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/README.md +1 -1
  3. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/__init__.py +1 -1
  4. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/gemini_config.py +0 -1
  5. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/groq_config.py +1 -1
  6. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/mistral_config.py +1 -1
  7. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/loaders/unstructured_io.py +10 -9
  8. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/openai_compatibility_model.py +16 -0
  9. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/retrievers/auto_retriever.py +33 -23
  10. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/retrievers/bm25_retriever.py +9 -6
  11. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/retrievers/vector_retriever.py +34 -13
  12. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/retrieval_toolkit.py +1 -1
  13. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/types/enums.py +4 -8
  14. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/pyproject.toml +1 -1
  15. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/__init__.py +0 -0
  16. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/base.py +0 -0
  17. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/chat_agent.py +0 -0
  18. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/critic_agent.py +0 -0
  19. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/deductive_reasoner_agent.py +0 -0
  20. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/embodied_agent.py +0 -0
  21. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/knowledge_graph_agent.py +0 -0
  22. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/role_assignment_agent.py +0 -0
  23. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/search_agent.py +0 -0
  24. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/task_agent.py +0 -0
  25. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/tool_agents/__init__.py +0 -0
  26. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/tool_agents/base.py +0 -0
  27. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/agents/tool_agents/hugging_face_tool_agent.py +0 -0
  28. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/__init__.py +0 -0
  29. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/anthropic_config.py +0 -0
  30. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/base_config.py +0 -0
  31. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/litellm_config.py +0 -0
  32. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/ollama_config.py +0 -0
  33. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/openai_config.py +0 -0
  34. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/vllm_config.py +0 -0
  35. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/configs/zhipuai_config.py +0 -0
  36. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/embeddings/__init__.py +0 -0
  37. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/embeddings/base.py +0 -0
  38. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/embeddings/mistral_embedding.py +0 -0
  39. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/embeddings/openai_embedding.py +0 -0
  40. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/embeddings/sentence_transformers_embeddings.py +0 -0
  41. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/embeddings/vlm_embedding.py +0 -0
  42. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/generators.py +0 -0
  43. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/human.py +0 -0
  44. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/interpreters/__init__.py +0 -0
  45. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/interpreters/base.py +0 -0
  46. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/interpreters/docker_interpreter.py +0 -0
  47. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/interpreters/internal_python_interpreter.py +0 -0
  48. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/interpreters/interpreter_error.py +0 -0
  49. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/interpreters/ipython_interpreter.py +0 -0
  50. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/interpreters/subprocess_interpreter.py +0 -0
  51. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/loaders/__init__.py +0 -0
  52. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/loaders/base_io.py +0 -0
  53. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/loaders/firecrawl_reader.py +0 -0
  54. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/loaders/jina_url_reader.py +0 -0
  55. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/__init__.py +0 -0
  56. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/agent_memories.py +0 -0
  57. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/base.py +0 -0
  58. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/blocks/__init__.py +0 -0
  59. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/blocks/chat_history_block.py +0 -0
  60. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/blocks/vectordb_block.py +0 -0
  61. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/context_creators/__init__.py +0 -0
  62. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/context_creators/score_based.py +0 -0
  63. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/memories/records.py +0 -0
  64. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/messages/__init__.py +0 -0
  65. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/messages/base.py +0 -0
  66. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/messages/func_message.py +0 -0
  67. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/__init__.py +0 -0
  68. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/anthropic_model.py +0 -0
  69. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/azure_openai_model.py +0 -0
  70. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/base_model.py +0 -0
  71. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/gemini_model.py +0 -0
  72. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/groq_model.py +0 -0
  73. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/litellm_model.py +0 -0
  74. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/mistral_model.py +0 -0
  75. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/model_factory.py +0 -0
  76. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/nemotron_model.py +0 -0
  77. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/ollama_model.py +0 -0
  78. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/open_source_model.py +0 -0
  79. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/openai_audio_models.py +0 -0
  80. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/openai_model.py +0 -0
  81. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/stub_model.py +0 -0
  82. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/vllm_model.py +0 -0
  83. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/models/zhipuai_model.py +0 -0
  84. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/__init__.py +0 -0
  85. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/ai_society.py +0 -0
  86. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/base.py +0 -0
  87. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/code.py +0 -0
  88. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/evaluation.py +0 -0
  89. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/generate_text_embedding_data.py +0 -0
  90. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/image_craft.py +0 -0
  91. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/misalignment.py +0 -0
  92. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/multi_condition_image_craft.py +0 -0
  93. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/object_recognition.py +0 -0
  94. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/prompt_templates.py +0 -0
  95. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/role_description_prompt_template.py +0 -0
  96. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/solution_extraction.py +0 -0
  97. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/task_prompt_template.py +0 -0
  98. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/translation.py +0 -0
  99. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/prompts/video_description_prompt.py +0 -0
  100. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/responses/__init__.py +0 -0
  101. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/responses/agent_responses.py +0 -0
  102. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/retrievers/__init__.py +0 -0
  103. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/retrievers/base.py +0 -0
  104. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/retrievers/cohere_rerank_retriever.py +0 -0
  105. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/societies/__init__.py +0 -0
  106. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/societies/babyagi_playing.py +0 -0
  107. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/societies/role_playing.py +0 -0
  108. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/__init__.py +0 -0
  109. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/graph_storages/__init__.py +0 -0
  110. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/graph_storages/base.py +0 -0
  111. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/graph_storages/graph_element.py +0 -0
  112. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/graph_storages/neo4j_graph.py +0 -0
  113. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/key_value_storages/__init__.py +0 -0
  114. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/key_value_storages/base.py +0 -0
  115. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/key_value_storages/in_memory.py +0 -0
  116. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/key_value_storages/json.py +0 -0
  117. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/key_value_storages/redis.py +0 -0
  118. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/object_storages/__init__.py +0 -0
  119. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/object_storages/amazon_s3.py +0 -0
  120. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/object_storages/azure_blob.py +0 -0
  121. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/object_storages/base.py +0 -0
  122. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/object_storages/google_cloud.py +0 -0
  123. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/vectordb_storages/__init__.py +0 -0
  124. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/vectordb_storages/base.py +0 -0
  125. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/vectordb_storages/milvus.py +0 -0
  126. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/storages/vectordb_storages/qdrant.py +0 -0
  127. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/tasks/__init__.py +0 -0
  128. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/tasks/task.py +0 -0
  129. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/tasks/task_prompt.py +0 -0
  130. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/terminators/__init__.py +0 -0
  131. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/terminators/base.py +0 -0
  132. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/terminators/response_terminator.py +0 -0
  133. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/terminators/token_limit_terminator.py +0 -0
  134. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/__init__.py +0 -0
  135. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/base.py +0 -0
  136. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/code_execution.py +0 -0
  137. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/dalle_toolkit.py +0 -0
  138. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/github_toolkit.py +0 -0
  139. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/google_maps_toolkit.py +0 -0
  140. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/math_toolkit.py +0 -0
  141. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/biztoc/__init__.py +0 -0
  142. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/biztoc/ai-plugin.json +0 -0
  143. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/biztoc/openapi.yaml +0 -0
  144. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/coursera/__init__.py +0 -0
  145. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/coursera/openapi.yaml +0 -0
  146. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/create_qr_code/__init__.py +0 -0
  147. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/create_qr_code/openapi.yaml +0 -0
  148. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/klarna/__init__.py +0 -0
  149. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/klarna/openapi.yaml +0 -0
  150. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/nasa_apod/__init__.py +0 -0
  151. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/nasa_apod/openapi.yaml +0 -0
  152. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/outschool/__init__.py +0 -0
  153. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/outschool/ai-plugin.json +0 -0
  154. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/outschool/openapi.yaml +0 -0
  155. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/outschool/paths/__init__.py +0 -0
  156. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/outschool/paths/get_classes.py +0 -0
  157. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/outschool/paths/search_teachers.py +0 -0
  158. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/security_config.py +0 -0
  159. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/speak/__init__.py +0 -0
  160. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/speak/openapi.yaml +0 -0
  161. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/web_scraper/__init__.py +0 -0
  162. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/web_scraper/ai-plugin.json +0 -0
  163. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/web_scraper/openapi.yaml +0 -0
  164. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/web_scraper/paths/__init__.py +0 -0
  165. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_specs/web_scraper/paths/scraper.py +0 -0
  166. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/open_api_toolkit.py +0 -0
  167. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/openai_function.py +0 -0
  168. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/search_toolkit.py +0 -0
  169. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/slack_toolkit.py +0 -0
  170. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/twitter_toolkit.py +0 -0
  171. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/toolkits/weather_toolkit.py +0 -0
  172. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/types/__init__.py +0 -0
  173. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/types/openai_types.py +0 -0
  174. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/utils/__init__.py +0 -0
  175. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/utils/async_func.py +0 -0
  176. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/utils/commons.py +0 -0
  177. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/utils/constants.py +0 -0
  178. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/utils/token_counting.py +0 -0
  179. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/__init__.py +0 -0
  180. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/base.py +0 -0
  181. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/manager_node.py +0 -0
  182. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/role_playing_node.py +0 -0
  183. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/single_agent_node.py +0 -0
  184. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/task_channel.py +0 -0
  185. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/utils.py +0 -0
  186. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/worker_node.py +0 -0
  187. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/workforce.py +0 -0
  188. {camel_ai-0.1.6.4 → camel_ai-0.1.6.6}/camel/workforce/workforce_prompt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: camel-ai
3
- Version: 0.1.6.4
3
+ Version: 0.1.6.6
4
4
  Summary: Communicative Agents for AI Society Study
5
5
  Home-page: https://www.camel-ai.org/
6
6
  License: Apache-2.0
@@ -202,7 +202,7 @@ conda create --name camel python=3.9
202
202
  conda activate camel
203
203
 
204
204
  # Clone github repo
205
- git clone -b v0.1.6.4 https://github.com/camel-ai/camel.git
205
+ git clone -b v0.1.6.6 https://github.com/camel-ai/camel.git
206
206
 
207
207
  # Change directory into project directory
208
208
  cd camel
@@ -110,7 +110,7 @@ conda create --name camel python=3.9
110
110
  conda activate camel
111
111
 
112
112
  # Clone github repo
113
- git clone -b v0.1.6.4 https://github.com/camel-ai/camel.git
113
+ git clone -b v0.1.6.6 https://github.com/camel-ai/camel.git
114
114
 
115
115
  # Change directory into project directory
116
116
  cd camel
@@ -12,7 +12,7 @@
12
12
  # limitations under the License.
13
13
  # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
14
14
 
15
- __version__ = '0.1.6.4'
15
+ __version__ = '0.1.6.6'
16
16
 
17
17
  __all__ = [
18
18
  '__version__',
@@ -81,7 +81,6 @@ class GeminiConfig(BaseConfig):
81
81
  response_mime_type: Optional[str] = None
82
82
  response_schema: Optional[Any] = None
83
83
  safety_settings: Optional[Any] = None
84
- tools: Optional[Any] = None
85
84
  tool_config: Optional[Any] = None
86
85
  request_options: Optional[Any] = None
87
86
 
@@ -99,7 +99,7 @@ class GroqConfig(BaseConfig):
99
99
  response_format: Union[dict, NotGiven] = NOT_GIVEN
100
100
  frequency_penalty: float = 0.0
101
101
  user: str = ""
102
- tool_choice: Optional[Union[dict[str, str], str]] = "none"
102
+ tool_choice: Optional[Union[dict[str, str], str]] = "auto"
103
103
 
104
104
 
105
105
  GROQ_API_PARAMS = {param for param in GroqConfig.model_fields.keys()}
@@ -74,7 +74,7 @@ class MistralConfig(BaseConfig):
74
74
  if not isinstance(response_format, ResponseFormat):
75
75
  raise ValueError(
76
76
  f"The tool {response_format} should be an instance "
77
- "of `mistralai.models.chat_completion.ResponseFormat`."
77
+ "of `mistralai.models.ResponseFormat`."
78
78
  )
79
79
  return response_format
80
80
 
@@ -12,6 +12,7 @@
12
12
  # limitations under the License.
13
13
  # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
14
14
  import uuid
15
+ import warnings
15
16
  from typing import (
16
17
  Any,
17
18
  Dict,
@@ -91,7 +92,7 @@ class UnstructuredIO:
91
92
  def parse_file_or_url(
92
93
  input_path: str,
93
94
  **kwargs: Any,
94
- ) -> List[Element]:
95
+ ) -> Union[List[Element], None]:
95
96
  r"""Loads a file or a URL and parses its contents into elements.
96
97
 
97
98
  Args:
@@ -99,12 +100,12 @@ class UnstructuredIO:
99
100
  **kwargs: Extra kwargs passed to the partition function.
100
101
 
101
102
  Returns:
102
- List[Element]: List of elements after parsing the file or URL.
103
+ Union[List[Element],None]: List of elements after parsing the file
104
+ or URL if success.
103
105
 
104
106
  Raises:
105
107
  FileNotFoundError: If the file does not exist at the path
106
108
  specified.
107
- Exception: For any other issues during file or URL parsing.
108
109
 
109
110
  Notes:
110
111
  Available document types:
@@ -128,8 +129,9 @@ class UnstructuredIO:
128
129
  try:
129
130
  elements = partition_html(url=input_path, **kwargs)
130
131
  return elements
131
- except Exception as e:
132
- raise Exception("Failed to parse the URL.") from e
132
+ except Exception:
133
+ warnings.warn(f"Failed to parse the URL: {input_path}")
134
+ return None
133
135
 
134
136
  else:
135
137
  # Handling file
@@ -146,10 +148,9 @@ class UnstructuredIO:
146
148
  with open(input_path, "rb") as f:
147
149
  elements = partition(file=f, **kwargs)
148
150
  return elements
149
- except Exception as e:
150
- raise Exception(
151
- "Failed to parse the unstructured file."
152
- ) from e
151
+ except Exception:
152
+ warnings.warn(f"Failed to partition the file: {input_path}")
153
+ return None
153
154
 
154
155
  @staticmethod
155
156
  def clean_text_data(
@@ -103,3 +103,19 @@ class OpenAICompatibilityModel:
103
103
  bool: Whether the model is in stream mode.
104
104
  """
105
105
  return self.model_config_dict.get('stream', False)
106
+
107
+ @property
108
+ def token_limit(self) -> int:
109
+ r"""Returns the maximum token limit for the given model.
110
+
111
+ Returns:
112
+ int: The maximum token limit for the given model.
113
+ """
114
+ max_tokens = self.model_config_dict.get("max_tokens")
115
+ if isinstance(max_tokens, int):
116
+ return max_tokens
117
+ print(
118
+ "Must set `max_tokens` as an integer in `model_config_dict` when"
119
+ " setting up the model. Using 4096 as default value."
120
+ )
121
+ return 4096
@@ -15,7 +15,7 @@ import datetime
15
15
  import os
16
16
  import re
17
17
  from pathlib import Path
18
- from typing import List, Optional, Tuple, Union
18
+ from typing import Collection, List, Optional, Sequence, Tuple, Union
19
19
  from urllib.parse import urlparse
20
20
 
21
21
  from camel.embeddings import BaseEmbedding, OpenAIEmbedding
@@ -28,6 +28,11 @@ from camel.storages import (
28
28
  )
29
29
  from camel.types import StorageType
30
30
 
31
+ try:
32
+ from unstructured.documents.elements import Element
33
+ except ImportError:
34
+ Element = None
35
+
31
36
  DEFAULT_TOP_K_RESULTS = 1
32
37
  DEFAULT_SIMILARITY_THRESHOLD = 0.75
33
38
 
@@ -97,15 +102,19 @@ class AutoRetriever:
97
102
  f"Unsupported vector storage type: {self.storage_type}"
98
103
  )
99
104
 
100
- def _collection_name_generator(self, content: str) -> str:
105
+ def _collection_name_generator(self, content: Union[str, Element]) -> str:
101
106
  r"""Generates a valid collection name from a given file path or URL.
102
107
 
103
108
  Args:
104
- contents (str): Local file path, remote URL or string content.
109
+ content (Union[str, Element]): Local file path, remote URL,
110
+ string content or Element object.
105
111
 
106
112
  Returns:
107
113
  str: A sanitized, valid collection name suitable for use.
108
114
  """
115
+ if isinstance(content, Element):
116
+ content = content.metadata.file_directory
117
+
109
118
  # Check if the content is URL
110
119
  parsed_url = urlparse(content)
111
120
  is_url = all([parsed_url.scheme, parsed_url.netloc])
@@ -193,18 +202,18 @@ class AutoRetriever:
193
202
  def run_vector_retriever(
194
203
  self,
195
204
  query: str,
196
- contents: Union[str, List[str]],
205
+ contents: Union[str, List[str], Element, List[Element]],
197
206
  top_k: int = DEFAULT_TOP_K_RESULTS,
198
207
  similarity_threshold: float = DEFAULT_SIMILARITY_THRESHOLD,
199
208
  return_detailed_info: bool = False,
200
- ) -> str:
209
+ ) -> dict[str, Sequence[Collection[str]]]:
201
210
  r"""Executes the automatic vector retriever process using vector
202
211
  storage.
203
212
 
204
213
  Args:
205
214
  query (str): Query string for information retriever.
206
- contents (Union[str, List[str]]): Local file paths, remote URLs or
207
- string contents.
215
+ contents (Union[str, List[str], Element, List[Element]]): Local
216
+ file paths, remote URLs, string contents or Element objects.
208
217
  top_k (int, optional): The number of top results to return during
209
218
  retrieve. Must be a positive integer. Defaults to
210
219
  `DEFAULT_TOP_K_RESULTS`.
@@ -216,9 +225,10 @@ class AutoRetriever:
216
225
  metadata. Defaults to `False`.
217
226
 
218
227
  Returns:
219
- string: By default, returns only the text information. If
220
- `return_detailed_info` is `True`, return detailed information
221
- including similarity score, content path and metadata.
228
+ dict[str, Sequence[Collection[str]]]: By default, returns
229
+ only the text information. If `return_detailed_info` is
230
+ `True`, return detailed information including similarity
231
+ score, content path and metadata.
222
232
 
223
233
  Raises:
224
234
  ValueError: If there's an vector storage existing with content
@@ -229,7 +239,9 @@ class AutoRetriever:
229
239
  if not contents:
230
240
  raise ValueError("content cannot be empty.")
231
241
 
232
- contents = [contents] if isinstance(contents, str) else contents
242
+ contents = (
243
+ [contents] if isinstance(contents, (str, Element)) else contents
244
+ )
233
245
 
234
246
  all_retrieved_info = []
235
247
  for content in contents:
@@ -245,6 +257,7 @@ class AutoRetriever:
245
257
  file_is_modified = False # initialize with a default value
246
258
  if (
247
259
  vector_storage_instance.status().vector_count != 0
260
+ and isinstance(content, str)
248
261
  and os.path.exists(content)
249
262
  ):
250
263
  # Get original modified date from file
@@ -308,20 +321,17 @@ class AutoRetriever:
308
321
  # Select the 'top_k' results
309
322
  all_retrieved_info = all_retrieved_info_sorted[:top_k]
310
323
 
311
- retrieved_infos = "\n".join(str(info) for info in all_retrieved_info)
312
- retrieved_infos_text = "\n".join(
313
- info['text'] for info in all_retrieved_info if 'text' in info
314
- )
324
+ text_retrieved_info = [item['text'] for item in all_retrieved_info]
315
325
 
316
- detailed_info = (
317
- f"Original Query:\n{{ {query} }}\n"
318
- f"Retrieved Context:\n{retrieved_infos}"
319
- )
326
+ detailed_info = {
327
+ "Original Query": query,
328
+ "Retrieved Context": all_retrieved_info,
329
+ }
320
330
 
321
- text_info = (
322
- f"Original Query:\n{{ {query} }}\n"
323
- f"Retrieved Context:\n{retrieved_infos_text}"
324
- )
331
+ text_info = {
332
+ "Original Query": query,
333
+ "Retrieved Context": text_retrieved_info,
334
+ }
325
335
 
326
336
  if return_detailed_info:
327
337
  return detailed_info
@@ -74,13 +74,16 @@ class BM25Retriever(BaseRetriever):
74
74
  elements = self.unstructured_modules.parse_file_or_url(
75
75
  content_input_path, **kwargs
76
76
  )
77
- self.chunks = self.unstructured_modules.chunk_elements(
78
- chunk_type=chunk_type, elements=elements
79
- )
77
+ if elements:
78
+ self.chunks = self.unstructured_modules.chunk_elements(
79
+ chunk_type=chunk_type, elements=elements
80
+ )
80
81
 
81
- # Convert chunks to a list of strings for tokenization
82
- tokenized_corpus = [str(chunk).split(" ") for chunk in self.chunks]
83
- self.bm25 = BM25Okapi(tokenized_corpus)
82
+ # Convert chunks to a list of strings for tokenization
83
+ tokenized_corpus = [str(chunk).split(" ") for chunk in self.chunks]
84
+ self.bm25 = BM25Okapi(tokenized_corpus)
85
+ else:
86
+ self.bm25 = None
84
87
 
85
88
  def query(
86
89
  self,
@@ -12,7 +12,8 @@
12
12
  # limitations under the License.
13
13
  # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
14
14
  import os
15
- from typing import Any, Dict, List, Optional
15
+ import warnings
16
+ from typing import Any, Dict, List, Optional, Union
16
17
  from urllib.parse import urlparse
17
18
 
18
19
  from camel.embeddings import BaseEmbedding, OpenAIEmbedding
@@ -25,6 +26,11 @@ from camel.storages import (
25
26
  VectorRecord,
26
27
  )
27
28
 
29
+ try:
30
+ from unstructured.documents.elements import Element
31
+ except ImportError:
32
+ Element = None
33
+
28
34
  DEFAULT_TOP_K_RESULTS = 1
29
35
  DEFAULT_SIMILARITY_THRESHOLD = 0.75
30
36
 
@@ -68,7 +74,7 @@ class VectorRetriever(BaseRetriever):
68
74
 
69
75
  def process(
70
76
  self,
71
- content: str,
77
+ content: Union[str, Element],
72
78
  chunk_type: str = "chunk_by_title",
73
79
  **kwargs: Any,
74
80
  ) -> None:
@@ -77,21 +83,31 @@ class VectorRetriever(BaseRetriever):
77
83
  vector storage.
78
84
 
79
85
  Args:
80
- contents (str): Local file path, remote URL or string content.
86
+ content (Union[str, Element]): Local file path, remote URL,
87
+ string content or Element object.
81
88
  chunk_type (str): Type of chunking going to apply. Defaults to
82
89
  "chunk_by_title".
83
90
  **kwargs (Any): Additional keyword arguments for content parsing.
84
91
  """
85
- # Check if the content is URL
86
- parsed_url = urlparse(content)
87
- is_url = all([parsed_url.scheme, parsed_url.netloc])
88
- if is_url or os.path.exists(content):
89
- elements = self.uio.parse_file_or_url(content, **kwargs)
92
+ if isinstance(content, Element):
93
+ elements = [content]
90
94
  else:
91
- elements = [self.uio.create_element_from_text(text=content)]
92
- chunks = self.uio.chunk_elements(
93
- chunk_type=chunk_type, elements=elements
94
- )
95
+ # Check if the content is URL
96
+ parsed_url = urlparse(content)
97
+ is_url = all([parsed_url.scheme, parsed_url.netloc])
98
+ if is_url or os.path.exists(content):
99
+ elements = self.uio.parse_file_or_url(content, **kwargs) or []
100
+ else:
101
+ elements = [self.uio.create_element_from_text(text=content)]
102
+ if elements:
103
+ chunks = self.uio.chunk_elements(
104
+ chunk_type=chunk_type, elements=elements
105
+ )
106
+ if not elements:
107
+ warnings.warn(
108
+ f"No elements were extracted from the content: {content}"
109
+ )
110
+ return
95
111
  # Iterate to process and store embeddings, set batch of 50
96
112
  for i in range(0, len(chunks), 50):
97
113
  batch_chunks = chunks[i : i + 50]
@@ -103,7 +119,12 @@ class VectorRetriever(BaseRetriever):
103
119
  # Prepare the payload for each vector record, includes the content
104
120
  # path, chunk metadata, and chunk text
105
121
  for vector, chunk in zip(batch_vectors, batch_chunks):
106
- content_path_info = {"content path": content}
122
+ if isinstance(content, str):
123
+ content_path_info = {"content path": content}
124
+ elif isinstance(content, Element):
125
+ content_path_info = {
126
+ "content path": content.metadata.file_directory
127
+ }
107
128
  chunk_metadata = {"metadata": chunk.metadata.to_dict()}
108
129
  chunk_text = {"text": str(chunk)}
109
130
  combined_dict = {
@@ -57,7 +57,7 @@ class RetrievalToolkit(BaseToolkit):
57
57
  retrieved_info = auto_retriever.run_vector_retriever(
58
58
  query=query, contents=contents, top_k=3
59
59
  )
60
- return retrieved_info
60
+ return str(retrieved_info)
61
61
 
62
62
  def get_tools(self) -> List[OpenAIFunction]:
63
63
  r"""Returns a list of OpenAIFunction objects representing the
@@ -26,7 +26,6 @@ class RoleType(Enum):
26
26
  class ModelType(Enum):
27
27
  GPT_3_5_TURBO = "gpt-3.5-turbo"
28
28
  GPT_4 = "gpt-4"
29
- GPT_4_32K = "gpt-4-32k"
30
29
  GPT_4_TURBO = "gpt-4-turbo"
31
30
  GPT_4O = "gpt-4o"
32
31
  GPT_4O_MINI = "gpt-4o-mini"
@@ -96,7 +95,6 @@ class ModelType(Enum):
96
95
  return self in {
97
96
  ModelType.GPT_3_5_TURBO,
98
97
  ModelType.GPT_4,
99
- ModelType.GPT_4_32K,
100
98
  ModelType.GPT_4_TURBO,
101
99
  ModelType.GPT_4O,
102
100
  ModelType.GPT_4O_MINI,
@@ -110,7 +108,6 @@ class ModelType(Enum):
110
108
  return self in {
111
109
  ModelType.GPT_3_5_TURBO,
112
110
  ModelType.GPT_4,
113
- ModelType.GPT_4_32K,
114
111
  ModelType.GPT_4_TURBO,
115
112
  ModelType.GPT_4O,
116
113
  }
@@ -231,7 +228,6 @@ class ModelType(Enum):
231
228
  }:
232
229
  return 16_384
233
230
  elif self in {
234
- ModelType.GPT_4_32K,
235
231
  ModelType.MISTRAL_CODESTRAL,
236
232
  ModelType.MISTRAL_7B,
237
233
  ModelType.MISTRAL_MIXTRAL_8x7B,
@@ -440,7 +436,7 @@ class ModelPlatformType(Enum):
440
436
  AZURE = "azure"
441
437
  ANTHROPIC = "anthropic"
442
438
  GROQ = "groq"
443
- OPENSOURCE = "opensource"
439
+ OPEN_SOURCE = "open-source"
444
440
  OLLAMA = "ollama"
445
441
  LITELLM = "litellm"
446
442
  ZHIPU = "zhipuai"
@@ -448,7 +444,7 @@ class ModelPlatformType(Enum):
448
444
  GEMINI = "gemini"
449
445
  VLLM = "vllm"
450
446
  MISTRAL = "mistral"
451
- OPENAICOMPATIBILITYMODEL = "openai-compatibility-model"
447
+ OPENAI_COMPATIBILITY_MODEL = "openai-compatibility-model"
452
448
 
453
449
  @property
454
450
  def is_openai(self) -> bool:
@@ -498,13 +494,13 @@ class ModelPlatformType(Enum):
498
494
  @property
499
495
  def is_open_source(self) -> bool:
500
496
  r"""Returns whether this platform is opensource."""
501
- return self is ModelPlatformType.OPENSOURCE
497
+ return self is ModelPlatformType.OPEN_SOURCE
502
498
 
503
499
  @property
504
500
  def is_openai_compatibility_model(self) -> bool:
505
501
  r"""Returns whether this is a platform supporting openai
506
502
  compatibility"""
507
- return self is ModelPlatformType.OPENAICOMPATIBILITYMODEL
503
+ return self is ModelPlatformType.OPENAI_COMPATIBILITY_MODEL
508
504
 
509
505
  @property
510
506
  def is_gemini(self) -> bool:
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "camel-ai"
7
- version = "0.1.6.4"
7
+ version = "0.1.6.6"
8
8
  authors = ["CAMEL-AI.org"]
9
9
  description = "Communicative Agents for AI Society Study"
10
10
  readme = "README.md"
File without changes