aiecs 1.5.4__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 aiecs might be problematic. Click here for more details.

Files changed (314) hide show
  1. aiecs-1.5.4/LICENSE +225 -0
  2. aiecs-1.5.4/MANIFEST.in +14 -0
  3. aiecs-1.5.4/PKG-INFO +614 -0
  4. aiecs-1.5.4/README.md +522 -0
  5. aiecs-1.5.4/aiecs/__init__.py +72 -0
  6. aiecs-1.5.4/aiecs/__main__.py +41 -0
  7. aiecs-1.5.4/aiecs/aiecs_client.py +465 -0
  8. aiecs-1.5.4/aiecs/application/__init__.py +10 -0
  9. aiecs-1.5.4/aiecs/application/executors/__init__.py +10 -0
  10. aiecs-1.5.4/aiecs/application/executors/operation_executor.py +366 -0
  11. aiecs-1.5.4/aiecs/application/knowledge_graph/__init__.py +7 -0
  12. aiecs-1.5.4/aiecs/application/knowledge_graph/builder/__init__.py +37 -0
  13. aiecs-1.5.4/aiecs/application/knowledge_graph/builder/document_builder.py +369 -0
  14. aiecs-1.5.4/aiecs/application/knowledge_graph/builder/graph_builder.py +492 -0
  15. aiecs-1.5.4/aiecs/application/knowledge_graph/builder/schema_mapping.py +480 -0
  16. aiecs-1.5.4/aiecs/application/knowledge_graph/builder/structured_pipeline.py +442 -0
  17. aiecs-1.5.4/aiecs/application/knowledge_graph/builder/text_chunker.py +317 -0
  18. aiecs-1.5.4/aiecs/application/knowledge_graph/extractors/__init__.py +27 -0
  19. aiecs-1.5.4/aiecs/application/knowledge_graph/extractors/base.py +98 -0
  20. aiecs-1.5.4/aiecs/application/knowledge_graph/extractors/llm_entity_extractor.py +419 -0
  21. aiecs-1.5.4/aiecs/application/knowledge_graph/extractors/llm_relation_extractor.py +344 -0
  22. aiecs-1.5.4/aiecs/application/knowledge_graph/extractors/ner_entity_extractor.py +239 -0
  23. aiecs-1.5.4/aiecs/application/knowledge_graph/fusion/__init__.py +23 -0
  24. aiecs-1.5.4/aiecs/application/knowledge_graph/fusion/entity_deduplicator.py +382 -0
  25. aiecs-1.5.4/aiecs/application/knowledge_graph/fusion/entity_linker.py +334 -0
  26. aiecs-1.5.4/aiecs/application/knowledge_graph/fusion/knowledge_fusion.py +576 -0
  27. aiecs-1.5.4/aiecs/application/knowledge_graph/fusion/relation_deduplicator.py +183 -0
  28. aiecs-1.5.4/aiecs/application/knowledge_graph/pattern_matching/__init__.py +21 -0
  29. aiecs-1.5.4/aiecs/application/knowledge_graph/pattern_matching/pattern_matcher.py +342 -0
  30. aiecs-1.5.4/aiecs/application/knowledge_graph/pattern_matching/query_executor.py +366 -0
  31. aiecs-1.5.4/aiecs/application/knowledge_graph/profiling/__init__.py +12 -0
  32. aiecs-1.5.4/aiecs/application/knowledge_graph/profiling/query_plan_visualizer.py +195 -0
  33. aiecs-1.5.4/aiecs/application/knowledge_graph/profiling/query_profiler.py +223 -0
  34. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/__init__.py +27 -0
  35. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/evidence_synthesis.py +341 -0
  36. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/inference_engine.py +500 -0
  37. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_form_parser.py +161 -0
  38. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_parser/__init__.py +79 -0
  39. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_parser/ast_builder.py +513 -0
  40. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_parser/ast_nodes.py +628 -0
  41. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_parser/ast_validator.py +642 -0
  42. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_parser/error_handler.py +475 -0
  43. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_parser/parser.py +384 -0
  44. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_parser/query_context.py +208 -0
  45. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/logic_query_integration.py +163 -0
  46. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/query_planner.py +850 -0
  47. aiecs-1.5.4/aiecs/application/knowledge_graph/reasoning/reasoning_engine.py +518 -0
  48. aiecs-1.5.4/aiecs/application/knowledge_graph/retrieval/__init__.py +27 -0
  49. aiecs-1.5.4/aiecs/application/knowledge_graph/retrieval/query_intent_classifier.py +207 -0
  50. aiecs-1.5.4/aiecs/application/knowledge_graph/retrieval/retrieval_strategies.py +592 -0
  51. aiecs-1.5.4/aiecs/application/knowledge_graph/retrieval/strategy_types.py +23 -0
  52. aiecs-1.5.4/aiecs/application/knowledge_graph/search/__init__.py +59 -0
  53. aiecs-1.5.4/aiecs/application/knowledge_graph/search/hybrid_search.py +444 -0
  54. aiecs-1.5.4/aiecs/application/knowledge_graph/search/reranker.py +295 -0
  55. aiecs-1.5.4/aiecs/application/knowledge_graph/search/reranker_strategies.py +539 -0
  56. aiecs-1.5.4/aiecs/application/knowledge_graph/search/text_similarity.py +394 -0
  57. aiecs-1.5.4/aiecs/application/knowledge_graph/traversal/__init__.py +15 -0
  58. aiecs-1.5.4/aiecs/application/knowledge_graph/traversal/enhanced_traversal.py +305 -0
  59. aiecs-1.5.4/aiecs/application/knowledge_graph/traversal/path_scorer.py +271 -0
  60. aiecs-1.5.4/aiecs/application/knowledge_graph/validators/__init__.py +13 -0
  61. aiecs-1.5.4/aiecs/application/knowledge_graph/validators/relation_validator.py +177 -0
  62. aiecs-1.5.4/aiecs/application/knowledge_graph/visualization/__init__.py +11 -0
  63. aiecs-1.5.4/aiecs/application/knowledge_graph/visualization/graph_visualizer.py +313 -0
  64. aiecs-1.5.4/aiecs/common/__init__.py +9 -0
  65. aiecs-1.5.4/aiecs/common/knowledge_graph/__init__.py +17 -0
  66. aiecs-1.5.4/aiecs/common/knowledge_graph/runnable.py +471 -0
  67. aiecs-1.5.4/aiecs/config/__init__.py +16 -0
  68. aiecs-1.5.4/aiecs/config/config.py +521 -0
  69. aiecs-1.5.4/aiecs/config/graph_config.py +131 -0
  70. aiecs-1.5.4/aiecs/config/registry.py +23 -0
  71. aiecs-1.5.4/aiecs/core/__init__.py +46 -0
  72. aiecs-1.5.4/aiecs/core/interface/__init__.py +34 -0
  73. aiecs-1.5.4/aiecs/core/interface/execution_interface.py +150 -0
  74. aiecs-1.5.4/aiecs/core/interface/storage_interface.py +163 -0
  75. aiecs-1.5.4/aiecs/domain/__init__.py +289 -0
  76. aiecs-1.5.4/aiecs/domain/agent/__init__.py +191 -0
  77. aiecs-1.5.4/aiecs/domain/agent/base_agent.py +3870 -0
  78. aiecs-1.5.4/aiecs/domain/agent/exceptions.py +99 -0
  79. aiecs-1.5.4/aiecs/domain/agent/graph_aware_mixin.py +569 -0
  80. aiecs-1.5.4/aiecs/domain/agent/hybrid_agent.py +1063 -0
  81. aiecs-1.5.4/aiecs/domain/agent/integration/__init__.py +29 -0
  82. aiecs-1.5.4/aiecs/domain/agent/integration/context_compressor.py +216 -0
  83. aiecs-1.5.4/aiecs/domain/agent/integration/context_engine_adapter.py +579 -0
  84. aiecs-1.5.4/aiecs/domain/agent/integration/protocols.py +281 -0
  85. aiecs-1.5.4/aiecs/domain/agent/integration/retry_policy.py +218 -0
  86. aiecs-1.5.4/aiecs/domain/agent/integration/role_config.py +213 -0
  87. aiecs-1.5.4/aiecs/domain/agent/knowledge_aware_agent.py +1850 -0
  88. aiecs-1.5.4/aiecs/domain/agent/lifecycle.py +291 -0
  89. aiecs-1.5.4/aiecs/domain/agent/llm_agent.py +669 -0
  90. aiecs-1.5.4/aiecs/domain/agent/memory/__init__.py +12 -0
  91. aiecs-1.5.4/aiecs/domain/agent/memory/conversation.py +1081 -0
  92. aiecs-1.5.4/aiecs/domain/agent/migration/__init__.py +14 -0
  93. aiecs-1.5.4/aiecs/domain/agent/migration/conversion.py +163 -0
  94. aiecs-1.5.4/aiecs/domain/agent/migration/legacy_wrapper.py +86 -0
  95. aiecs-1.5.4/aiecs/domain/agent/models.py +870 -0
  96. aiecs-1.5.4/aiecs/domain/agent/observability.py +479 -0
  97. aiecs-1.5.4/aiecs/domain/agent/persistence.py +449 -0
  98. aiecs-1.5.4/aiecs/domain/agent/prompts/__init__.py +29 -0
  99. aiecs-1.5.4/aiecs/domain/agent/prompts/builder.py +159 -0
  100. aiecs-1.5.4/aiecs/domain/agent/prompts/formatters.py +187 -0
  101. aiecs-1.5.4/aiecs/domain/agent/prompts/template.py +255 -0
  102. aiecs-1.5.4/aiecs/domain/agent/registry.py +253 -0
  103. aiecs-1.5.4/aiecs/domain/agent/tool_agent.py +444 -0
  104. aiecs-1.5.4/aiecs/domain/agent/tools/__init__.py +12 -0
  105. aiecs-1.5.4/aiecs/domain/agent/tools/schema_generator.py +221 -0
  106. aiecs-1.5.4/aiecs/domain/community/__init__.py +155 -0
  107. aiecs-1.5.4/aiecs/domain/community/agent_adapter.py +469 -0
  108. aiecs-1.5.4/aiecs/domain/community/analytics.py +432 -0
  109. aiecs-1.5.4/aiecs/domain/community/collaborative_workflow.py +648 -0
  110. aiecs-1.5.4/aiecs/domain/community/communication_hub.py +634 -0
  111. aiecs-1.5.4/aiecs/domain/community/community_builder.py +320 -0
  112. aiecs-1.5.4/aiecs/domain/community/community_integration.py +796 -0
  113. aiecs-1.5.4/aiecs/domain/community/community_manager.py +803 -0
  114. aiecs-1.5.4/aiecs/domain/community/decision_engine.py +849 -0
  115. aiecs-1.5.4/aiecs/domain/community/exceptions.py +231 -0
  116. aiecs-1.5.4/aiecs/domain/community/models/__init__.py +33 -0
  117. aiecs-1.5.4/aiecs/domain/community/models/community_models.py +234 -0
  118. aiecs-1.5.4/aiecs/domain/community/resource_manager.py +455 -0
  119. aiecs-1.5.4/aiecs/domain/community/shared_context_manager.py +589 -0
  120. aiecs-1.5.4/aiecs/domain/context/__init__.py +58 -0
  121. aiecs-1.5.4/aiecs/domain/context/context_engine.py +1907 -0
  122. aiecs-1.5.4/aiecs/domain/context/conversation_models.py +340 -0
  123. aiecs-1.5.4/aiecs/domain/context/graph_memory.py +465 -0
  124. aiecs-1.5.4/aiecs/domain/execution/__init__.py +12 -0
  125. aiecs-1.5.4/aiecs/domain/execution/model.py +57 -0
  126. aiecs-1.5.4/aiecs/domain/knowledge_graph/__init__.py +19 -0
  127. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/__init__.py +52 -0
  128. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/entity.py +128 -0
  129. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/evidence.py +178 -0
  130. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/inference_rule.py +184 -0
  131. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/path.py +171 -0
  132. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/path_pattern.py +171 -0
  133. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/query.py +248 -0
  134. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/query_plan.py +181 -0
  135. aiecs-1.5.4/aiecs/domain/knowledge_graph/models/relation.py +133 -0
  136. aiecs-1.5.4/aiecs/domain/knowledge_graph/schema/__init__.py +23 -0
  137. aiecs-1.5.4/aiecs/domain/knowledge_graph/schema/entity_type.py +131 -0
  138. aiecs-1.5.4/aiecs/domain/knowledge_graph/schema/graph_schema.py +253 -0
  139. aiecs-1.5.4/aiecs/domain/knowledge_graph/schema/property_schema.py +143 -0
  140. aiecs-1.5.4/aiecs/domain/knowledge_graph/schema/relation_type.py +163 -0
  141. aiecs-1.5.4/aiecs/domain/knowledge_graph/schema/schema_manager.py +486 -0
  142. aiecs-1.5.4/aiecs/domain/knowledge_graph/schema/type_enums.py +209 -0
  143. aiecs-1.5.4/aiecs/domain/task/__init__.py +13 -0
  144. aiecs-1.5.4/aiecs/domain/task/dsl_processor.py +576 -0
  145. aiecs-1.5.4/aiecs/domain/task/model.py +62 -0
  146. aiecs-1.5.4/aiecs/domain/task/task_context.py +260 -0
  147. aiecs-1.5.4/aiecs/infrastructure/__init__.py +24 -0
  148. aiecs-1.5.4/aiecs/infrastructure/graph_storage/__init__.py +11 -0
  149. aiecs-1.5.4/aiecs/infrastructure/graph_storage/base.py +587 -0
  150. aiecs-1.5.4/aiecs/infrastructure/graph_storage/batch_operations.py +446 -0
  151. aiecs-1.5.4/aiecs/infrastructure/graph_storage/cache.py +423 -0
  152. aiecs-1.5.4/aiecs/infrastructure/graph_storage/distributed.py +223 -0
  153. aiecs-1.5.4/aiecs/infrastructure/graph_storage/error_handling.py +380 -0
  154. aiecs-1.5.4/aiecs/infrastructure/graph_storage/graceful_degradation.py +294 -0
  155. aiecs-1.5.4/aiecs/infrastructure/graph_storage/health_checks.py +378 -0
  156. aiecs-1.5.4/aiecs/infrastructure/graph_storage/in_memory.py +508 -0
  157. aiecs-1.5.4/aiecs/infrastructure/graph_storage/index_optimization.py +446 -0
  158. aiecs-1.5.4/aiecs/infrastructure/graph_storage/lazy_loading.py +431 -0
  159. aiecs-1.5.4/aiecs/infrastructure/graph_storage/metrics.py +344 -0
  160. aiecs-1.5.4/aiecs/infrastructure/graph_storage/migration.py +393 -0
  161. aiecs-1.5.4/aiecs/infrastructure/graph_storage/pagination.py +483 -0
  162. aiecs-1.5.4/aiecs/infrastructure/graph_storage/performance_monitoring.py +456 -0
  163. aiecs-1.5.4/aiecs/infrastructure/graph_storage/postgres.py +838 -0
  164. aiecs-1.5.4/aiecs/infrastructure/graph_storage/protocols.py +76 -0
  165. aiecs-1.5.4/aiecs/infrastructure/graph_storage/query_optimizer.py +620 -0
  166. aiecs-1.5.4/aiecs/infrastructure/graph_storage/schema_cache.py +290 -0
  167. aiecs-1.5.4/aiecs/infrastructure/graph_storage/sqlite.py +648 -0
  168. aiecs-1.5.4/aiecs/infrastructure/graph_storage/streaming.py +487 -0
  169. aiecs-1.5.4/aiecs/infrastructure/messaging/__init__.py +13 -0
  170. aiecs-1.5.4/aiecs/infrastructure/messaging/celery_task_manager.py +379 -0
  171. aiecs-1.5.4/aiecs/infrastructure/messaging/websocket_manager.py +298 -0
  172. aiecs-1.5.4/aiecs/infrastructure/monitoring/__init__.py +34 -0
  173. aiecs-1.5.4/aiecs/infrastructure/monitoring/executor_metrics.py +172 -0
  174. aiecs-1.5.4/aiecs/infrastructure/monitoring/global_metrics_manager.py +212 -0
  175. aiecs-1.5.4/aiecs/infrastructure/monitoring/structured_logger.py +46 -0
  176. aiecs-1.5.4/aiecs/infrastructure/monitoring/tracing_manager.py +404 -0
  177. aiecs-1.5.4/aiecs/infrastructure/persistence/__init__.py +24 -0
  178. aiecs-1.5.4/aiecs/infrastructure/persistence/context_engine_client.py +184 -0
  179. aiecs-1.5.4/aiecs/infrastructure/persistence/database_manager.py +331 -0
  180. aiecs-1.5.4/aiecs/infrastructure/persistence/file_storage.py +726 -0
  181. aiecs-1.5.4/aiecs/infrastructure/persistence/redis_client.py +215 -0
  182. aiecs-1.5.4/aiecs/llm/__init__.py +100 -0
  183. aiecs-1.5.4/aiecs/llm/callbacks/__init__.py +11 -0
  184. aiecs-1.5.4/aiecs/llm/callbacks/custom_callbacks.py +235 -0
  185. aiecs-1.5.4/aiecs/llm/client_factory.py +525 -0
  186. aiecs-1.5.4/aiecs/llm/client_resolver.py +151 -0
  187. aiecs-1.5.4/aiecs/llm/clients/__init__.py +33 -0
  188. aiecs-1.5.4/aiecs/llm/clients/base_client.py +180 -0
  189. aiecs-1.5.4/aiecs/llm/clients/googleai_client.py +179 -0
  190. aiecs-1.5.4/aiecs/llm/clients/openai_client.py +135 -0
  191. aiecs-1.5.4/aiecs/llm/clients/vertex_client.py +398 -0
  192. aiecs-1.5.4/aiecs/llm/clients/xai_client.py +186 -0
  193. aiecs-1.5.4/aiecs/llm/config/__init__.py +51 -0
  194. aiecs-1.5.4/aiecs/llm/config/config_loader.py +271 -0
  195. aiecs-1.5.4/aiecs/llm/config/config_validator.py +206 -0
  196. aiecs-1.5.4/aiecs/llm/config/model_config.py +143 -0
  197. aiecs-1.5.4/aiecs/llm/protocols.py +149 -0
  198. aiecs-1.5.4/aiecs/llm/utils/__init__.py +10 -0
  199. aiecs-1.5.4/aiecs/llm/utils/validate_config.py +89 -0
  200. aiecs-1.5.4/aiecs/main.py +364 -0
  201. aiecs-1.5.4/aiecs/scripts/__init__.py +3 -0
  202. aiecs-1.5.4/aiecs/scripts/aid/VERSION_MANAGEMENT.md +97 -0
  203. aiecs-1.5.4/aiecs/scripts/aid/__init__.py +19 -0
  204. aiecs-1.5.4/aiecs/scripts/aid/version_manager.py +209 -0
  205. aiecs-1.5.4/aiecs/scripts/dependance_check/DEPENDENCY_SYSTEM_SUMMARY.md +242 -0
  206. aiecs-1.5.4/aiecs/scripts/dependance_check/README_DEPENDENCY_CHECKER.md +310 -0
  207. aiecs-1.5.4/aiecs/scripts/dependance_check/__init__.py +17 -0
  208. aiecs-1.5.4/aiecs/scripts/dependance_check/dependency_checker.py +925 -0
  209. aiecs-1.5.4/aiecs/scripts/dependance_check/dependency_fixer.py +389 -0
  210. aiecs-1.5.4/aiecs/scripts/dependance_check/download_nlp_data.py +392 -0
  211. aiecs-1.5.4/aiecs/scripts/dependance_check/quick_dependency_check.py +270 -0
  212. aiecs-1.5.4/aiecs/scripts/dependance_check/setup_nlp_data.sh +217 -0
  213. aiecs-1.5.4/aiecs/scripts/dependance_patch/__init__.py +7 -0
  214. aiecs-1.5.4/aiecs/scripts/dependance_patch/fix_weasel/README_WEASEL_PATCH.md +126 -0
  215. aiecs-1.5.4/aiecs/scripts/dependance_patch/fix_weasel/__init__.py +11 -0
  216. aiecs-1.5.4/aiecs/scripts/dependance_patch/fix_weasel/fix_weasel_validator.py +128 -0
  217. aiecs-1.5.4/aiecs/scripts/dependance_patch/fix_weasel/fix_weasel_validator.sh +82 -0
  218. aiecs-1.5.4/aiecs/scripts/dependance_patch/fix_weasel/patch_weasel_library.sh +188 -0
  219. aiecs-1.5.4/aiecs/scripts/dependance_patch/fix_weasel/run_weasel_patch.sh +41 -0
  220. aiecs-1.5.4/aiecs/scripts/tools_develop/README.md +449 -0
  221. aiecs-1.5.4/aiecs/scripts/tools_develop/TOOL_AUTO_DISCOVERY.md +234 -0
  222. aiecs-1.5.4/aiecs/scripts/tools_develop/__init__.py +21 -0
  223. aiecs-1.5.4/aiecs/scripts/tools_develop/check_type_annotations.py +257 -0
  224. aiecs-1.5.4/aiecs/scripts/tools_develop/validate_tool_schemas.py +399 -0
  225. aiecs-1.5.4/aiecs/scripts/tools_develop/verify_tools.py +352 -0
  226. aiecs-1.5.4/aiecs/tasks/__init__.py +1 -0
  227. aiecs-1.5.4/aiecs/tasks/worker.py +177 -0
  228. aiecs-1.5.4/aiecs/tools/__init__.py +300 -0
  229. aiecs-1.5.4/aiecs/tools/apisource/__init__.py +99 -0
  230. aiecs-1.5.4/aiecs/tools/apisource/intelligence/__init__.py +19 -0
  231. aiecs-1.5.4/aiecs/tools/apisource/intelligence/data_fusion.py +380 -0
  232. aiecs-1.5.4/aiecs/tools/apisource/intelligence/query_analyzer.py +417 -0
  233. aiecs-1.5.4/aiecs/tools/apisource/intelligence/search_enhancer.py +385 -0
  234. aiecs-1.5.4/aiecs/tools/apisource/monitoring/__init__.py +9 -0
  235. aiecs-1.5.4/aiecs/tools/apisource/monitoring/metrics.py +330 -0
  236. aiecs-1.5.4/aiecs/tools/apisource/providers/__init__.py +112 -0
  237. aiecs-1.5.4/aiecs/tools/apisource/providers/base.py +645 -0
  238. aiecs-1.5.4/aiecs/tools/apisource/providers/census.py +397 -0
  239. aiecs-1.5.4/aiecs/tools/apisource/providers/fred.py +535 -0
  240. aiecs-1.5.4/aiecs/tools/apisource/providers/newsapi.py +409 -0
  241. aiecs-1.5.4/aiecs/tools/apisource/providers/worldbank.py +352 -0
  242. aiecs-1.5.4/aiecs/tools/apisource/reliability/__init__.py +12 -0
  243. aiecs-1.5.4/aiecs/tools/apisource/reliability/error_handler.py +363 -0
  244. aiecs-1.5.4/aiecs/tools/apisource/reliability/fallback_strategy.py +376 -0
  245. aiecs-1.5.4/aiecs/tools/apisource/tool.py +808 -0
  246. aiecs-1.5.4/aiecs/tools/apisource/utils/__init__.py +9 -0
  247. aiecs-1.5.4/aiecs/tools/apisource/utils/validators.py +334 -0
  248. aiecs-1.5.4/aiecs/tools/base_tool.py +195 -0
  249. aiecs-1.5.4/aiecs/tools/docs/__init__.py +121 -0
  250. aiecs-1.5.4/aiecs/tools/docs/ai_document_orchestrator.py +590 -0
  251. aiecs-1.5.4/aiecs/tools/docs/ai_document_writer_orchestrator.py +2312 -0
  252. aiecs-1.5.4/aiecs/tools/docs/content_insertion_tool.py +1289 -0
  253. aiecs-1.5.4/aiecs/tools/docs/document_creator_tool.py +1301 -0
  254. aiecs-1.5.4/aiecs/tools/docs/document_layout_tool.py +1136 -0
  255. aiecs-1.5.4/aiecs/tools/docs/document_parser_tool.py +968 -0
  256. aiecs-1.5.4/aiecs/tools/docs/document_writer_tool.py +1765 -0
  257. aiecs-1.5.4/aiecs/tools/knowledge_graph/__init__.py +17 -0
  258. aiecs-1.5.4/aiecs/tools/knowledge_graph/graph_reasoning_tool.py +719 -0
  259. aiecs-1.5.4/aiecs/tools/knowledge_graph/graph_search_tool.py +903 -0
  260. aiecs-1.5.4/aiecs/tools/knowledge_graph/kg_builder_tool.py +467 -0
  261. aiecs-1.5.4/aiecs/tools/langchain_adapter.py +523 -0
  262. aiecs-1.5.4/aiecs/tools/schema_generator.py +272 -0
  263. aiecs-1.5.4/aiecs/tools/search_tool/__init__.py +100 -0
  264. aiecs-1.5.4/aiecs/tools/search_tool/analyzers.py +581 -0
  265. aiecs-1.5.4/aiecs/tools/search_tool/cache.py +264 -0
  266. aiecs-1.5.4/aiecs/tools/search_tool/constants.py +128 -0
  267. aiecs-1.5.4/aiecs/tools/search_tool/context.py +224 -0
  268. aiecs-1.5.4/aiecs/tools/search_tool/core.py +695 -0
  269. aiecs-1.5.4/aiecs/tools/search_tool/deduplicator.py +119 -0
  270. aiecs-1.5.4/aiecs/tools/search_tool/error_handler.py +242 -0
  271. aiecs-1.5.4/aiecs/tools/search_tool/metrics.py +343 -0
  272. aiecs-1.5.4/aiecs/tools/search_tool/rate_limiter.py +172 -0
  273. aiecs-1.5.4/aiecs/tools/search_tool/schemas.py +275 -0
  274. aiecs-1.5.4/aiecs/tools/statistics/__init__.py +80 -0
  275. aiecs-1.5.4/aiecs/tools/statistics/ai_data_analysis_orchestrator.py +629 -0
  276. aiecs-1.5.4/aiecs/tools/statistics/ai_insight_generator_tool.py +491 -0
  277. aiecs-1.5.4/aiecs/tools/statistics/ai_report_orchestrator_tool.py +667 -0
  278. aiecs-1.5.4/aiecs/tools/statistics/data_loader_tool.py +542 -0
  279. aiecs-1.5.4/aiecs/tools/statistics/data_profiler_tool.py +625 -0
  280. aiecs-1.5.4/aiecs/tools/statistics/data_transformer_tool.py +567 -0
  281. aiecs-1.5.4/aiecs/tools/statistics/data_visualizer_tool.py +485 -0
  282. aiecs-1.5.4/aiecs/tools/statistics/model_trainer_tool.py +483 -0
  283. aiecs-1.5.4/aiecs/tools/statistics/statistical_analyzer_tool.py +455 -0
  284. aiecs-1.5.4/aiecs/tools/task_tools/__init__.py +86 -0
  285. aiecs-1.5.4/aiecs/tools/task_tools/chart_tool.py +707 -0
  286. aiecs-1.5.4/aiecs/tools/task_tools/classfire_tool.py +896 -0
  287. aiecs-1.5.4/aiecs/tools/task_tools/image_tool.py +427 -0
  288. aiecs-1.5.4/aiecs/tools/task_tools/office_tool.py +667 -0
  289. aiecs-1.5.4/aiecs/tools/task_tools/pandas_tool.py +663 -0
  290. aiecs-1.5.4/aiecs/tools/task_tools/report_tool.py +646 -0
  291. aiecs-1.5.4/aiecs/tools/task_tools/research_tool.py +370 -0
  292. aiecs-1.5.4/aiecs/tools/task_tools/scraper_tool.py +701 -0
  293. aiecs-1.5.4/aiecs/tools/task_tools/stats_tool.py +646 -0
  294. aiecs-1.5.4/aiecs/tools/temp_file_manager.py +128 -0
  295. aiecs-1.5.4/aiecs/tools/tool_executor/__init__.py +37 -0
  296. aiecs-1.5.4/aiecs/tools/tool_executor/tool_executor.py +826 -0
  297. aiecs-1.5.4/aiecs/utils/LLM_output_structor.py +435 -0
  298. aiecs-1.5.4/aiecs/utils/__init__.py +34 -0
  299. aiecs-1.5.4/aiecs/utils/base_callback.py +47 -0
  300. aiecs-1.5.4/aiecs/utils/cache_provider.py +695 -0
  301. aiecs-1.5.4/aiecs/utils/execution_utils.py +177 -0
  302. aiecs-1.5.4/aiecs/utils/logging.py +1 -0
  303. aiecs-1.5.4/aiecs/utils/prompt_loader.py +14 -0
  304. aiecs-1.5.4/aiecs/utils/token_usage_repository.py +305 -0
  305. aiecs-1.5.4/aiecs/ws/__init__.py +0 -0
  306. aiecs-1.5.4/aiecs/ws/socket_server.py +48 -0
  307. aiecs-1.5.4/aiecs.egg-info/PKG-INFO +614 -0
  308. aiecs-1.5.4/aiecs.egg-info/SOURCES.txt +312 -0
  309. aiecs-1.5.4/aiecs.egg-info/dependency_links.txt +1 -0
  310. aiecs-1.5.4/aiecs.egg-info/entry_points.txt +10 -0
  311. aiecs-1.5.4/aiecs.egg-info/requires.txt +68 -0
  312. aiecs-1.5.4/aiecs.egg-info/top_level.txt +1 -0
  313. aiecs-1.5.4/pyproject.toml +237 -0
  314. aiecs-1.5.4/setup.cfg +4 -0
aiecs-1.5.4/LICENSE ADDED
@@ -0,0 +1,225 @@
1
+ <<<<<<< HEAD
2
+ MIT License
3
+
4
+ Copyright (c) 2024 AIECS Team
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+ =======
24
+ Apache License
25
+ Version 2.0, January 2004
26
+ http://www.apache.org/licenses/
27
+
28
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
29
+
30
+ 1. Definitions.
31
+
32
+ "License" shall mean the terms and conditions for use, reproduction,
33
+ and distribution as defined by Sections 1 through 9 of this document.
34
+
35
+ "Licensor" shall mean the copyright owner or entity authorized by
36
+ the copyright owner that is granting the License.
37
+
38
+ "Legal Entity" shall mean the union of the acting entity and all
39
+ other entities that control, are controlled by, or are under common
40
+ control with that entity. For the purposes of this definition,
41
+ "control" means (i) the power, direct or indirect, to cause the
42
+ direction or management of such entity, whether by contract or
43
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
44
+ outstanding shares, or (iii) beneficial ownership of such entity.
45
+
46
+ "You" (or "Your") shall mean an individual or Legal Entity
47
+ exercising permissions granted by this License.
48
+
49
+ "Source" form shall mean the preferred form for making modifications,
50
+ including but not limited to software source code, documentation
51
+ source, and configuration files.
52
+
53
+ "Object" form shall mean any form resulting from mechanical
54
+ transformation or translation of a Source form, including but
55
+ not limited to compiled object code, generated documentation,
56
+ and conversions to other media types.
57
+
58
+ "Work" shall mean the work of authorship, whether in Source or
59
+ Object form, made available under the License, as indicated by a
60
+ copyright notice that is included in or attached to the work
61
+ (an example is provided in the Appendix below).
62
+
63
+ "Derivative Works" shall mean any work, whether in Source or Object
64
+ form, that is based on (or derived from) the Work and for which the
65
+ editorial revisions, annotations, elaborations, or other modifications
66
+ represent, as a whole, an original work of authorship. For the purposes
67
+ of this License, Derivative Works shall not include works that remain
68
+ separable from, or merely link (or bind by name) to the interfaces of,
69
+ the Work and Derivative Works thereof.
70
+
71
+ "Contribution" shall mean any work of authorship, including
72
+ the original version of the Work and any modifications or additions
73
+ to that Work or Derivative Works thereof, that is intentionally
74
+ submitted to Licensor for inclusion in the Work by the copyright owner
75
+ or by an individual or Legal Entity authorized to submit on behalf of
76
+ the copyright owner. For the purposes of this definition, "submitted"
77
+ means any form of electronic, verbal, or written communication sent
78
+ to the Licensor or its representatives, including but not limited to
79
+ communication on electronic mailing lists, source code control systems,
80
+ and issue tracking systems that are managed by, or on behalf of, the
81
+ Licensor for the purpose of discussing and improving the Work, but
82
+ excluding communication that is conspicuously marked or otherwise
83
+ designated in writing by the copyright owner as "Not a Contribution."
84
+
85
+ "Contributor" shall mean Licensor and any individual or Legal Entity
86
+ on behalf of whom a Contribution has been received by Licensor and
87
+ subsequently incorporated within the Work.
88
+
89
+ 2. Grant of Copyright License. Subject to the terms and conditions of
90
+ this License, each Contributor hereby grants to You a perpetual,
91
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
92
+ copyright license to reproduce, prepare Derivative Works of,
93
+ publicly display, publicly perform, sublicense, and distribute the
94
+ Work and such Derivative Works in Source or Object form.
95
+
96
+ 3. Grant of Patent License. Subject to the terms and conditions of
97
+ this License, each Contributor hereby grants to You a perpetual,
98
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
99
+ (except as stated in this section) patent license to make, have made,
100
+ use, offer to sell, sell, import, and otherwise transfer the Work,
101
+ where such license applies only to those patent claims licensable
102
+ by such Contributor that are necessarily infringed by their
103
+ Contribution(s) alone or by combination of their Contribution(s)
104
+ with the Work to which such Contribution(s) was submitted. If You
105
+ institute patent litigation against any entity (including a
106
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
107
+ or a Contribution incorporated within the Work constitutes direct
108
+ or contributory patent infringement, then any patent licenses
109
+ granted to You under this License for that Work shall terminate
110
+ as of the date such litigation is filed.
111
+
112
+ 4. Redistribution. You may reproduce and distribute copies of the
113
+ Work or Derivative Works thereof in any medium, with or without
114
+ modifications, and in Source or Object form, provided that You
115
+ meet the following conditions:
116
+
117
+ (a) You must give any other recipients of the Work or
118
+ Derivative Works a copy of this License; and
119
+
120
+ (b) You must cause any modified files to carry prominent notices
121
+ stating that You changed the files; and
122
+
123
+ (c) You must retain, in the Source form of any Derivative Works
124
+ that You distribute, all copyright, patent, trademark, and
125
+ attribution notices from the Source form of the Work,
126
+ excluding those notices that do not pertain to any part of
127
+ the Derivative Works; and
128
+
129
+ (d) If the Work includes a "NOTICE" text file as part of its
130
+ distribution, then any Derivative Works that You distribute must
131
+ include a readable copy of the attribution notices contained
132
+ within such NOTICE file, excluding those notices that do not
133
+ pertain to any part of the Derivative Works, in at least one
134
+ of the following places: within a NOTICE text file distributed
135
+ as part of the Derivative Works; within the Source form or
136
+ documentation, if provided along with the Derivative Works; or,
137
+ within a display generated by the Derivative Works, if and
138
+ wherever such third-party notices normally appear. The contents
139
+ of the NOTICE file are for informational purposes only and
140
+ do not modify the License. You may add Your own attribution
141
+ notices within Derivative Works that You distribute, alongside
142
+ or as an addendum to the NOTICE text from the Work, provided
143
+ that such additional attribution notices cannot be construed
144
+ as modifying the License.
145
+
146
+ You may add Your own copyright statement to Your modifications and
147
+ may provide additional or different license terms and conditions
148
+ for use, reproduction, or distribution of Your modifications, or
149
+ for any such Derivative Works as a whole, provided Your use,
150
+ reproduction, and distribution of the Work otherwise complies with
151
+ the conditions stated in this License.
152
+
153
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
154
+ any Contribution intentionally submitted for inclusion in the Work
155
+ by You to the Licensor shall be under the terms and conditions of
156
+ this License, without any additional terms or conditions.
157
+ Notwithstanding the above, nothing herein shall supersede or modify
158
+ the terms of any separate license agreement you may have executed
159
+ with Licensor regarding such Contributions.
160
+
161
+ 6. Trademarks. This License does not grant permission to use the trade
162
+ names, trademarks, service marks, or product names of the Licensor,
163
+ except as required for reasonable and customary use in describing the
164
+ origin of the Work and reproducing the content of the NOTICE file.
165
+
166
+ 7. Disclaimer of Warranty. Unless required by applicable law or
167
+ agreed to in writing, Licensor provides the Work (and each
168
+ Contributor provides its Contributions) on an "AS IS" BASIS,
169
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
170
+ implied, including, without limitation, any warranties or conditions
171
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
172
+ PARTICULAR PURPOSE. You are solely responsible for determining the
173
+ appropriateness of using or redistributing the Work and assume any
174
+ risks associated with Your exercise of permissions under this License.
175
+
176
+ 8. Limitation of Liability. In no event and under no legal theory,
177
+ whether in tort (including negligence), contract, or otherwise,
178
+ unless required by applicable law (such as deliberate and grossly
179
+ negligent acts) or agreed to in writing, shall any Contributor be
180
+ liable to You for damages, including any direct, indirect, special,
181
+ incidental, or consequential damages of any character arising as a
182
+ result of this License or out of the use or inability to use the
183
+ Work (including but not limited to damages for loss of goodwill,
184
+ work stoppage, computer failure or malfunction, or any and all
185
+ other commercial damages or losses), even if such Contributor
186
+ has been advised of the possibility of such damages.
187
+
188
+ 9. Accepting Warranty or Additional Liability. While redistributing
189
+ the Work or Derivative Works thereof, You may choose to offer,
190
+ and charge a fee for, acceptance of support, warranty, indemnity,
191
+ or other liability obligations and/or rights consistent with this
192
+ License. However, in accepting such obligations, You may act only
193
+ on Your own behalf and on Your sole responsibility, not on behalf
194
+ of any other Contributor, and only if You agree to indemnify,
195
+ defend, and hold each Contributor harmless for any liability
196
+ incurred by, or claims asserted against, such Contributor by reason
197
+ of your accepting any such warranty or additional liability.
198
+
199
+ END OF TERMS AND CONDITIONS
200
+
201
+ APPENDIX: How to apply the Apache License to your work.
202
+
203
+ To apply the Apache License to your work, attach the following
204
+ boilerplate notice, with the fields enclosed by brackets "[]"
205
+ replaced with your own identifying information. (Don't include
206
+ the brackets!) The text should be enclosed in the appropriate
207
+ comment syntax for the file format. We also recommend that a
208
+ file or class name and description of purpose be included on the
209
+ same "printed page" as the copyright notice for easier
210
+ identification within third-party archives.
211
+
212
+ Copyright [yyyy] [name of copyright owner]
213
+
214
+ Licensed under the Apache License, Version 2.0 (the "License");
215
+ you may not use this file except in compliance with the License.
216
+ You may obtain a copy of the License at
217
+
218
+ http://www.apache.org/licenses/LICENSE-2.0
219
+
220
+ Unless required by applicable law or agreed to in writing, software
221
+ distributed under the License is distributed on an "AS IS" BASIS,
222
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
223
+ See the License for the specific language governing permissions and
224
+ limitations under the License.
225
+ >>>>>>> c05fb934339f374c0a2d4c50915cbec773c3534c
@@ -0,0 +1,14 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ recursive-include aiecs *.py
5
+ recursive-include aiecs/scripts *.md *.sh
6
+ global-exclude __pycache__
7
+ global-exclude *.py[co]
8
+ global-exclude .DS_Store
9
+ global-exclude *.log
10
+ global-exclude test*
11
+ global-exclude tests*
12
+ global-exclude htmlcov*
13
+ global-exclude setup.py
14
+ global-exclude *test*.py