trustgraph-flow 0.23.4__tar.gz → 0.23.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/PKG-INFO +2 -2
- trustgraph-flow-0.23.6/trustgraph/flow_version.py +1 -0
- trustgraph-flow-0.23.6/trustgraph/gateway/config/receiver.py +121 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/agent.py +2 -3
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/config.py +6 -5
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/document_embeddings_export.py +67 -0
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/document_embeddings_import.py +64 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/document_load.py +7 -8
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/document_rag.py +9 -7
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/embeddings.py +2 -3
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/flow.py +6 -5
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/graph_embeddings_export.py +67 -0
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/graph_embeddings_import.py +64 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/graph_embeddings_query.py +2 -3
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/graph_rag.py +2 -3
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/librarian.py +6 -9
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/manager.py +248 -0
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/mux.py +167 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/prompt.py +2 -3
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/requestor.py +9 -4
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/sender.py +9 -5
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/serialize.py +1 -1
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/streamer.py +99 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/text_completion.py +2 -3
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/text_load.py +7 -8
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/triples_export.py +67 -0
- trustgraph-flow-0.23.6/trustgraph/gateway/dispatch/triples_import.py +58 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/dispatch}/triples_query.py +2 -3
- trustgraph-flow-0.23.4/trustgraph/gateway/endpoint.py → trustgraph-flow-0.23.6/trustgraph/gateway/endpoint/constant_endpoint.py +5 -5
- trustgraph-flow-0.23.6/trustgraph/gateway/endpoint/manager.py +64 -0
- trustgraph-flow-0.23.6/trustgraph/gateway/endpoint/socket.py +111 -0
- trustgraph-flow-0.23.4/trustgraph/gateway/flow_endpoint.py → trustgraph-flow-0.23.6/trustgraph/gateway/endpoint/variable_endpoint.py +7 -15
- trustgraph-flow-0.23.6/trustgraph/gateway/service.py +193 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph_flow.egg-info/SOURCES.txt +34 -30
- trustgraph-flow-0.23.4/trustgraph/flow_version.py +0 -1
- trustgraph-flow-0.23.4/trustgraph/gateway/document_embeddings_load.py +0 -63
- trustgraph-flow-0.23.4/trustgraph/gateway/document_embeddings_stream.py +0 -72
- trustgraph-flow-0.23.4/trustgraph/gateway/graph_embeddings_load.py +0 -64
- trustgraph-flow-0.23.4/trustgraph/gateway/graph_embeddings_stream.py +0 -69
- trustgraph-flow-0.23.4/trustgraph/gateway/mux.py +0 -167
- trustgraph-flow-0.23.4/trustgraph/gateway/service.py +0 -483
- trustgraph-flow-0.23.4/trustgraph/gateway/socket.py +0 -72
- trustgraph-flow-0.23.4/trustgraph/gateway/triples_load.py +0 -56
- trustgraph-flow-0.23.4/trustgraph/gateway/triples_stream.py +0 -67
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/README.md +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/agent-manager-react +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/api-gateway +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/chunker-token +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/config-svc +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/de-query-pinecone +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/de-write-pinecone +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/document-embeddings +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/document-rag +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/embeddings-fastembed +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/ge-query-pinecone +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/ge-write-pinecone +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/graph-embeddings +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/graph-rag +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/librarian +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/metering +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/object-extract-row +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/pdf-ocr-mistral +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/prompt-generic +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/prompt-template +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/run-processing +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-azure-openai +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-googleaistudio +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-lmstudio +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-mistral +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-query-falkordb +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-query-memgraph +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-write-falkordb +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-write-memgraph +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/scripts/wikipedia-lookup +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/setup.cfg +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/setup.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/agent/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/agent/react/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/agent/react/types.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/config/service/config.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/config/service/flow.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/config/service/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/external/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/extract/object/row/extract.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/gateway/auth.py +0 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/endpoint}/metrics.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/gateway/running.py +0 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/unused}/dbpedia.py +0 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/unused}/encyclopedia.py +0 -0
- {trustgraph-flow-0.23.4/trustgraph/gateway → trustgraph-flow-0.23.6/trustgraph/gateway/unused}/internet_search.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/librarian/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/librarian/table_store.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/template/prompt_manager.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph-flow-0.23.4 → trustgraph-flow-0.23.6}/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.
|
3
|
+
Version: 0.23.6
|
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.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.6.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.23.6"
|
@@ -0,0 +1,121 @@
|
|
1
|
+
"""
|
2
|
+
API gateway. Offers HTTP services which are translated to interaction on the
|
3
|
+
Pulsar bus.
|
4
|
+
"""
|
5
|
+
|
6
|
+
module = "api-gateway"
|
7
|
+
|
8
|
+
# FIXME: Subscribes to Pulsar unnecessarily, should only do it when there
|
9
|
+
# are active listeners
|
10
|
+
|
11
|
+
# FIXME: Connection errors in publishers / subscribers cause those threads
|
12
|
+
# to fail and are not failed or retried
|
13
|
+
|
14
|
+
import asyncio
|
15
|
+
import argparse
|
16
|
+
from aiohttp import web
|
17
|
+
import logging
|
18
|
+
import os
|
19
|
+
import base64
|
20
|
+
import uuid
|
21
|
+
import json
|
22
|
+
|
23
|
+
import pulsar
|
24
|
+
from prometheus_client import start_http_server
|
25
|
+
|
26
|
+
from ... schema import ConfigPush, config_push_queue
|
27
|
+
from ... base import Consumer
|
28
|
+
|
29
|
+
logger = logging.getLogger("config.receiver")
|
30
|
+
logger.setLevel(logging.INFO)
|
31
|
+
|
32
|
+
class ConfigReceiver:
|
33
|
+
|
34
|
+
def __init__(self, pulsar_client):
|
35
|
+
|
36
|
+
self.pulsar_client = pulsar_client
|
37
|
+
|
38
|
+
self.flow_handlers = []
|
39
|
+
|
40
|
+
self.flows = {}
|
41
|
+
|
42
|
+
def add_handler(self, h):
|
43
|
+
self.flow_handlers.append(h)
|
44
|
+
|
45
|
+
async def on_config(self, msg, proc, flow):
|
46
|
+
|
47
|
+
try:
|
48
|
+
|
49
|
+
v = msg.value()
|
50
|
+
|
51
|
+
print(f"Config version", v.version)
|
52
|
+
|
53
|
+
if "flows" in v.config:
|
54
|
+
|
55
|
+
flows = v.config["flows"]
|
56
|
+
|
57
|
+
wanted = list(flows.keys())
|
58
|
+
current = list(self.flows.keys())
|
59
|
+
|
60
|
+
for k in wanted:
|
61
|
+
if k not in current:
|
62
|
+
self.flows[k] = json.loads(flows[k])
|
63
|
+
await self.start_flow(k, self.flows[k])
|
64
|
+
|
65
|
+
for k in current:
|
66
|
+
if k not in wanted:
|
67
|
+
await self.stop_flow(k, self.flows[k])
|
68
|
+
del self.flows[k]
|
69
|
+
|
70
|
+
except Exception as e:
|
71
|
+
print(f"Exception: {e}", flush=True)
|
72
|
+
|
73
|
+
async def start_flow(self, id, flow):
|
74
|
+
|
75
|
+
print("Start flow", id)
|
76
|
+
|
77
|
+
for handler in self.flow_handlers:
|
78
|
+
|
79
|
+
try:
|
80
|
+
await handler.start_flow(id, flow)
|
81
|
+
except Exception as e:
|
82
|
+
print(f"Exception: {e}", flush=True)
|
83
|
+
|
84
|
+
async def stop_flow(self, id, flow):
|
85
|
+
|
86
|
+
print("Stop flow", id)
|
87
|
+
|
88
|
+
for handler in self.flow_handlers:
|
89
|
+
|
90
|
+
try:
|
91
|
+
await handler.stop_flow(id, flow)
|
92
|
+
except Exception as e:
|
93
|
+
print(f"Exception: {e}", flush=True)
|
94
|
+
|
95
|
+
async def config_loader(self):
|
96
|
+
|
97
|
+
async with asyncio.TaskGroup() as tg:
|
98
|
+
|
99
|
+
id = str(uuid.uuid4())
|
100
|
+
|
101
|
+
self.config_cons = Consumer(
|
102
|
+
taskgroup = tg,
|
103
|
+
flow = None,
|
104
|
+
client = self.pulsar_client,
|
105
|
+
subscriber = f"gateway-{id}",
|
106
|
+
topic = config_push_queue,
|
107
|
+
schema = ConfigPush,
|
108
|
+
handler = self.on_config,
|
109
|
+
start_of_messages = True,
|
110
|
+
)
|
111
|
+
|
112
|
+
await self.config_cons.start()
|
113
|
+
|
114
|
+
print("Waiting...")
|
115
|
+
|
116
|
+
print("Config consumer done. :/")
|
117
|
+
|
118
|
+
async def start(self):
|
119
|
+
|
120
|
+
asyncio.create_task(self.config_loader())
|
121
|
+
|
@@ -1,12 +1,11 @@
|
|
1
1
|
|
2
|
-
from
|
2
|
+
from ... schema import AgentRequest, AgentResponse
|
3
3
|
|
4
|
-
from . endpoint import ServiceEndpoint
|
5
4
|
from . requestor import ServiceRequestor
|
6
5
|
|
7
6
|
class AgentRequestor(ServiceRequestor):
|
8
7
|
def __init__(
|
9
|
-
self, pulsar_client, request_queue, response_queue, timeout,
|
8
|
+
self, pulsar_client, request_queue, response_queue, timeout,
|
10
9
|
consumer, subscriber,
|
11
10
|
):
|
12
11
|
|
@@ -1,16 +1,17 @@
|
|
1
1
|
|
2
|
-
from
|
3
|
-
from
|
4
|
-
from
|
2
|
+
from ... schema import ConfigRequest, ConfigResponse, ConfigKey, ConfigValue
|
3
|
+
from ... schema import config_request_queue
|
4
|
+
from ... schema import config_response_queue
|
5
5
|
|
6
|
-
from . endpoint import ServiceEndpoint
|
7
6
|
from . requestor import ServiceRequestor
|
8
7
|
|
9
8
|
class ConfigRequestor(ServiceRequestor):
|
10
|
-
def __init__(self, pulsar_client,
|
9
|
+
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
11
10
|
|
12
11
|
super(ConfigRequestor, self).__init__(
|
13
12
|
pulsar_client=pulsar_client,
|
13
|
+
consumer_name = consumer,
|
14
|
+
subscription = subscriber,
|
14
15
|
request_queue=config_request_queue,
|
15
16
|
response_queue=config_response_queue,
|
16
17
|
request_schema=ConfigRequest,
|
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
import asyncio
|
3
|
+
import queue
|
4
|
+
import uuid
|
5
|
+
|
6
|
+
from ... schema import DocumentEmbeddings
|
7
|
+
from ... base import Subscriber
|
8
|
+
|
9
|
+
from . serialize import serialize_document_embeddings
|
10
|
+
|
11
|
+
class DocumentEmbeddingsExport:
|
12
|
+
|
13
|
+
def __init__(
|
14
|
+
self, ws, running, pulsar_client, queue, consumer, subscriber
|
15
|
+
):
|
16
|
+
|
17
|
+
self.ws = ws
|
18
|
+
self.running = running
|
19
|
+
self.pulsar_client = pulsar_client
|
20
|
+
self.queue = queue
|
21
|
+
self.consumer = consumer
|
22
|
+
self.subscriber = subscriber
|
23
|
+
|
24
|
+
async def destroy(self):
|
25
|
+
self.running.stop()
|
26
|
+
await self.ws.close()
|
27
|
+
|
28
|
+
async def receive(self, msg):
|
29
|
+
# Ignore incoming info from websocket
|
30
|
+
pass
|
31
|
+
|
32
|
+
async def run(self):
|
33
|
+
|
34
|
+
subs = Subscriber(
|
35
|
+
client = self.pulsar_client, topic = self.queue,
|
36
|
+
consumer_name = self.consumer, subscription = self.subscriber,
|
37
|
+
schema = DocumentEmbeddings
|
38
|
+
)
|
39
|
+
|
40
|
+
await subs.start()
|
41
|
+
|
42
|
+
id = str(uuid.uuid4())
|
43
|
+
q = await subs.subscribe_all(id)
|
44
|
+
|
45
|
+
while self.running.get():
|
46
|
+
try:
|
47
|
+
|
48
|
+
resp = await asyncio.wait_for(q.get(), timeout=0.5)
|
49
|
+
await self.ws.send_json(serialize_document_embeddings(resp))
|
50
|
+
|
51
|
+
except TimeoutError:
|
52
|
+
continue
|
53
|
+
|
54
|
+
except queue.Empty:
|
55
|
+
continue
|
56
|
+
|
57
|
+
except Exception as e:
|
58
|
+
print(f"Exception: {str(e)}", flush=True)
|
59
|
+
break
|
60
|
+
|
61
|
+
await subs.unsubscribe_all(id)
|
62
|
+
|
63
|
+
await subs.stop()
|
64
|
+
|
65
|
+
await self.ws.close()
|
66
|
+
self.running.stop()
|
67
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
import asyncio
|
3
|
+
import uuid
|
4
|
+
from aiohttp import WSMsgType
|
5
|
+
|
6
|
+
from ... schema import Metadata
|
7
|
+
from ... schema import DocumentEmbeddings, ChunkEmbeddings
|
8
|
+
from ... base import Publisher
|
9
|
+
|
10
|
+
from . serialize import to_subgraph
|
11
|
+
|
12
|
+
class DocumentEmbeddingsImport:
|
13
|
+
|
14
|
+
def __init__(
|
15
|
+
self, ws, running, pulsar_client, queue
|
16
|
+
):
|
17
|
+
|
18
|
+
self.ws = ws
|
19
|
+
self.running = running
|
20
|
+
|
21
|
+
self.publisher = Publisher(
|
22
|
+
pulsar_client, topic = queue, schema = DocumentEmbeddings
|
23
|
+
)
|
24
|
+
|
25
|
+
async def destroy(self):
|
26
|
+
self.running.stop()
|
27
|
+
|
28
|
+
if self.ws:
|
29
|
+
await self.ws.close()
|
30
|
+
|
31
|
+
await self.publisher.stop()
|
32
|
+
|
33
|
+
async def receive(self, msg):
|
34
|
+
|
35
|
+
data = msg.json()
|
36
|
+
|
37
|
+
elt = DocumentEmbeddings(
|
38
|
+
metadata=Metadata(
|
39
|
+
id=data["metadata"]["id"],
|
40
|
+
metadata=to_subgraph(data["metadata"]["metadata"]),
|
41
|
+
user=data["metadata"]["user"],
|
42
|
+
collection=data["metadata"]["collection"],
|
43
|
+
),
|
44
|
+
chunks=[
|
45
|
+
ChunkEmbeddings(
|
46
|
+
chunk=de["chunk"].encode("utf-8"),
|
47
|
+
vectors=de["vectors"],
|
48
|
+
)
|
49
|
+
for de in data["chunks"]
|
50
|
+
],
|
51
|
+
)
|
52
|
+
|
53
|
+
await self.publisher.send(None, elt)
|
54
|
+
|
55
|
+
async def run(self):
|
56
|
+
|
57
|
+
while self.running.get():
|
58
|
+
await asyncio.sleep(0.5)
|
59
|
+
|
60
|
+
if self.ws:
|
61
|
+
await self.ws.close()
|
62
|
+
|
63
|
+
self.ws = None
|
64
|
+
|
@@ -1,19 +1,18 @@
|
|
1
1
|
|
2
2
|
import base64
|
3
3
|
|
4
|
-
from
|
5
|
-
from .. schema import document_ingest_queue
|
4
|
+
from ... schema import Document, Metadata
|
6
5
|
|
7
6
|
from . sender import ServiceSender
|
8
7
|
from . serialize import to_subgraph
|
9
8
|
|
10
|
-
class
|
11
|
-
def __init__(self, pulsar_client):
|
9
|
+
class DocumentLoad(ServiceSender):
|
10
|
+
def __init__(self, pulsar_client, queue):
|
12
11
|
|
13
|
-
super(
|
14
|
-
pulsar_client=pulsar_client,
|
15
|
-
|
16
|
-
|
12
|
+
super(DocumentLoad, self).__init__(
|
13
|
+
pulsar_client = pulsar_client,
|
14
|
+
queue = queue,
|
15
|
+
schema = Document,
|
17
16
|
)
|
18
17
|
|
19
18
|
def to_request(self, body):
|
@@ -1,20 +1,22 @@
|
|
1
1
|
|
2
|
-
from
|
3
|
-
from .. schema import document_rag_request_queue
|
4
|
-
from .. schema import document_rag_response_queue
|
2
|
+
from ... schema import DocumentRagQuery, DocumentRagResponse
|
5
3
|
|
6
|
-
from . endpoint import ServiceEndpoint
|
7
4
|
from . requestor import ServiceRequestor
|
8
5
|
|
9
6
|
class DocumentRagRequestor(ServiceRequestor):
|
10
|
-
def __init__(
|
7
|
+
def __init__(
|
8
|
+
self, pulsar_client, request_queue, response_queue, timeout,
|
9
|
+
consumer, subscriber,
|
10
|
+
):
|
11
11
|
|
12
12
|
super(DocumentRagRequestor, self).__init__(
|
13
13
|
pulsar_client=pulsar_client,
|
14
|
-
request_queue=
|
15
|
-
response_queue=
|
14
|
+
request_queue=request_queue,
|
15
|
+
response_queue=response_queue,
|
16
16
|
request_schema=DocumentRagQuery,
|
17
17
|
response_schema=DocumentRagResponse,
|
18
|
+
subscription = subscriber,
|
19
|
+
consumer_name = consumer,
|
18
20
|
timeout=timeout,
|
19
21
|
)
|
20
22
|
|
@@ -1,12 +1,11 @@
|
|
1
1
|
|
2
|
-
from
|
2
|
+
from ... schema import EmbeddingsRequest, EmbeddingsResponse
|
3
3
|
|
4
|
-
from . endpoint import ServiceEndpoint
|
5
4
|
from . requestor import ServiceRequestor
|
6
5
|
|
7
6
|
class EmbeddingsRequestor(ServiceRequestor):
|
8
7
|
def __init__(
|
9
|
-
self, pulsar_client, request_queue, response_queue, timeout,
|
8
|
+
self, pulsar_client, request_queue, response_queue, timeout,
|
10
9
|
consumer, subscriber,
|
11
10
|
):
|
12
11
|
|
@@ -1,16 +1,17 @@
|
|
1
1
|
|
2
|
-
from
|
3
|
-
from
|
4
|
-
from
|
2
|
+
from ... schema import FlowRequest, FlowResponse
|
3
|
+
from ... schema import flow_request_queue
|
4
|
+
from ... schema import flow_response_queue
|
5
5
|
|
6
|
-
from . endpoint import ServiceEndpoint
|
7
6
|
from . requestor import ServiceRequestor
|
8
7
|
|
9
8
|
class FlowRequestor(ServiceRequestor):
|
10
|
-
def __init__(self, pulsar_client,
|
9
|
+
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
11
10
|
|
12
11
|
super(FlowRequestor, self).__init__(
|
13
12
|
pulsar_client=pulsar_client,
|
13
|
+
consumer_name = consumer,
|
14
|
+
subscription = subscriber,
|
14
15
|
request_queue=flow_request_queue,
|
15
16
|
response_queue=flow_response_queue,
|
16
17
|
request_schema=FlowRequest,
|
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
import asyncio
|
3
|
+
import queue
|
4
|
+
import uuid
|
5
|
+
|
6
|
+
from ... schema import GraphEmbeddings
|
7
|
+
from ... base import Subscriber
|
8
|
+
|
9
|
+
from . serialize import serialize_graph_embeddings
|
10
|
+
|
11
|
+
class GraphEmbeddingsExport:
|
12
|
+
|
13
|
+
def __init__(
|
14
|
+
self, ws, running, pulsar_client, queue, consumer, subscriber
|
15
|
+
):
|
16
|
+
|
17
|
+
self.ws = ws
|
18
|
+
self.running = running
|
19
|
+
self.pulsar_client = pulsar_client
|
20
|
+
self.queue = queue
|
21
|
+
self.consumer = consumer
|
22
|
+
self.subscriber = subscriber
|
23
|
+
|
24
|
+
async def destroy(self):
|
25
|
+
self.running.stop()
|
26
|
+
await self.ws.close()
|
27
|
+
|
28
|
+
async def receive(self, msg):
|
29
|
+
# Ignore incoming info from websocket
|
30
|
+
pass
|
31
|
+
|
32
|
+
async def run(self):
|
33
|
+
|
34
|
+
subs = Subscriber(
|
35
|
+
client = self.pulsar_client, topic = self.queue,
|
36
|
+
consumer_name = self.consumer, subscription = self.subscriber,
|
37
|
+
schema = GraphEmbeddings
|
38
|
+
)
|
39
|
+
|
40
|
+
await subs.start()
|
41
|
+
|
42
|
+
id = str(uuid.uuid4())
|
43
|
+
q = await subs.subscribe_all(id)
|
44
|
+
|
45
|
+
while self.running.get():
|
46
|
+
try:
|
47
|
+
|
48
|
+
resp = await asyncio.wait_for(q.get(), timeout=0.5)
|
49
|
+
await self.ws.send_json(serialize_graph_embeddings(resp))
|
50
|
+
|
51
|
+
except TimeoutError:
|
52
|
+
continue
|
53
|
+
|
54
|
+
except queue.Empty:
|
55
|
+
continue
|
56
|
+
|
57
|
+
except Exception as e:
|
58
|
+
print(f"Exception: {str(e)}", flush=True)
|
59
|
+
break
|
60
|
+
|
61
|
+
await subs.unsubscribe_all(id)
|
62
|
+
|
63
|
+
await subs.stop()
|
64
|
+
|
65
|
+
await self.ws.close()
|
66
|
+
self.running.stop()
|
67
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
import asyncio
|
3
|
+
import uuid
|
4
|
+
from aiohttp import WSMsgType
|
5
|
+
|
6
|
+
from ... schema import Metadata
|
7
|
+
from ... schema import GraphEmbeddings, EntityEmbeddings
|
8
|
+
from ... base import Publisher
|
9
|
+
|
10
|
+
from . serialize import to_subgraph, to_value
|
11
|
+
|
12
|
+
class GraphEmbeddingsImport:
|
13
|
+
|
14
|
+
def __init__(
|
15
|
+
self, ws, running, pulsar_client, queue
|
16
|
+
):
|
17
|
+
|
18
|
+
self.ws = ws
|
19
|
+
self.running = running
|
20
|
+
|
21
|
+
self.publisher = Publisher(
|
22
|
+
pulsar_client, topic = queue, schema = GraphEmbeddings
|
23
|
+
)
|
24
|
+
|
25
|
+
async def destroy(self):
|
26
|
+
self.running.stop()
|
27
|
+
|
28
|
+
if self.ws:
|
29
|
+
await self.ws.close()
|
30
|
+
|
31
|
+
await self.publisher.stop()
|
32
|
+
|
33
|
+
async def receive(self, msg):
|
34
|
+
|
35
|
+
data = msg.json()
|
36
|
+
|
37
|
+
elt = GraphEmbeddings(
|
38
|
+
metadata=Metadata(
|
39
|
+
id=data["metadata"]["id"],
|
40
|
+
metadata=to_subgraph(data["metadata"]["metadata"]),
|
41
|
+
user=data["metadata"]["user"],
|
42
|
+
collection=data["metadata"]["collection"],
|
43
|
+
),
|
44
|
+
entities=[
|
45
|
+
EntityEmbeddings(
|
46
|
+
entity=to_value(ent["entity"]),
|
47
|
+
vectors=ent["vectors"],
|
48
|
+
)
|
49
|
+
for ent in data["entities"]
|
50
|
+
]
|
51
|
+
)
|
52
|
+
|
53
|
+
await self.publisher.send(None, elt)
|
54
|
+
|
55
|
+
async def run(self):
|
56
|
+
|
57
|
+
while self.running.get():
|
58
|
+
await asyncio.sleep(0.5)
|
59
|
+
|
60
|
+
if self.ws:
|
61
|
+
await self.ws.close()
|
62
|
+
|
63
|
+
self.ws = None
|
64
|
+
|
@@ -1,13 +1,12 @@
|
|
1
1
|
|
2
|
-
from
|
2
|
+
from ... schema import GraphEmbeddingsRequest, GraphEmbeddingsResponse
|
3
3
|
|
4
|
-
from . endpoint import ServiceEndpoint
|
5
4
|
from . requestor import ServiceRequestor
|
6
5
|
from . serialize import serialize_value
|
7
6
|
|
8
7
|
class GraphEmbeddingsQueryRequestor(ServiceRequestor):
|
9
8
|
def __init__(
|
10
|
-
self, pulsar_client, request_queue, response_queue, timeout,
|
9
|
+
self, pulsar_client, request_queue, response_queue, timeout,
|
11
10
|
consumer, subscriber,
|
12
11
|
):
|
13
12
|
|
@@ -1,12 +1,11 @@
|
|
1
1
|
|
2
|
-
from
|
2
|
+
from ... schema import GraphRagQuery, GraphRagResponse
|
3
3
|
|
4
|
-
from . endpoint import ServiceEndpoint
|
5
4
|
from . requestor import ServiceRequestor
|
6
5
|
|
7
6
|
class GraphRagRequestor(ServiceRequestor):
|
8
7
|
def __init__(
|
9
|
-
self, pulsar_client, request_queue, response_queue, timeout,
|
8
|
+
self, pulsar_client, request_queue, response_queue, timeout,
|
10
9
|
consumer, subscriber,
|
11
10
|
):
|
12
11
|
|
@@ -1,18 +1,19 @@
|
|
1
1
|
|
2
|
-
from
|
3
|
-
from
|
4
|
-
from
|
2
|
+
from ... schema import LibrarianRequest, LibrarianResponse
|
3
|
+
from ... schema import librarian_request_queue
|
4
|
+
from ... schema import librarian_response_queue
|
5
5
|
|
6
|
-
from . endpoint import ServiceEndpoint
|
7
6
|
from . requestor import ServiceRequestor
|
8
7
|
from . serialize import serialize_document_package, serialize_document_info
|
9
8
|
from . serialize import to_document_package, to_document_info, to_criteria
|
10
9
|
|
11
10
|
class LibrarianRequestor(ServiceRequestor):
|
12
|
-
def __init__(self, pulsar_client,
|
11
|
+
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
13
12
|
|
14
13
|
super(LibrarianRequestor, self).__init__(
|
15
14
|
pulsar_client=pulsar_client,
|
15
|
+
consumer_name = consumer,
|
16
|
+
subscription = subscriber,
|
16
17
|
request_queue=librarian_request_queue,
|
17
18
|
response_queue=librarian_response_queue,
|
18
19
|
request_schema=LibrarianRequest,
|
@@ -22,20 +23,16 @@ class LibrarianRequestor(ServiceRequestor):
|
|
22
23
|
|
23
24
|
def to_request(self, body):
|
24
25
|
|
25
|
-
print("TRR")
|
26
26
|
if "document" in body:
|
27
27
|
dp = to_document_package(body["document"])
|
28
28
|
else:
|
29
29
|
dp = None
|
30
30
|
|
31
|
-
print("GOT")
|
32
31
|
if "criteria" in body:
|
33
32
|
criteria = to_criteria(body["criteria"])
|
34
33
|
else:
|
35
34
|
criteria = None
|
36
35
|
|
37
|
-
print("ASLDKJ")
|
38
|
-
|
39
36
|
return LibrarianRequest(
|
40
37
|
operation = body.get("operation", None),
|
41
38
|
id = body.get("id", None),
|