trustgraph-flow 0.22.6__tar.gz → 0.22.8__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.22.6 → trustgraph-flow-0.22.8}/PKG-INFO +2 -2
- trustgraph-flow-0.22.8/trustgraph/config/service/flow.py +210 -0
- trustgraph-flow-0.22.8/trustgraph/config/service/service.py +257 -0
- trustgraph-flow-0.22.8/trustgraph/flow_version.py +1 -0
- trustgraph-flow-0.22.8/trustgraph/gateway/flow.py +51 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/mux.py +0 -1
- trustgraph-flow-0.22.8/trustgraph/gateway/service.py +369 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph_flow.egg-info/SOURCES.txt +2 -0
- trustgraph-flow-0.22.6/trustgraph/config/service/service.py +0 -152
- trustgraph-flow-0.22.6/trustgraph/flow_version.py +0 -1
- trustgraph-flow-0.22.6/trustgraph/gateway/service.py +0 -359
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/README.md +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/agent-manager-react +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/api-gateway +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/chunker-token +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/config-svc +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/de-query-pinecone +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/de-write-pinecone +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/document-embeddings +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/document-rag +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/embeddings-fastembed +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/ge-query-pinecone +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/ge-write-pinecone +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/graph-embeddings +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/graph-rag +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/librarian +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/metering +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/object-extract-row +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/pdf-ocr-mistral +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/prompt-generic +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/prompt-template +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/run-processing +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-azure-openai +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-googleaistudio +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-lmstudio +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-mistral +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-query-falkordb +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-query-memgraph +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-write-falkordb +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-write-memgraph +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/scripts/wikipedia-lookup +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/setup.cfg +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/setup.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/agent/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/agent/react/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/agent/react/types.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/config/service/config.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/external/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/extract/object/row/extract.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/agent.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/auth.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/config.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/dbpedia.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/document_embeddings_load.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/document_embeddings_stream.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/document_load.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/document_rag.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/embeddings.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/encyclopedia.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/endpoint.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/graph_embeddings_load.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/graph_embeddings_query.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/graph_embeddings_stream.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/graph_rag.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/internet_search.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/librarian.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/metrics.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/prompt.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/requestor.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/running.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/sender.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/serialize.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/socket.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/text_completion.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/text_load.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/triples_load.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/triples_query.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/gateway/triples_stream.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/librarian/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/librarian/table_store.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/metering/pricelist.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/template/prompt_manager.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph-flow-0.22.6 → trustgraph-flow-0.22.8}/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.22.
|
3
|
+
Version: 0.22.8
|
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.22.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.22.8.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -0,0 +1,210 @@
|
|
1
|
+
|
2
|
+
from trustgraph.schema import FlowResponse, Error
|
3
|
+
import json
|
4
|
+
|
5
|
+
class FlowConfig:
|
6
|
+
def __init__(self, config):
|
7
|
+
|
8
|
+
self.config = config
|
9
|
+
|
10
|
+
async def handle_list_classes(self, msg):
|
11
|
+
|
12
|
+
names = list(self.config["flow-classes"].keys())
|
13
|
+
|
14
|
+
return FlowResponse(
|
15
|
+
error = None,
|
16
|
+
class_names = names,
|
17
|
+
)
|
18
|
+
|
19
|
+
async def handle_get_class(self, msg):
|
20
|
+
|
21
|
+
return FlowResponse(
|
22
|
+
error = None,
|
23
|
+
class_definition = self.config["flow-classes"][msg.class_name],
|
24
|
+
)
|
25
|
+
|
26
|
+
async def handle_put_class(self, msg):
|
27
|
+
|
28
|
+
self.config["flow-classes"][msg.class_name] = msg.class_definition
|
29
|
+
|
30
|
+
await self.config.push()
|
31
|
+
|
32
|
+
return FlowResponse(
|
33
|
+
error = None,
|
34
|
+
)
|
35
|
+
|
36
|
+
async def handle_delete_class(self, msg):
|
37
|
+
|
38
|
+
print(msg)
|
39
|
+
|
40
|
+
del self.config["flow-classes"][msg.class_name]
|
41
|
+
|
42
|
+
await self.config.push()
|
43
|
+
|
44
|
+
return FlowResponse(
|
45
|
+
error = None,
|
46
|
+
)
|
47
|
+
|
48
|
+
async def handle_list_flows(self, msg):
|
49
|
+
|
50
|
+
names = list(self.config["flows"].keys())
|
51
|
+
|
52
|
+
return FlowResponse(
|
53
|
+
error = None,
|
54
|
+
flow_ids = names,
|
55
|
+
)
|
56
|
+
|
57
|
+
async def handle_get_flow(self, msg):
|
58
|
+
|
59
|
+
flow = self.config["flows"][msg.flow_id]
|
60
|
+
|
61
|
+
return FlowResponse(
|
62
|
+
error = None,
|
63
|
+
flow = flow,
|
64
|
+
)
|
65
|
+
|
66
|
+
async def handle_start_flow(self, msg):
|
67
|
+
|
68
|
+
if msg.class_name is None:
|
69
|
+
raise RuntimeError("No class name")
|
70
|
+
|
71
|
+
if msg.flow_id is None:
|
72
|
+
raise RuntimeError("No flow ID")
|
73
|
+
|
74
|
+
if msg.flow_id in self.config["flows"]:
|
75
|
+
raise RuntimeError("Flow already exists")
|
76
|
+
|
77
|
+
if msg.description is None:
|
78
|
+
raise RuntimeError("No description")
|
79
|
+
|
80
|
+
if msg.class_name not in self.config["flow-classes"]:
|
81
|
+
raise RuntimeError("Class does not exist")
|
82
|
+
|
83
|
+
def repl_template(tmp):
|
84
|
+
return tmp.replace(
|
85
|
+
"{class}", msg.class_name
|
86
|
+
).replace(
|
87
|
+
"{id}", msg.flow_id
|
88
|
+
)
|
89
|
+
|
90
|
+
cls = json.loads(self.config["flow-classes"][msg.class_name])
|
91
|
+
|
92
|
+
for kind in ("class", "flow"):
|
93
|
+
|
94
|
+
for k, v in cls[kind].items():
|
95
|
+
|
96
|
+
processor, variant = k.split(":", 1)
|
97
|
+
|
98
|
+
variant = repl_template(variant)
|
99
|
+
|
100
|
+
v = {
|
101
|
+
repl_template(k2): repl_template(v2)
|
102
|
+
for k2, v2 in v.items()
|
103
|
+
}
|
104
|
+
|
105
|
+
if processor in self.config["flows-active"]:
|
106
|
+
target = json.loads(self.config["flows-active"][processor])
|
107
|
+
else:
|
108
|
+
target = {}
|
109
|
+
|
110
|
+
if variant not in target:
|
111
|
+
target[variant] = v
|
112
|
+
|
113
|
+
self.config["flows-active"][processor] = json.dumps(target)
|
114
|
+
|
115
|
+
self.config["flows"][msg.flow_id] = json.dumps({
|
116
|
+
"description": msg.description,
|
117
|
+
"class-name": msg.class_name,
|
118
|
+
})
|
119
|
+
|
120
|
+
await self.config.push()
|
121
|
+
|
122
|
+
return FlowResponse(
|
123
|
+
error = None,
|
124
|
+
)
|
125
|
+
|
126
|
+
async def handle_stop_flow(self, msg):
|
127
|
+
|
128
|
+
if msg.flow_id is None:
|
129
|
+
raise RuntimeError("No flow ID")
|
130
|
+
|
131
|
+
if msg.flow_id not in self.config["flows"]:
|
132
|
+
raise RuntimeError("Flow ID invalid")
|
133
|
+
|
134
|
+
flow = json.loads(self.config["flows"][msg.flow_id])
|
135
|
+
|
136
|
+
if "class-name" not in flow:
|
137
|
+
raise RuntimeError("Internal error: flow has no flow class")
|
138
|
+
|
139
|
+
class_name = flow["class-name"]
|
140
|
+
|
141
|
+
cls = json.loads(self.config["flow-classes"][class_name])
|
142
|
+
|
143
|
+
def repl_template(tmp):
|
144
|
+
return tmp.replace(
|
145
|
+
"{class}", class_name
|
146
|
+
).replace(
|
147
|
+
"{id}", msg.flow_id
|
148
|
+
)
|
149
|
+
|
150
|
+
for kind in ("flow",):
|
151
|
+
|
152
|
+
for k, v in cls[kind].items():
|
153
|
+
|
154
|
+
processor, variant = k.split(":", 1)
|
155
|
+
|
156
|
+
variant = repl_template(variant)
|
157
|
+
|
158
|
+
if processor in self.config["flows-active"]:
|
159
|
+
target = json.loads(self.config["flows-active"][processor])
|
160
|
+
else:
|
161
|
+
target = {}
|
162
|
+
|
163
|
+
if variant in target:
|
164
|
+
del target[variant]
|
165
|
+
|
166
|
+
self.config["flows-active"][processor] = json.dumps(target)
|
167
|
+
|
168
|
+
if msg.flow_id in self.config["flows"]:
|
169
|
+
del self.config["flows"][msg.flow_id]
|
170
|
+
|
171
|
+
await self.config.push()
|
172
|
+
|
173
|
+
return FlowResponse(
|
174
|
+
error = None,
|
175
|
+
)
|
176
|
+
|
177
|
+
async def handle(self, msg):
|
178
|
+
|
179
|
+
print("Handle message ", msg.operation)
|
180
|
+
|
181
|
+
if msg.operation == "list-classes":
|
182
|
+
resp = await self.handle_list_classes(msg)
|
183
|
+
elif msg.operation == "get-class":
|
184
|
+
resp = await self.handle_get_class(msg)
|
185
|
+
elif msg.operation == "put-class":
|
186
|
+
resp = await self.handle_put_class(msg)
|
187
|
+
elif msg.operation == "delete-class":
|
188
|
+
resp = await self.handle_delete_class(msg)
|
189
|
+
elif msg.operation == "list-flows":
|
190
|
+
resp = await self.handle_list_flows(msg)
|
191
|
+
elif msg.operation == "get-flow":
|
192
|
+
resp = await self.handle_get_flow(msg)
|
193
|
+
elif msg.operation == "start-flow":
|
194
|
+
resp = await self.handle_start_flow(msg)
|
195
|
+
elif msg.operation == "stop-flow":
|
196
|
+
resp = await self.handle_stop_flow(msg)
|
197
|
+
else:
|
198
|
+
|
199
|
+
resp = FlowResponse(
|
200
|
+
value=None,
|
201
|
+
directory=None,
|
202
|
+
values=None,
|
203
|
+
error=Error(
|
204
|
+
type = "bad-operation",
|
205
|
+
message = "Bad operation"
|
206
|
+
)
|
207
|
+
)
|
208
|
+
|
209
|
+
return resp
|
210
|
+
|
@@ -0,0 +1,257 @@
|
|
1
|
+
|
2
|
+
"""
|
3
|
+
Config service. Manages system global configuration state
|
4
|
+
"""
|
5
|
+
|
6
|
+
from pulsar.schema import JsonSchema
|
7
|
+
|
8
|
+
from trustgraph.schema import Error
|
9
|
+
|
10
|
+
from trustgraph.schema import ConfigRequest, ConfigResponse, ConfigPush
|
11
|
+
from trustgraph.schema import config_request_queue, config_response_queue
|
12
|
+
from trustgraph.schema import config_push_queue
|
13
|
+
|
14
|
+
from trustgraph.schema import FlowRequest, FlowResponse
|
15
|
+
from trustgraph.schema import flow_request_queue, flow_response_queue
|
16
|
+
|
17
|
+
from trustgraph.log_level import LogLevel
|
18
|
+
from trustgraph.base import AsyncProcessor, Consumer, Producer
|
19
|
+
|
20
|
+
from . config import Configuration
|
21
|
+
from . flow import FlowConfig
|
22
|
+
|
23
|
+
from ... base import ProcessorMetrics, ConsumerMetrics, ProducerMetrics
|
24
|
+
from ... base import Consumer, Producer
|
25
|
+
|
26
|
+
default_ident = "config-svc"
|
27
|
+
|
28
|
+
default_config_request_queue = config_request_queue
|
29
|
+
default_config_response_queue = config_response_queue
|
30
|
+
default_config_push_queue = config_push_queue
|
31
|
+
|
32
|
+
default_flow_request_queue = flow_request_queue
|
33
|
+
default_flow_response_queue = flow_response_queue
|
34
|
+
|
35
|
+
class Processor(AsyncProcessor):
|
36
|
+
|
37
|
+
def __init__(self, **params):
|
38
|
+
|
39
|
+
config_request_queue = params.get(
|
40
|
+
"config_request_queue", default_config_request_queue
|
41
|
+
)
|
42
|
+
config_response_queue = params.get(
|
43
|
+
"config_response_queue", default_config_response_queue
|
44
|
+
)
|
45
|
+
config_push_queue = params.get(
|
46
|
+
"config_push_queue", default_config_push_queue
|
47
|
+
)
|
48
|
+
|
49
|
+
flow_request_queue = params.get(
|
50
|
+
"flow_request_queue", default_flow_request_queue
|
51
|
+
)
|
52
|
+
flow_response_queue = params.get(
|
53
|
+
"flow_response_queue", default_flow_response_queue
|
54
|
+
)
|
55
|
+
|
56
|
+
id = params.get("id")
|
57
|
+
|
58
|
+
flow_request_schema = FlowRequest
|
59
|
+
flow_response_schema = FlowResponse
|
60
|
+
|
61
|
+
super(Processor, self).__init__(
|
62
|
+
**params | {
|
63
|
+
"config_request_schema": ConfigRequest.__name__,
|
64
|
+
"config_response_schema": ConfigResponse.__name__,
|
65
|
+
"config_push_schema": ConfigPush.__name__,
|
66
|
+
"flow_request_schema": FlowRequest.__name__,
|
67
|
+
"flow_response_schema": FlowResponse.__name__,
|
68
|
+
}
|
69
|
+
)
|
70
|
+
|
71
|
+
config_request_metrics = ConsumerMetrics(
|
72
|
+
processor = self.id, flow = None, name = "config-request"
|
73
|
+
)
|
74
|
+
config_response_metrics = ProducerMetrics(
|
75
|
+
processor = self.id, flow = None, name = "config-response"
|
76
|
+
)
|
77
|
+
config_push_metrics = ProducerMetrics(
|
78
|
+
processor = self.id, flow = None, name = "config-push"
|
79
|
+
)
|
80
|
+
|
81
|
+
flow_request_metrics = ConsumerMetrics(
|
82
|
+
processor = self.id, flow = None, name = "flow-request"
|
83
|
+
)
|
84
|
+
flow_response_metrics = ProducerMetrics(
|
85
|
+
processor = self.id, flow = None, name = "flow-response"
|
86
|
+
)
|
87
|
+
|
88
|
+
self.config_request_consumer = Consumer(
|
89
|
+
taskgroup = self.taskgroup,
|
90
|
+
client = self.pulsar_client,
|
91
|
+
flow = None,
|
92
|
+
topic = config_request_queue,
|
93
|
+
subscriber = id,
|
94
|
+
schema = ConfigRequest,
|
95
|
+
handler = self.on_config_request,
|
96
|
+
metrics = config_request_metrics,
|
97
|
+
)
|
98
|
+
|
99
|
+
self.config_response_producer = Producer(
|
100
|
+
client = self.pulsar_client,
|
101
|
+
topic = config_response_queue,
|
102
|
+
schema = ConfigResponse,
|
103
|
+
metrics = config_response_metrics,
|
104
|
+
)
|
105
|
+
|
106
|
+
self.config_push_producer = Producer(
|
107
|
+
client = self.pulsar_client,
|
108
|
+
topic = config_push_queue,
|
109
|
+
schema = ConfigPush,
|
110
|
+
metrics = config_push_metrics,
|
111
|
+
)
|
112
|
+
|
113
|
+
self.flow_request_consumer = Consumer(
|
114
|
+
taskgroup = self.taskgroup,
|
115
|
+
client = self.pulsar_client,
|
116
|
+
flow = None,
|
117
|
+
topic = flow_request_queue,
|
118
|
+
subscriber = id,
|
119
|
+
schema = FlowRequest,
|
120
|
+
handler = self.on_flow_request,
|
121
|
+
metrics = flow_request_metrics,
|
122
|
+
)
|
123
|
+
|
124
|
+
self.flow_response_producer = Producer(
|
125
|
+
client = self.pulsar_client,
|
126
|
+
topic = flow_response_queue,
|
127
|
+
schema = FlowResponse,
|
128
|
+
metrics = flow_response_metrics,
|
129
|
+
)
|
130
|
+
|
131
|
+
self.config = Configuration(self.push)
|
132
|
+
self.flow = FlowConfig(self.config)
|
133
|
+
|
134
|
+
print("Service initialised.")
|
135
|
+
|
136
|
+
async def start(self):
|
137
|
+
|
138
|
+
await self.push()
|
139
|
+
await self.config_request_consumer.start()
|
140
|
+
await self.flow_request_consumer.start()
|
141
|
+
|
142
|
+
async def push(self):
|
143
|
+
|
144
|
+
resp = ConfigPush(
|
145
|
+
version = self.config.version,
|
146
|
+
value = None,
|
147
|
+
directory = None,
|
148
|
+
values = None,
|
149
|
+
config = self.config,
|
150
|
+
error = None,
|
151
|
+
)
|
152
|
+
|
153
|
+
await self.config_push_producer.send(resp)
|
154
|
+
|
155
|
+
print("Pushed version ", self.config.version)
|
156
|
+
|
157
|
+
async def on_config_request(self, msg, consumer, flow):
|
158
|
+
|
159
|
+
try:
|
160
|
+
|
161
|
+
v = msg.value()
|
162
|
+
|
163
|
+
# Sender-produced ID
|
164
|
+
id = msg.properties()["id"]
|
165
|
+
|
166
|
+
print(f"Handling {id}...", flush=True)
|
167
|
+
|
168
|
+
resp = await self.config.handle(v)
|
169
|
+
|
170
|
+
await self.config_response_producer.send(
|
171
|
+
resp, properties={"id": id}
|
172
|
+
)
|
173
|
+
|
174
|
+
except Exception as e:
|
175
|
+
|
176
|
+
resp = ConfigResponse(
|
177
|
+
error=Error(
|
178
|
+
type = "config-error",
|
179
|
+
message = str(e),
|
180
|
+
),
|
181
|
+
text=None,
|
182
|
+
)
|
183
|
+
|
184
|
+
await self.config_response_producer.send(
|
185
|
+
resp, properties={"id": id}
|
186
|
+
)
|
187
|
+
|
188
|
+
async def on_flow_request(self, msg, consumer, flow):
|
189
|
+
|
190
|
+
try:
|
191
|
+
|
192
|
+
v = msg.value()
|
193
|
+
|
194
|
+
# Sender-produced ID
|
195
|
+
id = msg.properties()["id"]
|
196
|
+
|
197
|
+
print(f"Handling {id}...", flush=True)
|
198
|
+
|
199
|
+
resp = await self.flow.handle(v)
|
200
|
+
|
201
|
+
await self.flow_response_producer.send(
|
202
|
+
resp, properties={"id": id}
|
203
|
+
)
|
204
|
+
|
205
|
+
except Exception as e:
|
206
|
+
|
207
|
+
resp = FlowResponse(
|
208
|
+
error=Error(
|
209
|
+
type = "flow-error",
|
210
|
+
message = str(e),
|
211
|
+
),
|
212
|
+
text=None,
|
213
|
+
)
|
214
|
+
|
215
|
+
await self.flow_response_producer.send(
|
216
|
+
resp, properties={"id": id}
|
217
|
+
)
|
218
|
+
|
219
|
+
@staticmethod
|
220
|
+
def add_args(parser):
|
221
|
+
|
222
|
+
AsyncProcessor.add_args(parser)
|
223
|
+
|
224
|
+
parser.add_argument(
|
225
|
+
'--config-request-queue',
|
226
|
+
default=default_config_request_queue,
|
227
|
+
help=f'Config request queue (default: {default_config_request_queue})'
|
228
|
+
)
|
229
|
+
|
230
|
+
parser.add_argument(
|
231
|
+
'--config-response-queue',
|
232
|
+
default=default_config_response_queue,
|
233
|
+
help=f'Config response queue {default_config_response_queue}',
|
234
|
+
)
|
235
|
+
|
236
|
+
parser.add_argument(
|
237
|
+
'--push-queue',
|
238
|
+
default=default_config_push_queue,
|
239
|
+
help=f'Config push queue (default: {default_config_push_queue})'
|
240
|
+
)
|
241
|
+
|
242
|
+
parser.add_argument(
|
243
|
+
'--flow-request-queue',
|
244
|
+
default=default_flow_request_queue,
|
245
|
+
help=f'Flow request queue (default: {default_flow_request_queue})'
|
246
|
+
)
|
247
|
+
|
248
|
+
parser.add_argument(
|
249
|
+
'--flow-response-queue',
|
250
|
+
default=default_flow_response_queue,
|
251
|
+
help=f'Flow response queue {default_flow_response_queue}',
|
252
|
+
)
|
253
|
+
|
254
|
+
def run():
|
255
|
+
|
256
|
+
Processor.launch(default_ident, __doc__)
|
257
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.22.8"
|
@@ -0,0 +1,51 @@
|
|
1
|
+
|
2
|
+
from .. schema import FlowRequest, FlowResponse, ConfigKey, ConfigValue
|
3
|
+
from .. schema import flow_request_queue
|
4
|
+
from .. schema import flow_response_queue
|
5
|
+
|
6
|
+
from . endpoint import ServiceEndpoint
|
7
|
+
from . requestor import ServiceRequestor
|
8
|
+
|
9
|
+
class FlowRequestor(ServiceRequestor):
|
10
|
+
def __init__(self, pulsar_client, timeout, auth):
|
11
|
+
|
12
|
+
super(FlowRequestor, self).__init__(
|
13
|
+
pulsar_client=pulsar_client,
|
14
|
+
request_queue=flow_request_queue,
|
15
|
+
response_queue=flow_response_queue,
|
16
|
+
request_schema=FlowRequest,
|
17
|
+
response_schema=FlowResponse,
|
18
|
+
timeout=timeout,
|
19
|
+
)
|
20
|
+
|
21
|
+
def to_request(self, body):
|
22
|
+
|
23
|
+
return FlowRequest(
|
24
|
+
operation = body.get("operation", None),
|
25
|
+
class_name = body.get("class-name", None),
|
26
|
+
class_definition = body.get("class-definition", None),
|
27
|
+
description = body.get("description", None),
|
28
|
+
flow_id = body.get("flow-id", None),
|
29
|
+
)
|
30
|
+
|
31
|
+
def from_response(self, message):
|
32
|
+
|
33
|
+
response = { }
|
34
|
+
|
35
|
+
if message.class_names is not None:
|
36
|
+
response["class-names"] = message.class_names
|
37
|
+
|
38
|
+
if message.flow_ids is not None:
|
39
|
+
response["flow-ids"] = message.flow_ids
|
40
|
+
|
41
|
+
if message.class_definition is not None:
|
42
|
+
response["class-definition"] = message.class_definition
|
43
|
+
|
44
|
+
if message.flow is not None:
|
45
|
+
response["flow"] = message.flow
|
46
|
+
|
47
|
+
if message.description is not None:
|
48
|
+
response["description"] = message.description
|
49
|
+
|
50
|
+
return response, True
|
51
|
+
|