trustgraph-flow 1.3.5__tar.gz → 1.3.7__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 (300) hide show
  1. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/PKG-INFO +1 -1
  2. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/pyproject.toml +2 -0
  3. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/config/service/service.py +21 -23
  4. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/cores/service.py +21 -23
  5. trustgraph_flow-1.3.7/trustgraph/flow_version.py +1 -0
  6. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/manager.py +4 -0
  7. trustgraph_flow-1.3.7/trustgraph/gateway/dispatch/nlp_query.py +30 -0
  8. trustgraph_flow-1.3.7/trustgraph/gateway/dispatch/structured_query.py +30 -0
  9. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/librarian/service.py +21 -23
  10. trustgraph_flow-1.3.7/trustgraph/retrieval/nlp_query/__init__.py +1 -0
  11. trustgraph_flow-1.3.7/trustgraph/retrieval/nlp_query/__main__.py +5 -0
  12. trustgraph_flow-1.3.7/trustgraph/retrieval/nlp_query/service.py +301 -0
  13. trustgraph_flow-1.3.7/trustgraph/retrieval/structured_query/__init__.py +1 -0
  14. trustgraph_flow-1.3.7/trustgraph/retrieval/structured_query/__main__.py +5 -0
  15. trustgraph_flow-1.3.7/trustgraph/retrieval/structured_query/service.py +176 -0
  16. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph_flow.egg-info/PKG-INFO +1 -1
  17. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph_flow.egg-info/SOURCES.txt +8 -0
  18. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph_flow.egg-info/entry_points.txt +2 -0
  19. trustgraph_flow-1.3.5/trustgraph/flow_version.py +0 -1
  20. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/README.md +0 -0
  21. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/setup.cfg +0 -0
  22. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/__init__.py +0 -0
  23. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/__init__.py +0 -0
  24. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/mcp_tool/__init__.py +0 -0
  25. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/mcp_tool/__main__.py +0 -0
  26. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/mcp_tool/service.py +0 -0
  27. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/react/__init__.py +0 -0
  28. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/react/__main__.py +0 -0
  29. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/react/agent_manager.py +0 -0
  30. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/react/service.py +0 -0
  31. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/react/tools.py +0 -0
  32. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/react/types.py +0 -0
  33. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/agent/tool_filter.py +0 -0
  34. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/chunking/__init__.py +0 -0
  35. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/chunking/recursive/__init__.py +0 -0
  36. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/chunking/recursive/__main__.py +0 -0
  37. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/chunking/recursive/chunker.py +0 -0
  38. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/chunking/token/__init__.py +0 -0
  39. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/chunking/token/__main__.py +0 -0
  40. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/chunking/token/chunker.py +0 -0
  41. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/config/service/__init__.py +0 -0
  42. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/config/service/__main__.py +0 -0
  43. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/config/service/config.py +0 -0
  44. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/config/service/flow.py +0 -0
  45. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/cores/__init__.py +0 -0
  46. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/cores/__main__.py +0 -0
  47. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/cores/knowledge.py +0 -0
  48. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/decoding/__init__.py +0 -0
  49. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
  50. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
  51. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
  52. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/decoding/pdf/__init__.py +0 -0
  53. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/decoding/pdf/__main__.py +0 -0
  54. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
  55. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/direct/__init__.py +0 -0
  56. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/direct/cassandra.py +0 -0
  57. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
  58. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
  59. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/direct/milvus_object_embeddings.py +0 -0
  60. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/__init__.py +0 -0
  61. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
  62. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
  63. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
  64. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/fastembed/__init__.py +0 -0
  65. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/fastembed/__main__.py +0 -0
  66. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/fastembed/processor.py +0 -0
  67. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
  68. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
  69. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
  70. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/ollama/__init__.py +0 -0
  71. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/ollama/__main__.py +0 -0
  72. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/embeddings/ollama/processor.py +0 -0
  73. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/external/__init__.py +0 -0
  74. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/external/wikipedia/__init__.py +0 -0
  75. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/external/wikipedia/__main__.py +0 -0
  76. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/external/wikipedia/service.py +0 -0
  77. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/__init__.py +0 -0
  78. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/__init__.py +0 -0
  79. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/agent/__init__.py +0 -0
  80. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/agent/__main__.py +0 -0
  81. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/agent/extract.py +0 -0
  82. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/definitions/__init__.py +0 -0
  83. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/definitions/__main__.py +0 -0
  84. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/definitions/extract.py +0 -0
  85. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/objects/__init__.py +0 -0
  86. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/objects/__main__.py +0 -0
  87. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/objects/processor.py +0 -0
  88. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/relationships/__init__.py +0 -0
  89. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/relationships/__main__.py +0 -0
  90. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/relationships/extract.py +0 -0
  91. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/topics/__init__.py +0 -0
  92. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/topics/__main__.py +0 -0
  93. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/extract/kg/topics/extract.py +0 -0
  94. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/__init__.py +0 -0
  95. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/__main__.py +0 -0
  96. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/auth.py +0 -0
  97. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/config/receiver.py +0 -0
  98. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/agent.py +0 -0
  99. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/config.py +0 -0
  100. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/core_export.py +0 -0
  101. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/core_import.py +0 -0
  102. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
  103. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
  104. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/document_load.py +0 -0
  105. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/document_rag.py +0 -0
  106. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/embeddings.py +0 -0
  107. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
  108. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
  109. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/flow.py +0 -0
  110. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
  111. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
  112. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
  113. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
  114. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/knowledge.py +0 -0
  115. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/librarian.py +0 -0
  116. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
  117. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/mux.py +0 -0
  118. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/objects_query.py +0 -0
  119. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/prompt.py +0 -0
  120. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/requestor.py +0 -0
  121. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/sender.py +0 -0
  122. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/serialize.py +0 -0
  123. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/streamer.py +0 -0
  124. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/text_completion.py +0 -0
  125. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/text_load.py +0 -0
  126. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/triples_export.py +0 -0
  127. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/triples_import.py +0 -0
  128. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/dispatch/triples_query.py +0 -0
  129. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
  130. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/endpoint/manager.py +0 -0
  131. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/endpoint/metrics.py +0 -0
  132. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/endpoint/socket.py +0 -0
  133. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
  134. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
  135. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/running.py +0 -0
  136. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/service.py +0 -0
  137. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/unused/dbpedia.py +0 -0
  138. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/unused/encyclopedia.py +0 -0
  139. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/gateway/unused/internet_search.py +0 -0
  140. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/librarian/__init__.py +0 -0
  141. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/librarian/__main__.py +0 -0
  142. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/librarian/blob_store.py +0 -0
  143. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/librarian/librarian.py +0 -0
  144. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/metering/__init__.py +0 -0
  145. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/metering/__main__.py +0 -0
  146. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/metering/counter.py +0 -0
  147. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/__init__.py +0 -0
  148. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/__init__.py +0 -0
  149. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/azure/__init__.py +0 -0
  150. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/azure/__main__.py +0 -0
  151. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/azure/llm.py +0 -0
  152. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
  153. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
  154. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
  155. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/claude/__init__.py +0 -0
  156. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/claude/__main__.py +0 -0
  157. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/claude/llm.py +0 -0
  158. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
  159. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
  160. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/cohere/llm.py +0 -0
  161. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
  162. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
  163. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
  164. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
  165. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
  166. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
  167. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
  168. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
  169. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
  170. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
  171. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
  172. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/mistral/llm.py +0 -0
  173. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
  174. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
  175. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/ollama/llm.py +0 -0
  176. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/openai/__init__.py +0 -0
  177. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/openai/__main__.py +0 -0
  178. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/openai/llm.py +0 -0
  179. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
  180. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
  181. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/tgi/llm.py +0 -0
  182. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
  183. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
  184. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/model/text_completion/vllm/llm.py +0 -0
  185. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/processing/__init__.py +0 -0
  186. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/processing/__main__.py +0 -0
  187. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/processing/processing.py +0 -0
  188. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/prompt/__init__.py +0 -0
  189. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/prompt/template/__init__.py +0 -0
  190. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/prompt/template/__main__.py +0 -0
  191. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/prompt/template/service.py +0 -0
  192. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/__init__.py +0 -0
  193. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/__init__.py +0 -0
  194. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
  195. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
  196. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
  197. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
  198. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
  199. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
  200. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
  201. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
  202. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
  203. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/__init__.py +0 -0
  204. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
  205. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
  206. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
  207. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
  208. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
  209. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
  210. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
  211. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
  212. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
  213. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/objects/__init__.py +0 -0
  214. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/objects/cassandra/__init__.py +0 -0
  215. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/objects/cassandra/__main__.py +0 -0
  216. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/objects/cassandra/service.py +0 -0
  217. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/__init__.py +0 -0
  218. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/cassandra/__init__.py +0 -0
  219. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/cassandra/__main__.py +0 -0
  220. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/cassandra/service.py +0 -0
  221. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/falkordb/__init__.py +0 -0
  222. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/falkordb/__main__.py +0 -0
  223. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/falkordb/service.py +0 -0
  224. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/memgraph/__init__.py +0 -0
  225. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/memgraph/__main__.py +0 -0
  226. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/memgraph/service.py +0 -0
  227. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/neo4j/__init__.py +0 -0
  228. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/neo4j/__main__.py +0 -0
  229. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/query/triples/neo4j/service.py +0 -0
  230. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/__init__.py +0 -0
  231. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/document_rag/__init__.py +0 -0
  232. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/document_rag/__main__.py +0 -0
  233. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
  234. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/document_rag/rag.py +0 -0
  235. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
  236. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
  237. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
  238. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/retrieval/graph_rag/rag.py +0 -0
  239. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/rev_gateway/__init__.py +0 -0
  240. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/rev_gateway/__main__.py +0 -0
  241. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/rev_gateway/dispatcher.py +0 -0
  242. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/rev_gateway/service.py +0 -0
  243. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/__init__.py +0 -0
  244. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
  245. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
  246. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
  247. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
  248. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
  249. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
  250. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
  251. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
  252. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
  253. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
  254. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
  255. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
  256. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
  257. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
  258. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
  259. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
  260. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
  261. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
  262. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
  263. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
  264. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/knowledge/__init__.py +0 -0
  265. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/knowledge/__main__.py +0 -0
  266. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/knowledge/store.py +0 -0
  267. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/object_embeddings/__init__.py +0 -0
  268. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
  269. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
  270. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
  271. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/objects/__init__.py +0 -0
  272. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/objects/cassandra/__init__.py +0 -0
  273. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/objects/cassandra/__main__.py +0 -0
  274. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/objects/cassandra/write.py +0 -0
  275. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/rows/__init__.py +0 -0
  276. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
  277. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
  278. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/rows/cassandra/write.py +0 -0
  279. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/__init__.py +0 -0
  280. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
  281. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
  282. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/cassandra/write.py +0 -0
  283. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
  284. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
  285. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/falkordb/write.py +0 -0
  286. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
  287. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
  288. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/memgraph/write.py +0 -0
  289. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
  290. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
  291. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/storage/triples/neo4j/write.py +0 -0
  292. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/tables/__init__.py +0 -0
  293. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/tables/config.py +0 -0
  294. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/tables/knowledge.py +0 -0
  295. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/tables/library.py +0 -0
  296. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/template/__init__.py +0 -0
  297. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph/template/prompt_manager.py +0 -0
  298. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
  299. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph_flow.egg-info/requires.txt +0 -0
  300. {trustgraph_flow-1.3.5 → trustgraph_flow-1.3.7}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-flow
3
- Version: 1.3.5
3
+ Version: 1.3.7
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
  Author-email: "trustgraph.ai" <security@trustgraph.ai>
6
6
  Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
@@ -87,6 +87,7 @@ kg-store = "trustgraph.storage.knowledge:run"
87
87
  librarian = "trustgraph.librarian:run"
88
88
  mcp-tool = "trustgraph.agent.mcp_tool:run"
89
89
  metering = "trustgraph.metering:run"
90
+ nlp-query = "trustgraph.retrieval.nlp_query:run"
90
91
  objects-write-cassandra = "trustgraph.storage.objects.cassandra:run"
91
92
  objects-query-cassandra = "trustgraph.query.objects.cassandra:run"
92
93
  oe-write-milvus = "trustgraph.storage.object_embeddings.milvus:run"
@@ -95,6 +96,7 @@ pdf-ocr-mistral = "trustgraph.decoding.mistral_ocr:run"
95
96
  prompt-template = "trustgraph.prompt.template:run"
96
97
  rev-gateway = "trustgraph.rev_gateway:run"
97
98
  run-processing = "trustgraph.processing:run"
99
+ structured-query = "trustgraph.retrieval.structured_query:run"
98
100
  text-completion-azure = "trustgraph.model.text_completion.azure:run"
99
101
  text-completion-azure-openai = "trustgraph.model.text_completion.azure_openai:run"
100
102
  text-completion-claude = "trustgraph.model.text_completion.claude:run"
@@ -15,6 +15,7 @@ from trustgraph.schema import FlowRequest, FlowResponse
15
15
  from trustgraph.schema import flow_request_queue, flow_response_queue
16
16
 
17
17
  from trustgraph.base import AsyncProcessor, Consumer, Producer
18
+ from trustgraph.base.cassandra_config import add_cassandra_args, resolve_cassandra_config
18
19
 
19
20
  from . config import Configuration
20
21
  from . flow import FlowConfig
@@ -60,9 +61,21 @@ class Processor(AsyncProcessor):
60
61
  "flow_response_queue", default_flow_response_queue
61
62
  )
62
63
 
63
- cassandra_host = params.get("cassandra_host", default_cassandra_host)
64
+ cassandra_host = params.get("cassandra_host")
64
65
  cassandra_username = params.get("cassandra_username")
65
66
  cassandra_password = params.get("cassandra_password")
67
+
68
+ # Resolve configuration with environment variable fallback
69
+ hosts, username, password = resolve_cassandra_config(
70
+ host=cassandra_host,
71
+ username=cassandra_username,
72
+ password=cassandra_password
73
+ )
74
+
75
+ # Store resolved configuration
76
+ self.cassandra_host = hosts
77
+ self.cassandra_username = username
78
+ self.cassandra_password = password
66
79
 
67
80
  id = params.get("id")
68
81
 
@@ -76,8 +89,9 @@ class Processor(AsyncProcessor):
76
89
  "config_push_schema": ConfigPush.__name__,
77
90
  "flow_request_schema": FlowRequest.__name__,
78
91
  "flow_response_schema": FlowResponse.__name__,
79
- "cassandra_host": cassandra_host,
80
- "cassandra_username": cassandra_username,
92
+ "cassandra_host": self.cassandra_host,
93
+ "cassandra_username": self.cassandra_username,
94
+ "cassandra_password": self.cassandra_password,
81
95
  }
82
96
  )
83
97
 
@@ -142,9 +156,9 @@ class Processor(AsyncProcessor):
142
156
  )
143
157
 
144
158
  self.config = Configuration(
145
- host = cassandra_host.split(","),
146
- username = cassandra_username,
147
- password = cassandra_password,
159
+ host = self.cassandra_host,
160
+ username = self.cassandra_username,
161
+ password = self.cassandra_password,
148
162
  keyspace = keyspace,
149
163
  push = self.push
150
164
  )
@@ -276,23 +290,7 @@ class Processor(AsyncProcessor):
276
290
  help=f'Flow response queue {default_flow_response_queue}',
277
291
  )
278
292
 
279
- parser.add_argument(
280
- '--cassandra-host',
281
- default="cassandra",
282
- help=f'Graph host (default: cassandra)'
283
- )
284
-
285
- parser.add_argument(
286
- '--cassandra-user',
287
- default=None,
288
- help=f'Cassandra user'
289
- )
290
-
291
- parser.add_argument(
292
- '--cassandra-password',
293
- default=None,
294
- help=f'Cassandra password'
295
- )
293
+ add_cassandra_args(parser)
296
294
 
297
295
  def run():
298
296
 
@@ -11,6 +11,7 @@ import logging
11
11
 
12
12
  from .. base import AsyncProcessor, Consumer, Producer, Publisher, Subscriber
13
13
  from .. base import ConsumerMetrics, ProducerMetrics
14
+ from .. base.cassandra_config import add_cassandra_args, resolve_cassandra_config
14
15
 
15
16
  from .. schema import KnowledgeRequest, KnowledgeResponse, Error
16
17
  from .. schema import knowledge_request_queue, knowledge_response_queue
@@ -49,16 +50,29 @@ class Processor(AsyncProcessor):
49
50
  "knowledge_response_queue", default_knowledge_response_queue
50
51
  )
51
52
 
52
- cassandra_host = params.get("cassandra_host", default_cassandra_host)
53
+ cassandra_host = params.get("cassandra_host")
53
54
  cassandra_username = params.get("cassandra_username")
54
55
  cassandra_password = params.get("cassandra_password")
56
+
57
+ # Resolve configuration with environment variable fallback
58
+ hosts, username, password = resolve_cassandra_config(
59
+ host=cassandra_host,
60
+ username=cassandra_username,
61
+ password=cassandra_password
62
+ )
63
+
64
+ # Store resolved configuration
65
+ self.cassandra_host = hosts
66
+ self.cassandra_username = username
67
+ self.cassandra_password = password
55
68
 
56
69
  super(Processor, self).__init__(
57
70
  **params | {
58
71
  "knowledge_request_queue": knowledge_request_queue,
59
72
  "knowledge_response_queue": knowledge_response_queue,
60
- "cassandra_host": cassandra_host,
61
- "cassandra_user": cassandra_user,
73
+ "cassandra_host": self.cassandra_host,
74
+ "cassandra_username": self.cassandra_username,
75
+ "cassandra_password": self.cassandra_password,
62
76
  }
63
77
  )
64
78
 
@@ -89,9 +103,9 @@ class Processor(AsyncProcessor):
89
103
  )
90
104
 
91
105
  self.knowledge = KnowledgeManager(
92
- cassandra_host = cassandra_host.split(","),
93
- cassandra_username = cassandra_username,
94
- cassandra_password = cassandra_password,
106
+ cassandra_host = self.cassandra_host,
107
+ cassandra_username = self.cassandra_username,
108
+ cassandra_password = self.cassandra_password,
95
109
  keyspace = keyspace,
96
110
  flow_config = self,
97
111
  )
@@ -210,23 +224,7 @@ class Processor(AsyncProcessor):
210
224
  help=f'Config response queue {default_knowledge_response_queue}',
211
225
  )
212
226
 
213
- parser.add_argument(
214
- '--cassandra-host',
215
- default="cassandra",
216
- help=f'Graph host (default: cassandra)'
217
- )
218
-
219
- parser.add_argument(
220
- '--cassandra-user',
221
- default=None,
222
- help=f'Cassandra user'
223
- )
224
-
225
- parser.add_argument(
226
- '--cassandra-password',
227
- default=None,
228
- help=f'Cassandra password'
229
- )
227
+ add_cassandra_args(parser)
230
228
 
231
229
  def run():
232
230
 
@@ -0,0 +1 @@
1
+ __version__ = "1.3.7"
@@ -20,6 +20,8 @@ from . graph_rag import GraphRagRequestor
20
20
  from . document_rag import DocumentRagRequestor
21
21
  from . triples_query import TriplesQueryRequestor
22
22
  from . objects_query import ObjectsQueryRequestor
23
+ from . nlp_query import NLPQueryRequestor
24
+ from . structured_query import StructuredQueryRequestor
23
25
  from . embeddings import EmbeddingsRequestor
24
26
  from . graph_embeddings_query import GraphEmbeddingsQueryRequestor
25
27
  from . mcp_tool import McpToolRequestor
@@ -52,6 +54,8 @@ request_response_dispatchers = {
52
54
  "graph-embeddings": GraphEmbeddingsQueryRequestor,
53
55
  "triples": TriplesQueryRequestor,
54
56
  "objects": ObjectsQueryRequestor,
57
+ "nlp-query": NLPQueryRequestor,
58
+ "structured-query": StructuredQueryRequestor,
55
59
  }
56
60
 
57
61
  global_dispatchers = {
@@ -0,0 +1,30 @@
1
+ from ... schema import QuestionToStructuredQueryRequest, QuestionToStructuredQueryResponse
2
+ from ... messaging import TranslatorRegistry
3
+
4
+ from . requestor import ServiceRequestor
5
+
6
+ class NLPQueryRequestor(ServiceRequestor):
7
+ def __init__(
8
+ self, pulsar_client, request_queue, response_queue, timeout,
9
+ consumer, subscriber,
10
+ ):
11
+
12
+ super(NLPQueryRequestor, self).__init__(
13
+ pulsar_client=pulsar_client,
14
+ request_queue=request_queue,
15
+ response_queue=response_queue,
16
+ request_schema=QuestionToStructuredQueryRequest,
17
+ response_schema=QuestionToStructuredQueryResponse,
18
+ subscription = subscriber,
19
+ consumer_name = consumer,
20
+ timeout=timeout,
21
+ )
22
+
23
+ self.request_translator = TranslatorRegistry.get_request_translator("nlp-query")
24
+ self.response_translator = TranslatorRegistry.get_response_translator("nlp-query")
25
+
26
+ def to_request(self, body):
27
+ return self.request_translator.to_pulsar(body)
28
+
29
+ def from_response(self, message):
30
+ return self.response_translator.from_response_with_completion(message)
@@ -0,0 +1,30 @@
1
+ from ... schema import StructuredQueryRequest, StructuredQueryResponse
2
+ from ... messaging import TranslatorRegistry
3
+
4
+ from . requestor import ServiceRequestor
5
+
6
+ class StructuredQueryRequestor(ServiceRequestor):
7
+ def __init__(
8
+ self, pulsar_client, request_queue, response_queue, timeout,
9
+ consumer, subscriber,
10
+ ):
11
+
12
+ super(StructuredQueryRequestor, self).__init__(
13
+ pulsar_client=pulsar_client,
14
+ request_queue=request_queue,
15
+ response_queue=response_queue,
16
+ request_schema=StructuredQueryRequest,
17
+ response_schema=StructuredQueryResponse,
18
+ subscription = subscriber,
19
+ consumer_name = consumer,
20
+ timeout=timeout,
21
+ )
22
+
23
+ self.request_translator = TranslatorRegistry.get_request_translator("structured-query")
24
+ self.response_translator = TranslatorRegistry.get_response_translator("structured-query")
25
+
26
+ def to_request(self, body):
27
+ return self.request_translator.to_pulsar(body)
28
+
29
+ def from_response(self, message):
30
+ return self.response_translator.from_response_with_completion(message)
@@ -11,6 +11,7 @@ import logging
11
11
 
12
12
  from .. base import AsyncProcessor, Consumer, Producer, Publisher, Subscriber
13
13
  from .. base import ConsumerMetrics, ProducerMetrics
14
+ from .. base.cassandra_config import add_cassandra_args, resolve_cassandra_config
14
15
 
15
16
  from .. schema import LibrarianRequest, LibrarianResponse, Error
16
17
  from .. schema import librarian_request_queue, librarian_response_queue
@@ -66,9 +67,21 @@ class Processor(AsyncProcessor):
66
67
  default_minio_secret_key
67
68
  )
68
69
 
69
- cassandra_host = params.get("cassandra_host", default_cassandra_host)
70
+ cassandra_host = params.get("cassandra_host")
70
71
  cassandra_username = params.get("cassandra_username")
71
72
  cassandra_password = params.get("cassandra_password")
73
+
74
+ # Resolve configuration with environment variable fallback
75
+ hosts, username, password = resolve_cassandra_config(
76
+ host=cassandra_host,
77
+ username=cassandra_username,
78
+ password=cassandra_password
79
+ )
80
+
81
+ # Store resolved configuration
82
+ self.cassandra_host = hosts
83
+ self.cassandra_username = username
84
+ self.cassandra_password = password
72
85
 
73
86
  super(Processor, self).__init__(
74
87
  **params | {
@@ -76,8 +89,9 @@ class Processor(AsyncProcessor):
76
89
  "librarian_response_queue": librarian_response_queue,
77
90
  "minio_host": minio_host,
78
91
  "minio_access_key": minio_access_key,
79
- "cassandra_host": cassandra_host,
80
- "cassandra_username": cassandra_username,
92
+ "cassandra_host": self.cassandra_host,
93
+ "cassandra_username": self.cassandra_username,
94
+ "cassandra_password": self.cassandra_password,
81
95
  }
82
96
  )
83
97
 
@@ -108,9 +122,9 @@ class Processor(AsyncProcessor):
108
122
  )
109
123
 
110
124
  self.librarian = Librarian(
111
- cassandra_host = cassandra_host.split(","),
112
- cassandra_username = cassandra_username,
113
- cassandra_password = cassandra_password,
125
+ cassandra_host = self.cassandra_host,
126
+ cassandra_username = self.cassandra_username,
127
+ cassandra_password = self.cassandra_password,
114
128
  minio_host = minio_host,
115
129
  minio_access_key = minio_access_key,
116
130
  minio_secret_key = minio_secret_key,
@@ -319,23 +333,7 @@ class Processor(AsyncProcessor):
319
333
  f'(default: {default_minio_access_key})',
320
334
  )
321
335
 
322
- parser.add_argument(
323
- '--cassandra-host',
324
- default="cassandra",
325
- help=f'Graph host (default: cassandra)'
326
- )
327
-
328
- parser.add_argument(
329
- '--cassandra-user',
330
- default=None,
331
- help=f'Cassandra user'
332
- )
333
-
334
- parser.add_argument(
335
- '--cassandra-password',
336
- default=None,
337
- help=f'Cassandra password'
338
- )
336
+ add_cassandra_args(parser)
339
337
 
340
338
  def run():
341
339
 
@@ -0,0 +1 @@
1
+ from . service import *
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env python3
2
+
3
+ from . service import run
4
+
5
+ run()
@@ -0,0 +1,301 @@
1
+ """
2
+ NLP to Structured Query Service - converts natural language questions to GraphQL queries.
3
+ Two-phase approach: 1) Select relevant schemas, 2) Generate GraphQL query.
4
+ """
5
+
6
+ import json
7
+ import logging
8
+ from typing import Dict, Any, Optional, List
9
+
10
+ from ...schema import QuestionToStructuredQueryRequest, QuestionToStructuredQueryResponse
11
+ from ...schema import PromptRequest
12
+ from ...schema import Error, RowSchema, Field as SchemaField
13
+
14
+ from ...base import FlowProcessor, ConsumerSpec, ProducerSpec, PromptClientSpec
15
+
16
+ # Module logger
17
+ logger = logging.getLogger(__name__)
18
+
19
+ default_ident = "nlp-query"
20
+ default_schema_selection_template = "schema-selection"
21
+ default_graphql_generation_template = "graphql-generation"
22
+
23
+ class Processor(FlowProcessor):
24
+
25
+ def __init__(self, **params):
26
+
27
+ id = params.get("id", default_ident)
28
+
29
+ # Config key for schemas
30
+ self.config_key = params.get("config_type", "schema")
31
+
32
+ # Configurable prompt template names
33
+ self.schema_selection_template = params.get("schema_selection_template", default_schema_selection_template)
34
+ self.graphql_generation_template = params.get("graphql_generation_template", default_graphql_generation_template)
35
+
36
+ super(Processor, self).__init__(
37
+ **params | {
38
+ "id": id,
39
+ "config-type": self.config_key,
40
+ }
41
+ )
42
+
43
+ self.register_specification(
44
+ ConsumerSpec(
45
+ name = "request",
46
+ schema = QuestionToStructuredQueryRequest,
47
+ handler = self.on_message
48
+ )
49
+ )
50
+
51
+ self.register_specification(
52
+ ProducerSpec(
53
+ name = "response",
54
+ schema = QuestionToStructuredQueryResponse,
55
+ )
56
+ )
57
+
58
+ # Client spec for calling prompt service
59
+ self.register_specification(
60
+ PromptClientSpec(
61
+ request_name = "prompt-request",
62
+ response_name = "prompt-response",
63
+ )
64
+ )
65
+
66
+ # Register config handler for schema updates
67
+ self.register_config_handler(self.on_schema_config)
68
+
69
+ # Schema storage: name -> RowSchema
70
+ self.schemas: Dict[str, RowSchema] = {}
71
+
72
+ logger.info("NLP Query service initialized")
73
+
74
+ async def on_schema_config(self, config, version):
75
+ """Handle schema configuration updates"""
76
+ logger.info(f"Loading schema configuration version {version}")
77
+
78
+ # Clear existing schemas
79
+ self.schemas = {}
80
+
81
+ # Check if our config type exists
82
+ if self.config_key not in config:
83
+ logger.warning(f"No '{self.config_key}' type in configuration")
84
+ return
85
+
86
+ # Get the schemas dictionary for our type
87
+ schemas_config = config[self.config_key]
88
+
89
+ # Process each schema in the schemas config
90
+ for schema_name, schema_json in schemas_config.items():
91
+ try:
92
+ # Parse the JSON schema definition
93
+ schema_def = json.loads(schema_json)
94
+
95
+ # Create Field objects
96
+ fields = []
97
+ for field_def in schema_def.get("fields", []):
98
+ field = SchemaField(
99
+ name=field_def["name"],
100
+ type=field_def["type"],
101
+ size=field_def.get("size", 0),
102
+ primary=field_def.get("primary_key", False),
103
+ description=field_def.get("description", ""),
104
+ required=field_def.get("required", False),
105
+ enum_values=field_def.get("enum", []),
106
+ indexed=field_def.get("indexed", False)
107
+ )
108
+ fields.append(field)
109
+
110
+ # Create RowSchema
111
+ row_schema = RowSchema(
112
+ name=schema_def.get("name", schema_name),
113
+ description=schema_def.get("description", ""),
114
+ fields=fields
115
+ )
116
+
117
+ self.schemas[schema_name] = row_schema
118
+ logger.info(f"Loaded schema: {schema_name} with {len(fields)} fields")
119
+
120
+ except Exception as e:
121
+ logger.error(f"Failed to parse schema {schema_name}: {e}", exc_info=True)
122
+
123
+ logger.info(f"Schema configuration loaded: {len(self.schemas)} schemas")
124
+
125
+ async def phase1_select_schemas(self, question: str) -> List[str]:
126
+ """Phase 1: Use prompt service to select relevant schemas for the question"""
127
+ logger.info("Starting Phase 1: Schema selection")
128
+
129
+ # Prepare schema information for the prompt
130
+ schema_info = []
131
+ for name, schema in self.schemas.items():
132
+ schema_desc = {
133
+ "name": name,
134
+ "description": schema.description,
135
+ "fields": [{"name": f.name, "type": f.type, "description": f.description}
136
+ for f in schema.fields]
137
+ }
138
+ schema_info.append(schema_desc)
139
+
140
+ # Create prompt variables
141
+ variables = {
142
+ "question": question,
143
+ "schemas": schema_info # Pass structured data directly
144
+ }
145
+
146
+ # Call prompt service for schema selection
147
+ prompt_request = PromptRequest(
148
+ template=self.schema_selection_template,
149
+ variables=variables
150
+ )
151
+
152
+ try:
153
+ response = await self.client("prompt-request").request(prompt_request)
154
+
155
+ if response.error is not None:
156
+ raise Exception(f"Prompt service error: {response.error}")
157
+
158
+ # Parse the response to get selected schema names
159
+ # Expecting response.text to contain JSON array of schema names
160
+ selected_schemas = json.loads(response.text)
161
+
162
+ logger.info(f"Phase 1 selected schemas: {selected_schemas}")
163
+ return selected_schemas
164
+
165
+ except Exception as e:
166
+ logger.error(f"Phase 1 schema selection failed: {e}")
167
+ raise
168
+
169
+ async def phase2_generate_graphql(self, question: str, selected_schemas: List[str]) -> Dict[str, Any]:
170
+ """Phase 2: Generate GraphQL query using selected schemas"""
171
+ logger.info(f"Starting Phase 2: GraphQL generation for schemas: {selected_schemas}")
172
+
173
+ # Get detailed schema information for selected schemas only
174
+ selected_schema_info = []
175
+ for schema_name in selected_schemas:
176
+ if schema_name in self.schemas:
177
+ schema = self.schemas[schema_name]
178
+ schema_desc = {
179
+ "name": schema_name,
180
+ "description": schema.description,
181
+ "fields": [
182
+ {
183
+ "name": f.name,
184
+ "type": f.type,
185
+ "description": f.description,
186
+ "required": f.required,
187
+ "primary_key": f.primary,
188
+ "indexed": f.indexed,
189
+ "enum_values": f.enum_values if f.enum_values else []
190
+ }
191
+ for f in schema.fields
192
+ ]
193
+ }
194
+ selected_schema_info.append(schema_desc)
195
+
196
+ # Create prompt variables for GraphQL generation
197
+ variables = {
198
+ "question": question,
199
+ "schemas": selected_schema_info # Pass structured data directly
200
+ }
201
+
202
+ # Call prompt service for GraphQL generation
203
+ prompt_request = PromptRequest(
204
+ template=self.graphql_generation_template,
205
+ variables=variables
206
+ )
207
+
208
+ try:
209
+ response = await self.client("prompt-request").request(prompt_request)
210
+
211
+ if response.error is not None:
212
+ raise Exception(f"Prompt service error: {response.error}")
213
+
214
+ # Parse the response to get GraphQL query and variables
215
+ # Expecting response.text to contain JSON with "query" and "variables" fields
216
+ result = json.loads(response.text)
217
+
218
+ logger.info(f"Phase 2 generated GraphQL: {result.get('query', '')[:100]}...")
219
+ return result
220
+
221
+ except Exception as e:
222
+ logger.error(f"Phase 2 GraphQL generation failed: {e}")
223
+ raise
224
+
225
+ async def on_message(self, msg, consumer, flow):
226
+ """Handle incoming question to structured query request"""
227
+
228
+ try:
229
+ request = msg.value()
230
+
231
+ # Sender-produced ID
232
+ id = msg.properties()["id"]
233
+
234
+ logger.info(f"Handling NLP query request {id}: {request.question[:100]}...")
235
+
236
+ # Phase 1: Select relevant schemas
237
+ selected_schemas = await self.phase1_select_schemas(request.question)
238
+
239
+ # Phase 2: Generate GraphQL query
240
+ graphql_result = await self.phase2_generate_graphql(request.question, selected_schemas)
241
+
242
+ # Create response
243
+ response = QuestionToStructuredQueryResponse(
244
+ error=None,
245
+ graphql_query=graphql_result.get("query", ""),
246
+ variables=graphql_result.get("variables", {}),
247
+ detected_schemas=selected_schemas,
248
+ confidence=graphql_result.get("confidence", 0.8) # Default confidence
249
+ )
250
+
251
+ logger.info("Sending NLP query response...")
252
+ await flow("response").send(response, properties={"id": id})
253
+
254
+ logger.info("NLP query request completed")
255
+
256
+ except Exception as e:
257
+
258
+ logger.error(f"Exception in NLP query service: {e}", exc_info=True)
259
+
260
+ logger.info("Sending error response...")
261
+
262
+ response = QuestionToStructuredQueryResponse(
263
+ error = Error(
264
+ type = "nlp-query-error",
265
+ message = str(e),
266
+ ),
267
+ graphql_query = "",
268
+ variables = {},
269
+ detected_schemas = [],
270
+ confidence = 0.0
271
+ )
272
+
273
+ await flow("response").send(response, properties={"id": id})
274
+
275
+ @staticmethod
276
+ def add_args(parser):
277
+ """Add command-line arguments"""
278
+
279
+ FlowProcessor.add_args(parser)
280
+
281
+ parser.add_argument(
282
+ '--config-type',
283
+ default='schema',
284
+ help='Configuration type prefix for schemas (default: schema)'
285
+ )
286
+
287
+ parser.add_argument(
288
+ '--schema-selection-template',
289
+ default=default_schema_selection_template,
290
+ help=f'Prompt template name for schema selection (default: {default_schema_selection_template})'
291
+ )
292
+
293
+ parser.add_argument(
294
+ '--graphql-generation-template',
295
+ default=default_graphql_generation_template,
296
+ help=f'Prompt template name for GraphQL generation (default: {default_graphql_generation_template})'
297
+ )
298
+
299
+ def run():
300
+ """Entry point for nlp-query command"""
301
+ Processor.launch(default_ident, __doc__)
@@ -0,0 +1 @@
1
+ from . service import *
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env python3
2
+
3
+ from . service import run
4
+
5
+ run()