agentUniverse 0.0.12.dev1__tar.gz → 0.0.12.dev2__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.
Files changed (272) hide show
  1. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/PKG-INFO +1 -1
  2. agentuniverse-0.0.12.dev2/agentuniverse_product/__init__.py +7 -0
  3. agentuniverse-0.0.12.dev2/agentuniverse_product/agentuniverse_product.py +116 -0
  4. agentuniverse-0.0.12.dev2/agentuniverse_product/base/__init__.py +7 -0
  5. agentuniverse-0.0.12.dev2/agentuniverse_product/base/agent_product.py +43 -0
  6. agentuniverse-0.0.12.dev2/agentuniverse_product/base/constant/__init__.py +7 -0
  7. agentuniverse-0.0.12.dev2/agentuniverse_product/base/constant/llm_constant.py +29 -0
  8. agentuniverse-0.0.12.dev2/agentuniverse_product/base/planner_product.py +37 -0
  9. agentuniverse-0.0.12.dev2/agentuniverse_product/base/product.py +63 -0
  10. agentuniverse-0.0.12.dev2/agentuniverse_product/base/product_configer.py +91 -0
  11. agentuniverse-0.0.12.dev2/agentuniverse_product/base/product_manager.py +19 -0
  12. agentuniverse-0.0.12.dev2/agentuniverse_product/base/util/__init__.py +7 -0
  13. agentuniverse-0.0.12.dev2/agentuniverse_product/base/util/yaml_util.py +43 -0
  14. agentuniverse-0.0.12.dev2/agentuniverse_product/dal/__init__.py +7 -0
  15. agentuniverse-0.0.12.dev2/agentuniverse_product/dal/message_library.py +84 -0
  16. agentuniverse-0.0.12.dev2/agentuniverse_product/dal/model/__init__.py +7 -0
  17. agentuniverse-0.0.12.dev2/agentuniverse_product/dal/model/message_do.py +22 -0
  18. agentuniverse-0.0.12.dev2/agentuniverse_product/dal/model/session_do.py +22 -0
  19. agentuniverse-0.0.12.dev2/agentuniverse_product/dal/session_library.py +115 -0
  20. agentuniverse-0.0.12.dev2/agentuniverse_product/service/__init__.py +7 -0
  21. agentuniverse-0.0.12.dev2/agentuniverse_product/service/agent_service/__init__.py +7 -0
  22. agentuniverse-0.0.12.dev2/agentuniverse_product/service/agent_service/agent_service.py +433 -0
  23. agentuniverse-0.0.12.dev2/agentuniverse_product/service/knowledge_service/__init__.py +7 -0
  24. agentuniverse-0.0.12.dev2/agentuniverse_product/service/knowledge_service/knowledge_service.py +32 -0
  25. agentuniverse-0.0.12.dev2/agentuniverse_product/service/llm_service/__init__.py +7 -0
  26. agentuniverse-0.0.12.dev2/agentuniverse_product/service/llm_service/llm_service.py +34 -0
  27. agentuniverse-0.0.12.dev2/agentuniverse_product/service/message_service/__init__.py +7 -0
  28. agentuniverse-0.0.12.dev2/agentuniverse_product/service/message_service/message_service.py +23 -0
  29. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/__init__.py +7 -0
  30. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/agent_dto.py +30 -0
  31. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/knowledge_dto.py +16 -0
  32. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/llm_dto.py +20 -0
  33. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/message_dto.py +18 -0
  34. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/planner_dto.py +16 -0
  35. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/prompt_dto.py +16 -0
  36. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/session_dto.py +20 -0
  37. agentuniverse-0.0.12.dev2/agentuniverse_product/service/model/tool_dto.py +18 -0
  38. agentuniverse-0.0.12.dev2/agentuniverse_product/service/session_service/__init__.py +7 -0
  39. agentuniverse-0.0.12.dev2/agentuniverse_product/service/session_service/session_service.py +103 -0
  40. agentuniverse-0.0.12.dev2/agentuniverse_product/service/tool_service/__init__.py +7 -0
  41. agentuniverse-0.0.12.dev2/agentuniverse_product/service/tool_service/tool_service.py +33 -0
  42. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/pyproject.toml +2 -1
  43. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/LICENSE +0 -0
  44. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/README_PYPI.md +0 -0
  45. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/__init__.py +0 -0
  46. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/__init__.py +0 -0
  47. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/__init__.py +0 -0
  48. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/__init__.py +0 -0
  49. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/embedding/__init__.py +0 -0
  50. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/embedding/dashscope_embedding.py +0 -0
  51. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/embedding/embedding.py +0 -0
  52. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/embedding/openai_embedding.py +0 -0
  53. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/knowledge.py +0 -0
  54. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/knowledge_manager.py +0 -0
  55. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/__init__.py +0 -0
  56. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/file/__init__.py +0 -0
  57. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/file/docx_reader.py +0 -0
  58. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/file/file_reader.py +0 -0
  59. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/file/pdf_reader.py +0 -0
  60. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/file/pptx_reader.py +0 -0
  61. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/file/txt_reader.py +0 -0
  62. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/file/web_pdf_reader.py +0 -0
  63. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/reader/reader.py +0 -0
  64. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/store/__init__.py +0 -0
  65. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/store/chroma_store.py +0 -0
  66. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/store/document.py +0 -0
  67. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/store/milvus_store.py +0 -0
  68. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/store/query.py +0 -0
  69. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/knowledge/store/store.py +0 -0
  70. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/tool/__init__.py +0 -0
  71. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/tool/enum.py +0 -0
  72. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/tool/tool.py +0 -0
  73. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/action/tool/tool_manager.py +0 -0
  74. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/agent.py +0 -0
  75. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/agent_manager.py +0 -0
  76. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/agent_model.py +0 -0
  77. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/__init__.py +0 -0
  78. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/executing_agent/__init__.py +0 -0
  79. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/executing_agent/default_cn_prompt.yaml +0 -0
  80. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/executing_agent/default_en_prompt.yaml +0 -0
  81. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/executing_agent/executing_agent.py +0 -0
  82. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/executing_agent/executing_agent.yaml +0 -0
  83. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/expressing_agent/__init__.py +0 -0
  84. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/expressing_agent/default_cn_prompt.yaml +0 -0
  85. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/expressing_agent/default_en_prompt.yaml +0 -0
  86. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/expressing_agent/expressing_agent.py +0 -0
  87. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/expressing_agent/expressing_agent.yaml +0 -0
  88. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/nl2api_agent/__init__.py +0 -0
  89. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/nl2api_agent/default_cn_prompt.yaml +0 -0
  90. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/nl2api_agent/default_en_prompt.yaml +0 -0
  91. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/nl2api_agent/nl2api_agent.py +0 -0
  92. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/nl2api_agent/nl2api_agent.yaml +0 -0
  93. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/peer_agent/__init__.py +0 -0
  94. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/peer_agent/peer_agent.py +0 -0
  95. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/peer_agent/peer_agent.yaml +0 -0
  96. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/planning_agent/__init__.py +0 -0
  97. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/planning_agent/default_cn_prompt.yaml +0 -0
  98. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/planning_agent/default_en_prompt.yaml +0 -0
  99. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/planning_agent/planning_agent.py +0 -0
  100. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/planning_agent/planning_agent.yaml +0 -0
  101. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/rag_agent/__init__.py +0 -0
  102. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/rag_agent/default_cn_prompt.yaml +0 -0
  103. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/rag_agent/default_en_prompt.yaml +0 -0
  104. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/rag_agent/rag_agent.py +0 -0
  105. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/rag_agent/rag_agent.yaml +0 -0
  106. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/react_agent/__init__.py +0 -0
  107. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/react_agent/default_cn_prompt.yaml +0 -0
  108. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/react_agent/default_en_prompt.yaml +0 -0
  109. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/react_agent/react_agent.py +0 -0
  110. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/react_agent/react_agent.yaml +0 -0
  111. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/reviewing_agent/__init__.py +0 -0
  112. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/reviewing_agent/default_cn_prompt.yaml +0 -0
  113. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/reviewing_agent/default_en_prompt.yaml +0 -0
  114. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/reviewing_agent/reviewing_agent.py +0 -0
  115. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/default/reviewing_agent/reviewing_agent.yaml +0 -0
  116. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/input_object.py +0 -0
  117. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/__init__.py +0 -0
  118. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/chat_memory.py +0 -0
  119. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/default/__init__.py +0 -0
  120. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/default/default_memory.py +0 -0
  121. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/default/default_memory.yaml +0 -0
  122. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/enum.py +0 -0
  123. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/langchain_instance.py +0 -0
  124. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/memory.py +0 -0
  125. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/memory_manager.py +0 -0
  126. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/message.py +0 -0
  127. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/summarizer_cn_prompt.yaml +0 -0
  128. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/memory/summarizer_en_prompt.yaml +0 -0
  129. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/output_object.py +0 -0
  130. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/__init__.py +0 -0
  131. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/__init__.py +0 -0
  132. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/executing_planner/__init__.py +0 -0
  133. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/executing_planner/executing_planner.py +0 -0
  134. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/executing_planner/executing_planner.yaml +0 -0
  135. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/expressing_planner/__init__.py +0 -0
  136. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/expressing_planner/expressing_planner.py +0 -0
  137. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/expressing_planner/expressing_planner.yaml +0 -0
  138. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/nl2api_planner/__init__.py +0 -0
  139. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/nl2api_planner/nl2api_planner.py +0 -0
  140. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/nl2api_planner/nl2api_planner.yaml +0 -0
  141. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/peer_planner/__init__.py +0 -0
  142. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/peer_planner/peer_planner.py +0 -0
  143. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/peer_planner/peer_planner.yaml +0 -0
  144. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/planner.py +0 -0
  145. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/planner_manager.py +0 -0
  146. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/planning_planner/__init__.py +0 -0
  147. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/planning_planner/planning_planner.py +0 -0
  148. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/planning_planner/planning_planner.yaml +0 -0
  149. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/rag_planner/__init__.py +0 -0
  150. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/rag_planner/rag_planner.py +0 -0
  151. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/rag_planner/rag_planner.yaml +0 -0
  152. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/react_planner/__init__.py +0 -0
  153. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/react_planner/react_planner.py +0 -0
  154. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/react_planner/react_planner.yaml +0 -0
  155. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/react_planner/stream_callback.py +0 -0
  156. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/reviewing_planner/__init__.py +0 -0
  157. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/reviewing_planner/reviewing_planner.py +0 -0
  158. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent/plan/planner/reviewing_planner/reviewing_planner.yaml +0 -0
  159. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/__init__.py +0 -0
  160. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/service.py +0 -0
  161. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/service_configer.py +0 -0
  162. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/service_instance.py +0 -0
  163. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/service_manager.py +0 -0
  164. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/__init__.py +0 -0
  165. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/dal/__init__.py +0 -0
  166. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/dal/entity/__init__.py +0 -0
  167. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/dal/entity/request_do.py +0 -0
  168. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/dal/request_library.py +0 -0
  169. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/flask_server.py +0 -0
  170. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/gunicorn_server.py +0 -0
  171. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/post_fork_queue.py +0 -0
  172. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/request_task.py +0 -0
  173. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/rpc/__init__.py +0 -0
  174. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/rpc/grpc/__init__.py +0 -0
  175. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/rpc/grpc/agentuniverse_service.proto +0 -0
  176. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/rpc/grpc/agentuniverse_service_pb2.py +0 -0
  177. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/rpc/grpc/agentuniverse_service_pb2_grpc.py +0 -0
  178. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/rpc/grpc/grpc_server_booster.py +0 -0
  179. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/rpc/rpc_server.py +0 -0
  180. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/thread_with_result.py +0 -0
  181. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/web_booster.py +0 -0
  182. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/agent_serve/web/web_util.py +0 -0
  183. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/__init__.py +0 -0
  184. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/agentuniverse.py +0 -0
  185. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/annotation/__init__.py +0 -0
  186. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/annotation/singleton.py +0 -0
  187. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/annotation/trace.py +0 -0
  188. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/component/__init__.py +0 -0
  189. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/component/application_component_manager.py +0 -0
  190. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/component/component_base.py +0 -0
  191. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/component/component_configer_util.py +0 -0
  192. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/component/component_enum.py +0 -0
  193. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/component/component_manager_base.py +0 -0
  194. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/__init__.py +0 -0
  195. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/application_configer/__init__.py +0 -0
  196. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/application_configer/app_configer.py +0 -0
  197. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/application_configer/application_config_manager.py +0 -0
  198. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/__init__.py +0 -0
  199. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/component_configer.py +0 -0
  200. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/__init__.py +0 -0
  201. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/agent_configer.py +0 -0
  202. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/knowledge_configer.py +0 -0
  203. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/llm_configer.py +0 -0
  204. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/memory_configer.py +0 -0
  205. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/planner_configer.py +0 -0
  206. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/prompt_configer.py +0 -0
  207. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/sqldb_wrapper_config.py +0 -0
  208. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/component_configer/configers/tool_configer.py +0 -0
  209. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/config_type_enum.py +0 -0
  210. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/configer.py +0 -0
  211. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/custom_configer/__init__.py +0 -0
  212. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/config/custom_configer/custom_key_configer.py +0 -0
  213. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/context/__init__.py +0 -0
  214. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/context/framework_context.py +0 -0
  215. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/context/framework_context_manager.py +0 -0
  216. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/__init__.py +0 -0
  217. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/env_util.py +0 -0
  218. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/logging/__init__.py +0 -0
  219. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/logging/general_logger.py +0 -0
  220. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/logging/logging_config.py +0 -0
  221. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/logging/logging_util.py +0 -0
  222. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/memory_util.py +0 -0
  223. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/monitor/__init__.py +0 -0
  224. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/monitor/monitor.py +0 -0
  225. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/prompt/__init__.py +0 -0
  226. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/prompt/combine_cn_prompt.yaml +0 -0
  227. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/prompt/combine_en_prompt.yaml +0 -0
  228. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/prompt/summary_cn_prompt.yaml +0 -0
  229. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/prompt/summary_en_prompt.yaml +0 -0
  230. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/prompt_util.py +0 -0
  231. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/base/util/system_util.py +0 -0
  232. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/database/__init__.py +0 -0
  233. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/database/sqldb_wrapper.py +0 -0
  234. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/database/sqldb_wrapper_manager.py +0 -0
  235. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/__init__.py +0 -0
  236. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/claude_langchain_instance.py +0 -0
  237. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/__init__.py +0 -0
  238. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/baichuan_openai_style_llm.py +0 -0
  239. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/baichuan_openai_style_llm.yaml +0 -0
  240. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/claude_llm.py +0 -0
  241. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/claude_llm.yaml +0 -0
  242. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/deep_seek_openai_style_llm.py +0 -0
  243. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/deep_seek_openai_style_llm.yaml +0 -0
  244. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/default_ollama_llm.py +0 -0
  245. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/default_ollama_llm.yaml +0 -0
  246. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/default_openai_llm.py +0 -0
  247. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/default_openai_llm.yaml +0 -0
  248. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/kimi_openai_style_llm.py +0 -0
  249. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/kimi_openai_style_llm.yaml +0 -0
  250. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/qwen_openai_style_llm.py +0 -0
  251. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/qwen_openai_style_llm.yaml +0 -0
  252. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/wenxin_llm.py +0 -0
  253. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/default/wenxin_llm.yaml +0 -0
  254. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/langchain_instance.py +0 -0
  255. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/llm.py +0 -0
  256. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/llm_manager.py +0 -0
  257. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/llm_output.py +0 -0
  258. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/ollama_langchain_instance.py +0 -0
  259. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/openai_llm.py +0 -0
  260. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/openai_style_langchain_instance.py +0 -0
  261. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/openai_style_llm.py +0 -0
  262. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/llm/wenxin_langchain_instance.py +0 -0
  263. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/prompt/__init__.py +0 -0
  264. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/prompt/chat_prompt.py +0 -0
  265. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/prompt/enum.py +0 -0
  266. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/prompt/prompt.py +0 -0
  267. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/prompt/prompt_manager.py +0 -0
  268. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse/prompt/prompt_model.py +0 -0
  269. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse_connector/__init__.py +0 -0
  270. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse_extension/__init__.py +0 -0
  271. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse_extension/logger/__init__.py +0 -0
  272. {agentuniverse-0.0.12.dev1 → agentuniverse-0.0.12.dev2}/agentuniverse_extension/logger/sls_sink.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agentUniverse
3
- Version: 0.0.12.dev1
3
+ Version: 0.0.12.dev2
4
4
  Summary: agentUniverse is a framework for developing applications powered by multi-agent base on large language model.
5
5
  Home-page: https://github.com/alipay/agentUniverse
6
6
  Author: AntGroup
@@ -0,0 +1,7 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/23 17:48
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: __init__.py.py
@@ -0,0 +1,116 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/23 17:49
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: agentuniverse_product.py
8
+ import sys
9
+
10
+ from agentuniverse.base.agentuniverse import AgentUniverse
11
+ from agentuniverse.base.component.application_component_manager import ApplicationComponentManager
12
+ from agentuniverse.base.component.component_configer_util import ComponentConfigerUtil
13
+ from agentuniverse.base.component.component_enum import ComponentEnum
14
+ from agentuniverse.base.config.application_configer.app_configer import AppConfiger
15
+ from agentuniverse.base.config.application_configer.application_config_manager import ApplicationConfigManager
16
+ from agentuniverse.base.config.component_configer.component_configer import ComponentConfiger
17
+ from agentuniverse.base.config.config_type_enum import ConfigTypeEnum
18
+ from agentuniverse.base.config.configer import Configer
19
+ from agentuniverse.base.util.system_util import get_project_root_path
20
+ from agentuniverse.base.annotation.singleton import singleton
21
+ from agentuniverse.database.sqldb_wrapper_manager import SQLDBWrapperManager
22
+ from agentuniverse_product.base.product import Product
23
+ from agentuniverse_product.base.product_configer import ProductConfiger
24
+ from agentuniverse_product.base.product_manager import ProductManager
25
+ from agentuniverse_product.dal.message_library import MESSAGE_TABLE_NAME, MessageORM
26
+ from agentuniverse_product.dal.session_library import SESSION_TABLE_NAME, SessionORM
27
+
28
+
29
+ @singleton
30
+ class AgentUniverseProduct(object):
31
+ """Initialize the agentUniverse product."""
32
+
33
+ def __init__(self):
34
+ self.__application_container = ApplicationComponentManager()
35
+ self.__config_container: ApplicationConfigManager = ApplicationConfigManager()
36
+ self.__system_default_product_package = []
37
+
38
+ def start(self, config_path: str = None):
39
+ """Start the agentUniverse product."""
40
+ # get default config path
41
+ project_root_path = get_project_root_path()
42
+ sys.path.append(str(project_root_path.parent))
43
+ app_path = project_root_path / 'app'
44
+ if app_path.exists():
45
+ sys.path.append(str(app_path))
46
+ if not config_path:
47
+ config_path = project_root_path / 'config' / 'config.toml'
48
+ config_path = str(config_path)
49
+
50
+ # load the configuration file
51
+ configer = Configer(path=config_path).load()
52
+ app_configer = AppConfiger().load_by_configer(configer)
53
+ self.__config_container.app_configer = app_configer
54
+
55
+ # init product tables (session and message)
56
+ self.__init_product_tables()
57
+
58
+ # scan and register the product components
59
+ self.__scan_and_register_product(self.__config_container.app_configer)
60
+
61
+ # start the product ui server
62
+ try:
63
+ from magent_ui import launch
64
+ launch()
65
+ except ImportError as e:
66
+ raise ImportError(
67
+ "Could not start product server provided by magent-ui."
68
+ " Please install it with `pip install magent-ui ruamel.yaml`."
69
+ )
70
+
71
+ def __init_product_tables(self):
72
+ """Initialize the product tables including session and message tables."""
73
+ system_sqldb_wrapper = SQLDBWrapperManager().get_instance_obj('__system_db__')
74
+ if system_sqldb_wrapper is None:
75
+ raise Exception('system db has not been initialized.')
76
+ with system_sqldb_wrapper.sql_database._engine.connect() as conn:
77
+ # init session db
78
+ if not conn.dialect.has_table(conn, SESSION_TABLE_NAME):
79
+ SessionORM.metadata.create_all(
80
+ system_sqldb_wrapper.sql_database._engine)
81
+ # init message db
82
+ if not conn.dialect.has_table(conn, MESSAGE_TABLE_NAME):
83
+ MessageORM.metadata.create_all(
84
+ system_sqldb_wrapper.sql_database._engine)
85
+
86
+ def __scan_and_register_product(self, app_configer: AppConfiger):
87
+ """Scan the product component directory and register the product components.
88
+
89
+ Args:
90
+ app_configer(AppConfiger): the AppConfiger object
91
+ """
92
+ core_product_package_list = ((app_configer.core_product_package_list or app_configer.core_default_package_list)
93
+ + self.__system_default_product_package)
94
+ if core_product_package_list is None:
95
+ return
96
+ product_configer_list = AgentUniverse().scan(core_product_package_list, ConfigTypeEnum.YAML,
97
+ ComponentEnum.PRODUCT)
98
+ self.__register(product_configer_list)
99
+
100
+ def __register(self, product_configer_list: list[ComponentConfiger]):
101
+ """Register the product components.
102
+
103
+ Args:
104
+ product_configer_list(list): the product component configer list
105
+ """
106
+ for product_configer in product_configer_list:
107
+ configer_instance: ProductConfiger = ProductConfiger(
108
+ ).load_by_configer(product_configer.configer)
109
+ component_clz = ComponentConfigerUtil.get_component_object_clz_by_component_configer(
110
+ configer_instance)
111
+ product_instance: Product = component_clz(
112
+ ).initialize_by_component_configer(configer_instance)
113
+ if product_instance is None:
114
+ continue
115
+ product_instance.component_config_path = product_configer.configer.path
116
+ ProductManager().register(product_instance.get_instance_code(), product_instance)
@@ -0,0 +1,7 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/23 17:48
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: __init__.py.py
@@ -0,0 +1,43 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/25 22:50
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: agent_product.py
8
+ from typing import Optional
9
+
10
+ from agentuniverse.agent.agent import Agent
11
+ from agentuniverse.base.config.application_configer.application_config_manager import ApplicationConfigManager
12
+ from agentuniverse_product.base.product import Product
13
+ from agentuniverse_product.base.product_configer import ProductConfiger
14
+
15
+
16
+ class AgentProduct(Product):
17
+ """The basic class of the agent product."""
18
+
19
+ opening_speech: Optional[str] = None
20
+ _instance: Optional[Agent] = None
21
+
22
+ @property
23
+ def instance(self) -> Agent:
24
+ return self._instance
25
+
26
+ def get_instance_code(self) -> str:
27
+ """Return the full name of the product."""
28
+ appname = ApplicationConfigManager().app_configer.base_info_appname
29
+ return f"{appname}.product.{self.id}"
30
+
31
+ def initialize_by_component_configer(self,
32
+ product_configer: ProductConfiger) -> 'Product':
33
+ """Initialize the Product by the ProductConfiger object.
34
+
35
+ Args:
36
+ product_configer(ProductConfiger): A configer contains product basic info.
37
+ Returns:
38
+ Product: A Product instance.
39
+ """
40
+ super().initialize_by_component_configer(product_configer)
41
+ if hasattr(product_configer, 'opening_speech') and product_configer.opening_speech:
42
+ self.opening_speech = product_configer.opening_speech
43
+ return self
@@ -0,0 +1,7 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/26 10:07
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: __init__.py.py
@@ -0,0 +1,29 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/26 10:10
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: llm.py
8
+ # llm model name list
9
+ LLM_MODEL_NAME = {
10
+ 'demo_llm': ['gpt-3.5-turbo', 'gpt-4o', 'gpt-4-turbo', 'gpt-4o-mini', 'gpt-4'],
11
+ 'default_openai_llm': ['gpt-3.5-turbo', 'gpt-4o', 'gpt-4-turbo', 'gpt-4o-mini', 'gpt-4'],
12
+ 'qwen_llm': ['qwen-max', 'qwen-long', 'qwen-turbo', 'qwen2-72b-instruct', 'qwen2-7b-instruct', 'qwen1.5-110b-chat',
13
+ 'qwen1.5-72b-chat', 'qwen1.5-7b-chat'],
14
+ 'default_qwen_llm': ['qwen-max', 'qwen-long', 'qwen-turbo', 'qwen2-72b-instruct', 'qwen2-7b-instruct',
15
+ 'qwen1.5-110b-chat', 'qwen1.5-72b-chat', 'qwen1.5-7b-chat'],
16
+ 'wenxin_llm': ['ERNIE-Speed-AppBuilder-8K-0516', 'ERNIE-Lite-8K-0725', 'ERNIE-Speed-128K', 'ERNIE-3.5-128K',
17
+ 'ERNIE-3.5-8K-0701', 'ERNIE-4.0-8K-0613', 'ERNIE-4.0-8K-Preview', 'ERNIE-3.5-8K-Preview',
18
+ 'ERNIE-Tiny-8K', 'ERNIE-4.0-8K-Latest', 'ERNIE-4.0-Turbo-8K'],
19
+ 'default_wenxin_llm': ['ERNIE-Speed-AppBuilder-8K-0516', 'ERNIE-Lite-8K-0725', 'ERNIE-Speed-128K', 'ERNIE-3.5-128K',
20
+ 'ERNIE-3.5-8K-0701', 'ERNIE-4.0-8K-0613', 'ERNIE-4.0-8K-Preview', 'ERNIE-3.5-8K-Preview',
21
+ 'ERNIE-Tiny-8K', 'ERNIE-4.0-8K-Latest', 'ERNIE-4.0-Turbo-8K'],
22
+ 'kimi_llm': ['moonshot-v1-8k', 'moonshot-v1-32k', 'moonshot-v1-128k'],
23
+ 'default_kimi_llm': ['moonshot-v1-8k', 'moonshot-v1-32k', 'moonshot-v1-128k'],
24
+ 'deep_seek_llm': ['deepseek-chat', 'deepseek-coder'],
25
+ 'default_deepseek_llm': ['deepseek-chat', 'deepseek-coder'],
26
+ 'baichuan_llm': ['Baichuan4', 'Baichuan3-Turbo', 'Baichuan3-Turbo-128k', 'Baichuan2-Turbo', 'Baichuan2-Turbo-192k'],
27
+ 'default_baichuan_llm': ['Baichuan4', 'Baichuan3-Turbo', 'Baichuan3-Turbo-128k', 'Baichuan2-Turbo',
28
+ 'Baichuan2-Turbo-192k'],
29
+ }
@@ -0,0 +1,37 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/8/12 17:57
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: planner_product.py
8
+ from typing import Optional, List
9
+
10
+ from agentuniverse.agent.plan.planner.planner import Planner
11
+ from agentuniverse_product.base.product import Product
12
+ from agentuniverse_product.base.product_configer import ProductConfiger
13
+
14
+
15
+ class PlannerProduct(Product):
16
+ """The basic class of the planner product."""
17
+
18
+ member_keys: Optional[List[str]] = None
19
+ _instance: Optional[Planner] = None
20
+
21
+ @property
22
+ def instance(self) -> Planner:
23
+ return self._instance
24
+
25
+ def initialize_by_component_configer(self,
26
+ product_configer: ProductConfiger) -> 'Product':
27
+ """Initialize the Product by the ProductConfiger object.
28
+
29
+ Args:
30
+ product_configer(ProductConfiger): A configer contains product basic info.
31
+ Returns:
32
+ Product: A Product instance.
33
+ """
34
+ super().initialize_by_component_configer(product_configer)
35
+ if hasattr(product_configer, 'member_keys') and product_configer.member_keys:
36
+ self.member_keys = product_configer.member_keys
37
+ return self
@@ -0,0 +1,63 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/24 16:29
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: product.py
8
+ from typing import Optional
9
+
10
+ from agentuniverse.base.component.component_base import ComponentBase
11
+ from agentuniverse.base.component.component_configer_util import ComponentConfigerUtil
12
+ from agentuniverse.base.component.component_enum import ComponentEnum
13
+ from agentuniverse.base.config.application_configer.application_config_manager import ApplicationConfigManager
14
+ from agentuniverse_product.base.product_configer import ProductConfiger
15
+
16
+
17
+ class Product(ComponentBase):
18
+ """The basic class of the product."""
19
+
20
+ component_type: ComponentEnum = ComponentEnum.PRODUCT
21
+ id: Optional[str] = None
22
+ nickname: Optional[str] = None
23
+ type: Optional[str] = None
24
+ avatar: Optional[str] = None
25
+ _instance: Optional[ComponentBase] = None
26
+
27
+ @property
28
+ def instance(self) -> ComponentBase:
29
+ return self._instance
30
+
31
+ def get_instance_code(self) -> str:
32
+ """Return the full name of the product."""
33
+ appname = ApplicationConfigManager().app_configer.base_info_appname
34
+ return f"{appname}.product.{self.id}"
35
+
36
+ def initialize_by_component_configer(self,
37
+ product_configer: ProductConfiger) -> 'Product':
38
+ """Initialize the Product by the ProductConfiger object.
39
+
40
+ Args:
41
+ product_configer(ProductConfiger): A configer contains product basic info.
42
+ Returns:
43
+ Product: A Product instance.
44
+ """
45
+ if product_configer.nickname:
46
+ self.nickname = product_configer.nickname
47
+ if product_configer.id:
48
+ self.id = product_configer.id
49
+ if product_configer.type:
50
+ self.type = product_configer.type
51
+ if product_configer.avatar:
52
+ self.avatar = product_configer.avatar
53
+ self.init_instance()
54
+ return self
55
+
56
+ def init_instance(self):
57
+ """Initialize the specific component instance corresponding to the product."""
58
+ component_manager_clz = ComponentConfigerUtil.get_component_manager_clz_by_type(
59
+ ComponentEnum.from_value(self.type))
60
+ self._instance = component_manager_clz().get_instance_obj(self.id)
61
+ if self._instance is None:
62
+ raise ValueError(f"The aU instance corresponding to the product id does not exist,"
63
+ f" please check the product type and id parameters.")
@@ -0,0 +1,91 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/24 16:35
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: product_configer.py
8
+ from typing import Optional
9
+
10
+ from agentuniverse.base.config.component_configer.component_configer import ComponentConfiger
11
+ from agentuniverse.base.config.configer import Configer
12
+
13
+ PRODUCT_COMPONENT_TYPE = ['AGENT', 'KNOWLEDGE', 'TOOL', 'PLANNER', 'LLM']
14
+
15
+
16
+ class ProductConfiger(ComponentConfiger):
17
+ """The ProductConfiger class, used to load and manage the product configuration."""
18
+
19
+ _ComponentConfiger__metadata_class: Optional[str] = None
20
+ _ComponentConfiger__metadata_module: Optional[str] = None
21
+
22
+ def __init__(self, configer: Optional[Configer] = None):
23
+ """Initialize the ProductConfiger."""
24
+ super().__init__(configer)
25
+ self.__nickname: Optional[str] = None
26
+ self.__id: Optional[str] = None
27
+ self.__type: Optional[str] = None
28
+ self.__avatar: Optional[str] = None
29
+ self.__set_default_meta_info()
30
+
31
+ @property
32
+ def nickname(self) -> Optional[str]:
33
+ """Nickname field."""
34
+ return self.__nickname
35
+
36
+ @property
37
+ def id(self) -> Optional[str]:
38
+ """ID field."""
39
+ return self.__id
40
+
41
+ @property
42
+ def type(self) -> Optional[str]:
43
+ """Type field."""
44
+ return self.__type
45
+
46
+ @property
47
+ def avatar(self) -> Optional[str]:
48
+ """Avatar field."""
49
+ return self.__avatar
50
+
51
+ def __set_default_meta_info(self):
52
+ """Set default instantiated class of product."""
53
+ if (not hasattr(self, '_ComponentConfiger__metadata_module')
54
+ or self._ComponentConfiger__metadata_module is None):
55
+ self._ComponentConfiger__metadata_module = ("agentuniverse_product."
56
+ "base.product")
57
+ if (not hasattr(self, '_ComponentConfiger__metadata_class')
58
+ or self._ComponentConfiger__metadata_class is None):
59
+ self._ComponentConfiger__metadata_class = 'Product'
60
+
61
+ def load(self) -> 'ProductConfiger':
62
+ """Setting property using own configer member property.
63
+
64
+ Returns:
65
+ ProductConfiger: A ProductConfiger instance.
66
+ """
67
+ return self.load_by_configer(self.configer)
68
+
69
+ def load_by_configer(self, configer: Configer) -> 'ProductConfiger':
70
+ """Load the configuration by the Configer object.
71
+ Args:
72
+ configer(Configer): the Configer object
73
+ Returns:
74
+ ProductConfiger: the ProductConfiger object
75
+ """
76
+ super().load_by_configer(configer)
77
+ self.__set_default_meta_info()
78
+ try:
79
+ self.__nickname = configer.value.get('nickname')
80
+ if self.__nickname is None:
81
+ raise ValueError(f"Product nickname is required parameter.")
82
+ self.__id = configer.value.get('id')
83
+ if self.__id is None:
84
+ raise ValueError(f"Product id is required parameter.")
85
+ self.__type = configer.value.get('type')
86
+ self.__avatar = configer.value.get('avatar')
87
+ if self.__type not in PRODUCT_COMPONENT_TYPE:
88
+ raise ValueError(f"Invalid product type: {self.__type}")
89
+ except Exception as e:
90
+ raise Exception(f"Failed to parse the Product configuration: {e}")
91
+ return self
@@ -0,0 +1,19 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/24 16:34
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: product_manager.py
8
+ from agentuniverse.base.annotation.singleton import singleton
9
+ from agentuniverse.base.component.component_enum import ComponentEnum
10
+ from agentuniverse.base.component.component_manager_base import ComponentManagerBase
11
+ from agentuniverse_product.base.product import Product
12
+
13
+
14
+ @singleton
15
+ class ProductManager(ComponentManagerBase[Product]):
16
+ """A singleton manager class of the product."""
17
+
18
+ def __init__(self):
19
+ super().__init__(ComponentEnum.PRODUCT)
@@ -0,0 +1,7 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/25 23:33
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: __init__.py.py
@@ -0,0 +1,43 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/29 12:14
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: yaml_util.py
8
+ from ruamel.yaml import YAML
9
+
10
+
11
+ def update_nested_yaml_value(config_path, updates) -> None:
12
+ """Update nested values in YAML
13
+
14
+ Args:
15
+ config_path(str): The path to the YAML file.
16
+
17
+ updates(dict): A dictionary of key-value pairs to update in the YAML file.
18
+ The keys should be dot-separated paths to the target values,
19
+ and the values should be the new values to set.
20
+ """
21
+ yaml = YAML()
22
+ # read an existing YAML file
23
+ with open(config_path, 'r', encoding='utf-8') as file:
24
+ config_data = yaml.load(file)
25
+
26
+ # batch update the value of the target key
27
+ for path, new_value in updates.items():
28
+ keys = path.split('.')
29
+ d = config_data
30
+ try:
31
+ for key in keys[:-1]:
32
+ if key not in d:
33
+ raise KeyError(f"Key '{key}' not found in the configuration")
34
+ d = d[key]
35
+ if keys[-1] in d:
36
+ # modify the value of the target key
37
+ d[keys[-1]] = new_value
38
+ except Exception as e:
39
+ print(f"Skipping update for '{path}': {e}")
40
+
41
+ # write the modified content back to the YAML file
42
+ with open(config_path, 'w', encoding='utf-8') as file:
43
+ yaml.dump(config_data, file)
@@ -0,0 +1,7 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/25 17:42
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: __init__.py.py
@@ -0,0 +1,84 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/25 19:34
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: message_library.py
8
+ import datetime
9
+
10
+ from sqlalchemy import JSON, Integer, String, DateTime, Column, Index, asc
11
+ from sqlalchemy.orm import declarative_base
12
+
13
+ from agentuniverse.base.annotation.singleton import singleton
14
+ from agentuniverse.database.sqldb_wrapper_manager import SQLDBWrapperManager
15
+ from agentuniverse_product.dal.model.message_do import MessageDO
16
+
17
+ MESSAGE_TABLE_NAME = 'message'
18
+ Base = declarative_base()
19
+
20
+
21
+ class MessageORM(Base):
22
+ """Sqlalchemy orm Model for message table."""
23
+ __tablename__ = MESSAGE_TABLE_NAME
24
+ id = Column(Integer, primary_key=True, autoincrement=True)
25
+ session_id = Column(String(50), nullable=False)
26
+ content = Column(JSON)
27
+ ext_info = Column(JSON)
28
+ gmt_created = Column(DateTime, default=datetime.datetime.now)
29
+ gmt_modified = Column(DateTime, default=datetime.datetime.now,
30
+ onupdate=datetime.datetime.now)
31
+ __table_args__ = (
32
+ Index('message_ix_session_id', 'session_id'),
33
+ )
34
+
35
+
36
+ @singleton
37
+ class MessageLibrary:
38
+ @staticmethod
39
+ def get_db_session():
40
+ """Get the database session."""
41
+ system_sqldb_wrapper = SQLDBWrapperManager().get_instance_obj('__system_db__')
42
+ return system_sqldb_wrapper.get_session()()
43
+
44
+ def add_message(self, message_do: MessageDO) -> int:
45
+ """Add a message to the database."""
46
+ with self.get_db_session() as db_session:
47
+ message_orm = MessageORM(**message_do.model_dump())
48
+ db_session.add(message_orm)
49
+ db_session.commit()
50
+ return message_orm.id
51
+
52
+ def delete_messages(self, session_id: str):
53
+ """Delete messages from the database using the provided `session_id`."""
54
+ with self.get_db_session() as db_session:
55
+ message_orm_list = db_session.query(MessageORM).filter(
56
+ MessageORM.session_id == session_id)
57
+ if message_orm_list:
58
+ for message_orm in message_orm_list:
59
+ db_session.delete(message_orm)
60
+ db_session.commit()
61
+
62
+ def get_messages(self, session_id: str) -> list[MessageDO]:
63
+ """Get messages from the database using the provided `session_id`."""
64
+ with self.get_db_session() as db_session:
65
+ message_orm_list = db_session.query(MessageORM).filter(
66
+ MessageORM.session_id == session_id).order_by(asc(MessageORM.gmt_modified)).all()
67
+ res = []
68
+ if message_orm_list:
69
+ for message_orm in message_orm_list:
70
+ res.append(self.__message_orm_to_do(message_orm))
71
+ return res
72
+
73
+ @staticmethod
74
+ def __message_orm_to_do(message_orm: MessageORM) -> MessageDO:
75
+ """Convert a MessageORM object to a MessageDO object."""
76
+ message_do = MessageDO(
77
+ session_id="",
78
+ content='',
79
+ ext_info=dict(),
80
+ )
81
+ for column in message_orm.__table__.columns:
82
+ setattr(message_do, column.name,
83
+ getattr(message_orm, column.name))
84
+ return message_do
@@ -0,0 +1,7 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/25 21:47
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: __init__.py.py
@@ -0,0 +1,22 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/25 21:53
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: message_do.py
8
+ import datetime
9
+ from typing import Optional
10
+
11
+ from pydantic import BaseModel, Field
12
+
13
+
14
+ class MessageDO(BaseModel):
15
+ id: Optional[int] = Field(description="ID", default=None)
16
+ session_id: str = Field(description="Session id")
17
+ ext_info: Optional[dict] = Field(description="Message ext info.", default={})
18
+ content: Optional[str] = Field(description="Message content", default='')
19
+ gmt_created: Optional[datetime.datetime] = Field(
20
+ description="Create time", default_factory=datetime.datetime.now)
21
+ gmt_modified: Optional[datetime.datetime] = Field(
22
+ description="Modified time", default_factory=datetime.datetime.now)
@@ -0,0 +1,22 @@
1
+ # !/usr/bin/env python3
2
+ # -*- coding:utf-8 -*-
3
+
4
+ # @Time : 2024/7/25 21:53
5
+ # @Author : wangchongshi
6
+ # @Email : wangchongshi.wcs@antgroup.com
7
+ # @FileName: session_do.py
8
+ import datetime
9
+ from typing import Optional
10
+
11
+ from pydantic import BaseModel, Field
12
+
13
+
14
+ class SessionDO(BaseModel):
15
+ id: Optional[int] = Field(description="ID", default=None)
16
+ session_id: str = Field(description="Session id")
17
+ agent_id: str = Field(description="Agent id.")
18
+ ext_info: Optional[dict] = Field(description="Session ext info.", default={})
19
+ gmt_created: Optional[datetime.datetime] = Field(
20
+ description="Create time", default_factory=datetime.datetime.now)
21
+ gmt_modified: Optional[datetime.datetime] = Field(
22
+ description="Modified time", default_factory=datetime.datetime.now)