trustgraph-flow 0.23.13__tar.gz → 0.23.14__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 (319) hide show
  1. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/PKG-INFO +2 -2
  2. trustgraph-flow-0.23.14/scripts/kg-manager +6 -0
  3. trustgraph-flow-0.23.14/scripts/kg-store +6 -0
  4. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/setup.py +2 -0
  5. trustgraph-flow-0.23.14/trustgraph/cores/__init__.py +3 -0
  6. trustgraph-flow-0.23.14/trustgraph/cores/__main__.py +5 -0
  7. trustgraph-flow-0.23.14/trustgraph/cores/knowledge.py +104 -0
  8. trustgraph-flow-0.23.14/trustgraph/cores/service.py +228 -0
  9. trustgraph-flow-0.23.14/trustgraph/flow_version.py +1 -0
  10. trustgraph-flow-0.23.14/trustgraph/gateway/dispatch/knowledge.py +68 -0
  11. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/manager.py +2 -0
  12. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/requestor.py +1 -1
  13. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/librarian/librarian.py +2 -2
  14. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/librarian/service.py +1 -1
  15. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/cohere/llm.py +2 -0
  16. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/lmstudio/llm.py +0 -1
  17. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/mistral/llm.py +2 -0
  18. trustgraph-flow-0.23.14/trustgraph/storage/knowledge/__init__.py +3 -0
  19. trustgraph-flow-0.23.14/trustgraph/storage/knowledge/__main__.py +5 -0
  20. trustgraph-flow-0.23.14/trustgraph/storage/knowledge/store.py +78 -0
  21. trustgraph-flow-0.23.14/trustgraph/tables/__init__.py +0 -0
  22. trustgraph-flow-0.23.14/trustgraph/tables/knowledge.py +504 -0
  23. trustgraph-flow-0.23.13/trustgraph/librarian/table_store.py → trustgraph-flow-0.23.14/trustgraph/tables/library.py +1 -228
  24. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph_flow.egg-info/PKG-INFO +2 -2
  25. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph_flow.egg-info/SOURCES.txt +13 -1
  26. trustgraph-flow-0.23.13/trustgraph/flow_version.py +0 -1
  27. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/README.md +0 -0
  28. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/agent-manager-react +0 -0
  29. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/api-gateway +0 -0
  30. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/chunker-recursive +0 -0
  31. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/chunker-token +0 -0
  32. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/config-svc +0 -0
  33. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/de-query-milvus +0 -0
  34. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/de-query-pinecone +0 -0
  35. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/de-query-qdrant +0 -0
  36. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/de-write-milvus +0 -0
  37. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/de-write-pinecone +0 -0
  38. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/de-write-qdrant +0 -0
  39. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/document-embeddings +0 -0
  40. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/document-rag +0 -0
  41. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/embeddings-fastembed +0 -0
  42. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/embeddings-ollama +0 -0
  43. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/ge-query-milvus +0 -0
  44. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/ge-query-pinecone +0 -0
  45. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/ge-query-qdrant +0 -0
  46. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/ge-write-milvus +0 -0
  47. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/ge-write-pinecone +0 -0
  48. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/ge-write-qdrant +0 -0
  49. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/graph-embeddings +0 -0
  50. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/graph-rag +0 -0
  51. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/kg-extract-definitions +0 -0
  52. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/kg-extract-relationships +0 -0
  53. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/kg-extract-topics +0 -0
  54. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/librarian +0 -0
  55. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/metering +0 -0
  56. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/object-extract-row +0 -0
  57. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/oe-write-milvus +0 -0
  58. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/pdf-decoder +0 -0
  59. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/pdf-ocr-mistral +0 -0
  60. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/prompt-generic +0 -0
  61. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/prompt-template +0 -0
  62. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/rows-write-cassandra +0 -0
  63. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/run-processing +0 -0
  64. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-azure +0 -0
  65. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-azure-openai +0 -0
  66. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-claude +0 -0
  67. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-cohere +0 -0
  68. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-googleaistudio +0 -0
  69. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-llamafile +0 -0
  70. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-lmstudio +0 -0
  71. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-mistral +0 -0
  72. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-ollama +0 -0
  73. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/text-completion-openai +0 -0
  74. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-query-cassandra +0 -0
  75. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-query-falkordb +0 -0
  76. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-query-memgraph +0 -0
  77. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-query-neo4j +0 -0
  78. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-write-cassandra +0 -0
  79. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-write-falkordb +0 -0
  80. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-write-memgraph +0 -0
  81. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/triples-write-neo4j +0 -0
  82. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/scripts/wikipedia-lookup +0 -0
  83. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/setup.cfg +0 -0
  84. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/__init__.py +0 -0
  85. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/agent/__init__.py +0 -0
  86. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/agent/react/__init__.py +0 -0
  87. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/agent/react/__main__.py +0 -0
  88. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/agent/react/agent_manager.py +0 -0
  89. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/agent/react/service.py +0 -0
  90. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/agent/react/tools.py +0 -0
  91. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/agent/react/types.py +0 -0
  92. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/chunking/__init__.py +0 -0
  93. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/chunking/recursive/__init__.py +0 -0
  94. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/chunking/recursive/__main__.py +0 -0
  95. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/chunking/recursive/chunker.py +0 -0
  96. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/chunking/token/__init__.py +0 -0
  97. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/chunking/token/__main__.py +0 -0
  98. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/chunking/token/chunker.py +0 -0
  99. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/config/service/__init__.py +0 -0
  100. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/config/service/__main__.py +0 -0
  101. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/config/service/config.py +0 -0
  102. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/config/service/flow.py +0 -0
  103. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/config/service/service.py +0 -0
  104. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/decoding/__init__.py +0 -0
  105. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
  106. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
  107. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
  108. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/decoding/pdf/__init__.py +0 -0
  109. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/decoding/pdf/__main__.py +0 -0
  110. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
  111. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/direct/__init__.py +0 -0
  112. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/direct/cassandra.py +0 -0
  113. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
  114. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
  115. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/direct/milvus_object_embeddings.py +0 -0
  116. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/__init__.py +0 -0
  117. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
  118. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
  119. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
  120. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/fastembed/__init__.py +0 -0
  121. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/fastembed/__main__.py +0 -0
  122. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/fastembed/processor.py +0 -0
  123. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
  124. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
  125. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
  126. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/ollama/__init__.py +0 -0
  127. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/ollama/__main__.py +0 -0
  128. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/embeddings/ollama/processor.py +0 -0
  129. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/external/__init__.py +0 -0
  130. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/external/wikipedia/__init__.py +0 -0
  131. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/external/wikipedia/__main__.py +0 -0
  132. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/external/wikipedia/service.py +0 -0
  133. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/__init__.py +0 -0
  134. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/__init__.py +0 -0
  135. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/definitions/__init__.py +0 -0
  136. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/definitions/__main__.py +0 -0
  137. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/definitions/extract.py +0 -0
  138. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/relationships/__init__.py +0 -0
  139. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/relationships/__main__.py +0 -0
  140. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/relationships/extract.py +0 -0
  141. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/topics/__init__.py +0 -0
  142. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/topics/__main__.py +0 -0
  143. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/kg/topics/extract.py +0 -0
  144. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/object/__init__.py +0 -0
  145. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/object/row/__init__.py +0 -0
  146. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/object/row/__main__.py +0 -0
  147. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/extract/object/row/extract.py +0 -0
  148. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/__init__.py +0 -0
  149. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/__main__.py +0 -0
  150. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/auth.py +0 -0
  151. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/config/receiver.py +0 -0
  152. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/agent.py +0 -0
  153. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/config.py +0 -0
  154. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
  155. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
  156. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/document_load.py +0 -0
  157. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/document_rag.py +0 -0
  158. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/embeddings.py +0 -0
  159. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/flow.py +0 -0
  160. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
  161. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
  162. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
  163. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
  164. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/librarian.py +0 -0
  165. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/mux.py +0 -0
  166. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/prompt.py +0 -0
  167. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/sender.py +0 -0
  168. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/serialize.py +0 -0
  169. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/streamer.py +0 -0
  170. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/text_completion.py +0 -0
  171. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/text_load.py +0 -0
  172. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/triples_export.py +0 -0
  173. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/triples_import.py +0 -0
  174. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/dispatch/triples_query.py +0 -0
  175. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
  176. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/endpoint/manager.py +0 -0
  177. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/endpoint/metrics.py +0 -0
  178. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/endpoint/socket.py +0 -0
  179. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
  180. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/running.py +0 -0
  181. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/service.py +0 -0
  182. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/unused/dbpedia.py +0 -0
  183. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/unused/encyclopedia.py +0 -0
  184. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/gateway/unused/internet_search.py +0 -0
  185. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/librarian/__init__.py +0 -0
  186. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/librarian/__main__.py +0 -0
  187. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/librarian/blob_store.py +0 -0
  188. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/metering/__init__.py +0 -0
  189. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/metering/__main__.py +0 -0
  190. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/metering/counter.py +0 -0
  191. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/__init__.py +0 -0
  192. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/__init__.py +0 -0
  193. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/generic/__init__.py +0 -0
  194. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/generic/__main__.py +0 -0
  195. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/generic/prompts.py +0 -0
  196. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/generic/service.py +0 -0
  197. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/template/__init__.py +0 -0
  198. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/template/__main__.py +0 -0
  199. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/template/prompt_manager.py +0 -0
  200. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/prompt/template/service.py +0 -0
  201. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/__init__.py +0 -0
  202. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/azure/__init__.py +0 -0
  203. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/azure/__main__.py +0 -0
  204. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/azure/llm.py +0 -0
  205. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
  206. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
  207. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
  208. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/claude/__init__.py +0 -0
  209. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/claude/__main__.py +0 -0
  210. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/claude/llm.py +0 -0
  211. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
  212. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
  213. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
  214. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
  215. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
  216. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
  217. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
  218. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
  219. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
  220. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
  221. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
  222. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
  223. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
  224. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
  225. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/ollama/llm.py +0 -0
  226. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/openai/__init__.py +0 -0
  227. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/openai/__main__.py +0 -0
  228. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/model/text_completion/openai/llm.py +0 -0
  229. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/processing/__init__.py +0 -0
  230. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/processing/__main__.py +0 -0
  231. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/processing/processing.py +0 -0
  232. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/__init__.py +0 -0
  233. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/__init__.py +0 -0
  234. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
  235. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
  236. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
  237. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
  238. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
  239. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
  240. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
  241. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
  242. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
  243. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/__init__.py +0 -0
  244. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
  245. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
  246. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
  247. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
  248. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
  249. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
  250. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
  251. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
  252. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
  253. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/__init__.py +0 -0
  254. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/cassandra/__init__.py +0 -0
  255. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/cassandra/__main__.py +0 -0
  256. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/cassandra/service.py +0 -0
  257. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/falkordb/__init__.py +0 -0
  258. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/falkordb/__main__.py +0 -0
  259. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/falkordb/service.py +0 -0
  260. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/memgraph/__init__.py +0 -0
  261. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/memgraph/__main__.py +0 -0
  262. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/memgraph/service.py +0 -0
  263. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/neo4j/__init__.py +0 -0
  264. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/neo4j/__main__.py +0 -0
  265. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/query/triples/neo4j/service.py +0 -0
  266. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/__init__.py +0 -0
  267. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/document_rag/__init__.py +0 -0
  268. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/document_rag/__main__.py +0 -0
  269. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
  270. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/document_rag/rag.py +0 -0
  271. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
  272. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
  273. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
  274. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/retrieval/graph_rag/rag.py +0 -0
  275. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/__init__.py +0 -0
  276. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
  277. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
  278. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
  279. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
  280. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
  281. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
  282. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
  283. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
  284. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
  285. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
  286. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
  287. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
  288. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
  289. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
  290. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
  291. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
  292. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
  293. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
  294. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
  295. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
  296. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/object_embeddings/__init__.py +0 -0
  297. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
  298. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
  299. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
  300. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/rows/__init__.py +0 -0
  301. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
  302. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
  303. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/rows/cassandra/write.py +0 -0
  304. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/__init__.py +0 -0
  305. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
  306. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
  307. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/cassandra/write.py +0 -0
  308. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
  309. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
  310. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/falkordb/write.py +0 -0
  311. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
  312. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
  313. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/memgraph/write.py +0 -0
  314. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
  315. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
  316. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph/storage/triples/neo4j/write.py +0 -0
  317. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
  318. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph_flow.egg-info/requires.txt +0 -0
  319. {trustgraph-flow-0.23.13 → trustgraph-flow-0.23.14}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trustgraph-flow
3
- Version: 0.23.13
3
+ Version: 0.23.14
4
4
  Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
5
5
  Home-page: https://github.com/trustgraph-ai/trustgraph
6
- Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.13.tar.gz
6
+ Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.14.tar.gz
7
7
  Author: trustgraph.ai
8
8
  Author-email: security@trustgraph.ai
9
9
  Classifier: Programming Language :: Python :: 3
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env python3
2
+
3
+ from trustgraph.cores import run
4
+
5
+ run()
6
+
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env python3
2
+
3
+ from trustgraph.storage.knowledge import run
4
+
5
+ run()
6
+
@@ -95,6 +95,8 @@ setuptools.setup(
95
95
  "scripts/kg-extract-definitions",
96
96
  "scripts/kg-extract-relationships",
97
97
  "scripts/kg-extract-topics",
98
+ "scripts/kg-store",
99
+ "scripts/kg-manager",
98
100
  "scripts/librarian",
99
101
  "scripts/metering",
100
102
  "scripts/object-extract-row",
@@ -0,0 +1,3 @@
1
+
2
+ from . service import run
3
+
@@ -0,0 +1,5 @@
1
+
2
+ from . service import run
3
+
4
+ if __name__ == '__main__':
5
+ run()
@@ -0,0 +1,104 @@
1
+
2
+ from .. schema import KnowledgeResponse, Error
3
+ from .. knowledge import hash
4
+ from .. exceptions import RequestError
5
+ from .. tables.knowledge import KnowledgeTableStore
6
+ import base64
7
+
8
+ import uuid
9
+
10
+ class KnowledgeManager:
11
+
12
+ def __init__(
13
+ self, cassandra_host, cassandra_user, cassandra_password,
14
+ keyspace,
15
+ ):
16
+
17
+ self.table_store = KnowledgeTableStore(
18
+ cassandra_host, cassandra_user, cassandra_password, keyspace
19
+ )
20
+
21
+ async def delete_kg_core(self, request, respond):
22
+
23
+ print("Deleting core...", flush=True)
24
+
25
+ await self.table_store.delete_kg_core(
26
+ request.user, request.id
27
+ )
28
+
29
+ await respond(
30
+ KnowledgeResponse(
31
+ error = None,
32
+ ids = None,
33
+ eos = False,
34
+ triples = None,
35
+ graph_embeddings = None,
36
+ )
37
+ )
38
+
39
+ async def fetch_kg_core(self, request, respond):
40
+
41
+ print("Fetch core...", flush=True)
42
+
43
+ async def publish_triples(t):
44
+ await respond(
45
+ KnowledgeResponse(
46
+ error = None,
47
+ ids = None,
48
+ eos = False,
49
+ triples = t,
50
+ graph_embeddings = None,
51
+ )
52
+ )
53
+
54
+ # Remove doc table row
55
+ await self.table_store.get_triples(
56
+ request.user,
57
+ request.id,
58
+ publish_triples,
59
+ )
60
+
61
+ async def publish_ge(g):
62
+ await respond(
63
+ KnowledgeResponse(
64
+ error = None,
65
+ ids = None,
66
+ eos = False,
67
+ triples = None,
68
+ graph_embeddings = g,
69
+ )
70
+ )
71
+
72
+ # Remove doc table row
73
+ await self.table_store.get_graph_embeddings(
74
+ request.user,
75
+ request.id,
76
+ publish_ge,
77
+ )
78
+
79
+ print("Fetch complete", flush=True)
80
+
81
+ await respond(
82
+ KnowledgeResponse(
83
+ error = None,
84
+ ids = None,
85
+ eos = True,
86
+ triples = None,
87
+ graph_embeddings = None,
88
+ )
89
+ )
90
+
91
+ async def list_kg_cores(self, request, respond):
92
+
93
+ ids = await self.table_store.list_kg_cores(request.user)
94
+
95
+ await respond(
96
+ KnowledgeResponse(
97
+ error = None,
98
+ ids = ids,
99
+ eos = False,
100
+ triples = None,
101
+ graph_embeddings = None
102
+ )
103
+ )
104
+
@@ -0,0 +1,228 @@
1
+
2
+ """
3
+ Knowledge core service, manages cores and exports them
4
+ """
5
+
6
+ from functools import partial
7
+ import asyncio
8
+ import base64
9
+ import json
10
+
11
+ from .. base import AsyncProcessor, Consumer, Producer, Publisher, Subscriber
12
+ from .. base import ConsumerMetrics, ProducerMetrics
13
+
14
+ from .. schema import KnowledgeRequest, KnowledgeResponse, Error
15
+ from .. schema import knowledge_request_queue, knowledge_response_queue
16
+
17
+ from .. schema import Document, Metadata
18
+ from .. schema import TextDocument, Metadata
19
+
20
+ from .. exceptions import RequestError
21
+
22
+ from . knowledge import KnowledgeManager
23
+
24
+ default_ident = "knowledge"
25
+
26
+ default_knowledge_request_queue = knowledge_request_queue
27
+ default_knowledge_response_queue = knowledge_response_queue
28
+
29
+ default_cassandra_host = "cassandra"
30
+
31
+ # FIXME: How to ensure this doesn't conflict with other usage?
32
+ keyspace = "knowledge"
33
+
34
+ class Processor(AsyncProcessor):
35
+
36
+ def __init__(self, **params):
37
+
38
+ id = params.get("id")
39
+
40
+ knowledge_request_queue = params.get(
41
+ "knowledge_request_queue", default_knowledge_request_queue
42
+ )
43
+
44
+ knowledge_response_queue = params.get(
45
+ "knowledge_response_queue", default_knowledge_response_queue
46
+ )
47
+
48
+ cassandra_host = params.get("cassandra_host", default_cassandra_host)
49
+ cassandra_user = params.get("cassandra_user")
50
+ cassandra_password = params.get("cassandra_password")
51
+
52
+ super(Processor, self).__init__(
53
+ **params | {
54
+ "knowledge_request_queue": knowledge_request_queue,
55
+ "knowledge_response_queue": knowledge_response_queue,
56
+ "cassandra_host": cassandra_host,
57
+ "cassandra_user": cassandra_user,
58
+ }
59
+ )
60
+
61
+ knowledge_request_metrics = ConsumerMetrics(
62
+ processor = self.id, flow = None, name = "knowledge-request"
63
+ )
64
+
65
+ knowledge_response_metrics = ProducerMetrics(
66
+ processor = self.id, flow = None, name = "knowledge-response"
67
+ )
68
+
69
+ self.knowledge_request_consumer = Consumer(
70
+ taskgroup = self.taskgroup,
71
+ client = self.pulsar_client,
72
+ flow = None,
73
+ topic = knowledge_request_queue,
74
+ subscriber = id,
75
+ schema = KnowledgeRequest,
76
+ handler = self.on_knowledge_request,
77
+ metrics = knowledge_request_metrics,
78
+ )
79
+
80
+ self.knowledge_response_producer = Producer(
81
+ client = self.pulsar_client,
82
+ topic = knowledge_response_queue,
83
+ schema = KnowledgeResponse,
84
+ metrics = knowledge_response_metrics,
85
+ )
86
+
87
+ self.knowledge = KnowledgeManager(
88
+ cassandra_host = cassandra_host.split(","),
89
+ cassandra_user = cassandra_user,
90
+ cassandra_password = cassandra_password,
91
+ keyspace = keyspace,
92
+ )
93
+
94
+ self.register_config_handler(self.on_knowledge_config)
95
+
96
+ self.flows = {}
97
+
98
+ print("Initialised.", flush=True)
99
+
100
+ async def start(self):
101
+
102
+ await super(Processor, self).start()
103
+ await self.knowledge_request_consumer.start()
104
+ await self.knowledge_response_producer.start()
105
+
106
+ async def on_knowledge_config(self, config, version):
107
+
108
+ print("config version", version)
109
+
110
+ if "flows" in config:
111
+
112
+ self.flows = {
113
+ k: json.loads(v)
114
+ for k, v in config["flows"].items()
115
+ }
116
+
117
+ print(self.flows)
118
+
119
+ async def process_request(self, v, id):
120
+
121
+ if v.operation is None:
122
+ raise RequestError("Null operation")
123
+
124
+ print("request", v.operation)
125
+
126
+ impls = {
127
+ "list-kg-cores": self.knowledge.list_kg_cores,
128
+ "fetch-kg-core": self.knowledge.fetch_kg_core,
129
+ "delete-kg-core": self.knowledge.delete_kg_core,
130
+ }
131
+
132
+ if v.operation not in impls:
133
+ raise RequestError(f"Invalid operation: {v.operation}")
134
+
135
+ async def respond(x):
136
+ await self.knowledge_response_producer.send(
137
+ x, { "id": id }
138
+ )
139
+ return await impls[v.operation](v, respond)
140
+
141
+ async def on_knowledge_request(self, msg, consumer, flow):
142
+
143
+ v = msg.value()
144
+
145
+ # Sender-produced ID
146
+
147
+ id = msg.properties()["id"]
148
+
149
+ print(f"Handling input {id}...", flush=True)
150
+
151
+ try:
152
+
153
+ await self.process_request(v, id)
154
+
155
+ # await self.knowledge_response_producer.send(
156
+ # resp, properties={"id": id}
157
+ # )
158
+
159
+ return
160
+
161
+ except RequestError as e:
162
+ resp = KnowledgeResponse(
163
+ error = Error(
164
+ type = "request-error",
165
+ message = str(e),
166
+ )
167
+ )
168
+
169
+ await self.knowledge_response_producer.send(
170
+ resp, properties={"id": id}
171
+ )
172
+
173
+ return
174
+ except Exception as e:
175
+ resp = KnowledgeResponse(
176
+ error = Error(
177
+ type = "unexpected-error",
178
+ message = str(e),
179
+ )
180
+ )
181
+
182
+ await self.knowledge_response_producer.send(
183
+ resp, properties={"id": id}
184
+ )
185
+
186
+ return
187
+
188
+ print("Done.", flush=True)
189
+
190
+ @staticmethod
191
+ def add_args(parser):
192
+
193
+ AsyncProcessor.add_args(parser)
194
+
195
+ parser.add_argument(
196
+ '--knowledge-request-queue',
197
+ default=default_knowledge_request_queue,
198
+ help=f'Config request queue (default: {default_knowledge_request_queue})'
199
+ )
200
+
201
+ parser.add_argument(
202
+ '--knowledge-response-queue',
203
+ default=default_knowledge_response_queue,
204
+ help=f'Config response queue {default_knowledge_response_queue}',
205
+ )
206
+
207
+ parser.add_argument(
208
+ '--cassandra-host',
209
+ default="cassandra",
210
+ help=f'Graph host (default: cassandra)'
211
+ )
212
+
213
+ parser.add_argument(
214
+ '--cassandra-user',
215
+ default=None,
216
+ help=f'Cassandra user'
217
+ )
218
+
219
+ parser.add_argument(
220
+ '--cassandra-password',
221
+ default=None,
222
+ help=f'Cassandra password'
223
+ )
224
+
225
+ def run():
226
+
227
+ Processor.launch(default_ident, __doc__)
228
+
@@ -0,0 +1 @@
1
+ __version__ = "0.23.14"
@@ -0,0 +1,68 @@
1
+
2
+ import base64
3
+
4
+ from ... schema import KnowledgeRequest, KnowledgeResponse
5
+ from ... schema import knowledge_request_queue
6
+ from ... schema import knowledge_response_queue
7
+
8
+ from . requestor import ServiceRequestor
9
+ from . serialize import serialize_graph_embeddings
10
+ from . serialize import serialize_triples
11
+ from . serialize import to_document_metadata, to_processing_metadata
12
+
13
+ class KnowledgeRequestor(ServiceRequestor):
14
+ def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
15
+
16
+ super(KnowledgeRequestor, self).__init__(
17
+ pulsar_client=pulsar_client,
18
+ consumer_name = consumer,
19
+ subscription = subscriber,
20
+ request_queue=knowledge_request_queue,
21
+ response_queue=knowledge_response_queue,
22
+ request_schema=KnowledgeRequest,
23
+ response_schema=KnowledgeResponse,
24
+ timeout=timeout,
25
+ )
26
+
27
+ def to_request(self, body):
28
+
29
+ return KnowledgeRequest(
30
+ operation = body.get("operation", None),
31
+ user = body.get("user", None),
32
+ id = body.get("id", None),
33
+ )
34
+
35
+ def from_response(self, message):
36
+
37
+ print("Processing message")
38
+
39
+ # Response to list,
40
+ if message.ids is not None:
41
+ print("-> IDS")
42
+ return {
43
+ "ids": message.ids
44
+ }, True
45
+
46
+ if message.triples:
47
+ print("-> triples")
48
+ return {
49
+ "triples": serialize_triples(message.triples)
50
+ }, False
51
+
52
+ if message.graph_embeddings:
53
+ print("-> ge")
54
+ return {
55
+ "graph-embeddings": serialize_graph_embeddings(
56
+ message.graph_embeddings
57
+ )
58
+ }, False
59
+
60
+ if message.eos is True:
61
+ print("-> eos")
62
+ return {
63
+ "eos": True
64
+ }, True
65
+
66
+ # Empty case, return from successful delete.
67
+ return {}, True
68
+
@@ -5,6 +5,7 @@ import uuid
5
5
  from . config import ConfigRequestor
6
6
  from . flow import FlowRequestor
7
7
  from . librarian import LibrarianRequestor
8
+ from . knowledge import KnowledgeRequestor
8
9
 
9
10
  from . embeddings import EmbeddingsRequestor
10
11
  from . agent import AgentRequestor
@@ -44,6 +45,7 @@ global_dispatchers = {
44
45
  "config": ConfigRequestor,
45
46
  "flow": FlowRequestor,
46
47
  "librarian": LibrarianRequestor,
48
+ "knowledge": KnowledgeRequestor,
47
49
  }
48
50
 
49
51
  sender_dispatchers = {
@@ -82,7 +82,7 @@ class ServiceRequestor:
82
82
 
83
83
  resp, fin = self.from_response(resp)
84
84
 
85
- print(resp, fin)
85
+ print(resp, fin, flush=True)
86
86
 
87
87
  if responder:
88
88
  await responder(resp, fin)
@@ -2,7 +2,7 @@
2
2
  from .. schema import LibrarianRequest, LibrarianResponse, Error, Triple
3
3
  from .. knowledge import hash
4
4
  from .. exceptions import RequestError
5
- from . table_store import TableStore
5
+ from .. tables.library import LibraryTableStore
6
6
  from . blob_store import BlobStore
7
7
  import base64
8
8
 
@@ -21,7 +21,7 @@ class Librarian:
21
21
  minio_host, minio_access_key, minio_secret_key, bucket_name
22
22
  )
23
23
 
24
- self.table_store = TableStore(
24
+ self.table_store = LibraryTableStore(
25
25
  cassandra_host, cassandra_user, cassandra_password, keyspace
26
26
  )
27
27
 
@@ -210,7 +210,7 @@ class Processor(AsyncProcessor):
210
210
  if v.operation is None:
211
211
  raise RequestError("Null operation")
212
212
 
213
- print("requets", v.operation)
213
+ print("request", v.operation)
214
214
 
215
215
  impls = {
216
216
  "add-document": self.librarian.add_document,
@@ -70,6 +70,8 @@ class Processor(LlmService):
70
70
  model = self.model
71
71
  )
72
72
 
73
+ return resp
74
+
73
75
  # FIXME: Wrong exception, don't know what this LLM throws
74
76
  # for a rate limit
75
77
  except cohere.TooManyRequestsError:
@@ -12,7 +12,6 @@ from .... base import LlmService, LlmResult
12
12
 
13
13
  default_ident = "text-completion"
14
14
 
15
- default_subscriber = module
16
15
  default_model = 'gemma3:9b'
17
16
  default_url = os.getenv("LMSTUDIO_URL", "http://localhost:1234/")
18
17
  default_temperature = 0.0
@@ -86,6 +86,8 @@ class Processor(LlmService):
86
86
  model = self.model
87
87
  )
88
88
 
89
+ return resp
90
+
89
91
  # FIXME: Wrong exception. The MistralAI library has retry logic
90
92
  # so retry-able errors are retried transparently. It means we
91
93
  # don't get rate limit events.
@@ -0,0 +1,3 @@
1
+
2
+ from . store import run
3
+
@@ -0,0 +1,5 @@
1
+
2
+ from . store import run
3
+
4
+ if __name__ == '__main__':
5
+ run()
@@ -0,0 +1,78 @@
1
+
2
+ """
3
+ Stores knowledge-cores in Cassandra
4
+ """
5
+
6
+ import json
7
+ import urllib.parse
8
+
9
+ from ... schema import Triples, GraphEmbeddings
10
+ from ... base import FlowProcessor, ConsumerSpec
11
+
12
+ from ... tables.knowledge import KnowledgeTableStore
13
+
14
+ default_ident = "kg-store"
15
+
16
+ default_cassandra_host = "cassandra"
17
+ keyspace = "knowledge"
18
+
19
+ class Processor(FlowProcessor):
20
+
21
+ def __init__(self, **params):
22
+
23
+ id = params.get("id")
24
+
25
+ cassandra_host = params.get("cassandra_host", default_cassandra_host)
26
+ cassandra_user = params.get("cassandra_user")
27
+ cassandra_password = params.get("cassandra_password")
28
+
29
+ super(Processor, self).__init__(
30
+ **params | {
31
+ "id": id,
32
+ "cassandra_host": cassandra_host,
33
+ "cassandra_user": cassandra_user,
34
+ }
35
+ )
36
+
37
+ self.register_specification(
38
+ ConsumerSpec(
39
+ name = "triples-input",
40
+ schema = Triples,
41
+ handler = self.on_triples
42
+ )
43
+ )
44
+
45
+ self.register_specification(
46
+ ConsumerSpec(
47
+ name = "graph-embeddings-input",
48
+ schema = GraphEmbeddings,
49
+ handler = self.on_graph_embeddings
50
+ )
51
+ )
52
+
53
+ self.table_store = KnowledgeTableStore(
54
+ cassandra_host = cassandra_host.split(","),
55
+ cassandra_user = cassandra_user,
56
+ cassandra_password = cassandra_password,
57
+ keyspace = keyspace,
58
+ )
59
+
60
+ async def on_triples(self, msg, consumer, flow):
61
+
62
+ v = msg.value()
63
+ await self.table_store.add_triples(v)
64
+
65
+ async def on_graph_embeddings(self, msg, consumer, flow):
66
+
67
+ v = msg.value()
68
+ await self.table_store.add_graph_embeddings(v)
69
+
70
+ @staticmethod
71
+ def add_args(parser):
72
+
73
+ FlowProcessor.add_args(parser)
74
+
75
+ def run():
76
+
77
+ Processor.launch(default_ident, __doc__)
78
+
File without changes