trustgraph-flow 1.0.15__tar.gz → 1.0.17__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-1.0.15 → trustgraph-flow-1.0.17}/PKG-INFO +2 -2
- trustgraph-flow-1.0.17/trustgraph/flow_version.py +1 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/agent.py +6 -17
- trustgraph-flow-1.0.17/trustgraph/gateway/dispatch/config.py +31 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/document_embeddings_import.py +3 -19
- trustgraph-flow-1.0.17/trustgraph/gateway/dispatch/document_load.py +23 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/document_rag.py +6 -7
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/embeddings.py +6 -4
- trustgraph-flow-1.0.17/trustgraph/gateway/dispatch/flow.py +31 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/graph_embeddings_query.py +6 -16
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/graph_rag.py +6 -10
- trustgraph-flow-1.0.17/trustgraph/gateway/dispatch/knowledge.py +34 -0
- trustgraph-flow-1.0.17/trustgraph/gateway/dispatch/librarian.py +41 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/prompt.py +6 -15
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/serialize.py +7 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/text_completion.py +6 -5
- trustgraph-flow-1.0.17/trustgraph/gateway/dispatch/text_load.py +23 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/triples_query.py +6 -28
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- trustgraph-flow-1.0.15/trustgraph/flow_version.py +0 -1
- trustgraph-flow-1.0.15/trustgraph/gateway/dispatch/config.py +0 -78
- trustgraph-flow-1.0.15/trustgraph/gateway/dispatch/document_load.py +0 -40
- trustgraph-flow-1.0.15/trustgraph/gateway/dispatch/flow.py +0 -52
- trustgraph-flow-1.0.15/trustgraph/gateway/dispatch/knowledge.py +0 -97
- trustgraph-flow-1.0.15/trustgraph/gateway/dispatch/librarian.py +0 -91
- trustgraph-flow-1.0.15/trustgraph/gateway/dispatch/text_load.py +0 -44
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/README.md +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/agent-manager-react +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/api-gateway +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/chunker-token +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/config-svc +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/de-query-pinecone +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/de-write-pinecone +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/document-embeddings +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/document-rag +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/embeddings-fastembed +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/ge-query-pinecone +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/ge-write-pinecone +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/graph-embeddings +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/graph-rag +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/kg-manager +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/kg-store +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/librarian +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/metering +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/object-extract-row +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/pdf-ocr-mistral +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/prompt-generic +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/prompt-template +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/run-processing +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-azure-openai +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-googleaistudio +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-lmstudio +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-mistral +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-tgi +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/text-completion-vllm +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-query-falkordb +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-query-memgraph +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-write-falkordb +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-write-memgraph +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/scripts/wikipedia-lookup +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/setup.cfg +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/setup.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/agent/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/agent/react/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/agent/react/types.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/config/service/config.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/config/service/flow.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/config/service/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/cores/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/cores/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/cores/knowledge.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/cores/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/external/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/extract/object/row/extract.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/auth.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/config/receiver.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/core_export.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/core_import.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/manager.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/mux.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/requestor.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/sender.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/streamer.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/triples_export.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/triples_import.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/endpoint/manager.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/endpoint/metrics.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/endpoint/socket.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/running.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/unused/dbpedia.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/unused/encyclopedia.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/unused/internet_search.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/librarian/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/template/prompt_manager.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/tgi/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/model/text_completion/vllm/llm.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/knowledge/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/knowledge/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/knowledge/store.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/tables/__init__.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/tables/config.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/tables/knowledge.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/tables/library.py +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph_flow.egg-info/SOURCES.txt +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/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: 1.0.
|
3
|
+
Version: 1.0.17
|
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/v1.0.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v1.0.17.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__ = "1.0.17"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
from ... schema import AgentRequest, AgentResponse
|
3
|
+
from ... messaging import TranslatorRegistry
|
3
4
|
|
4
5
|
from . requestor import ServiceRequestor
|
5
6
|
|
@@ -20,24 +21,12 @@ class AgentRequestor(ServiceRequestor):
|
|
20
21
|
timeout=timeout,
|
21
22
|
)
|
22
23
|
|
24
|
+
self.request_translator = TranslatorRegistry.get_request_translator("agent")
|
25
|
+
self.response_translator = TranslatorRegistry.get_response_translator("agent")
|
26
|
+
|
23
27
|
def to_request(self, body):
|
24
|
-
return
|
25
|
-
question=body["question"]
|
26
|
-
)
|
28
|
+
return self.request_translator.to_pulsar(body)
|
27
29
|
|
28
30
|
def from_response(self, message):
|
29
|
-
|
30
|
-
}
|
31
|
-
|
32
|
-
if message.answer:
|
33
|
-
resp["answer"] = message.answer
|
34
|
-
|
35
|
-
if message.thought:
|
36
|
-
resp["thought"] = message.thought
|
37
|
-
|
38
|
-
if message.observation:
|
39
|
-
resp["observation"] = message.observation
|
40
|
-
|
41
|
-
# The 2nd boolean expression indicates whether we're done responding
|
42
|
-
return resp, (message.answer is not None)
|
31
|
+
return self.response_translator.from_response_with_completion(message)
|
43
32
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
from ... schema import ConfigRequest, ConfigResponse, ConfigKey, ConfigValue
|
3
|
+
from ... schema import config_request_queue
|
4
|
+
from ... schema import config_response_queue
|
5
|
+
from ... messaging import TranslatorRegistry
|
6
|
+
|
7
|
+
from . requestor import ServiceRequestor
|
8
|
+
|
9
|
+
class ConfigRequestor(ServiceRequestor):
|
10
|
+
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
11
|
+
|
12
|
+
super(ConfigRequestor, self).__init__(
|
13
|
+
pulsar_client=pulsar_client,
|
14
|
+
consumer_name = consumer,
|
15
|
+
subscription = subscriber,
|
16
|
+
request_queue=config_request_queue,
|
17
|
+
response_queue=config_response_queue,
|
18
|
+
request_schema=ConfigRequest,
|
19
|
+
response_schema=ConfigResponse,
|
20
|
+
timeout=timeout,
|
21
|
+
)
|
22
|
+
|
23
|
+
self.request_translator = TranslatorRegistry.get_request_translator("config")
|
24
|
+
self.response_translator = TranslatorRegistry.get_response_translator("config")
|
25
|
+
|
26
|
+
def to_request(self, body):
|
27
|
+
return self.request_translator.to_pulsar(body)
|
28
|
+
|
29
|
+
def from_response(self, message):
|
30
|
+
return self.response_translator.from_response_with_completion(message)
|
31
|
+
|
@@ -6,8 +6,7 @@ from aiohttp import WSMsgType
|
|
6
6
|
from ... schema import Metadata
|
7
7
|
from ... schema import DocumentEmbeddings, ChunkEmbeddings
|
8
8
|
from ... base import Publisher
|
9
|
-
|
10
|
-
from . serialize import to_subgraph
|
9
|
+
from ... messaging.translators.document_loading import DocumentEmbeddingsTranslator
|
11
10
|
|
12
11
|
class DocumentEmbeddingsImport:
|
13
12
|
|
@@ -17,6 +16,7 @@ class DocumentEmbeddingsImport:
|
|
17
16
|
|
18
17
|
self.ws = ws
|
19
18
|
self.running = running
|
19
|
+
self.translator = DocumentEmbeddingsTranslator()
|
20
20
|
|
21
21
|
self.publisher = Publisher(
|
22
22
|
pulsar_client, topic = queue, schema = DocumentEmbeddings
|
@@ -36,23 +36,7 @@ class DocumentEmbeddingsImport:
|
|
36
36
|
async def receive(self, msg):
|
37
37
|
|
38
38
|
data = msg.json()
|
39
|
-
|
40
|
-
elt = DocumentEmbeddings(
|
41
|
-
metadata=Metadata(
|
42
|
-
id=data["metadata"]["id"],
|
43
|
-
metadata=to_subgraph(data["metadata"]["metadata"]),
|
44
|
-
user=data["metadata"]["user"],
|
45
|
-
collection=data["metadata"]["collection"],
|
46
|
-
),
|
47
|
-
chunks=[
|
48
|
-
ChunkEmbeddings(
|
49
|
-
chunk=de["chunk"].encode("utf-8"),
|
50
|
-
vectors=de["vectors"],
|
51
|
-
)
|
52
|
-
for de in data["chunks"]
|
53
|
-
],
|
54
|
-
)
|
55
|
-
|
39
|
+
elt = self.translator.to_pulsar(data)
|
56
40
|
await self.publisher.send(None, elt)
|
57
41
|
|
58
42
|
async def run(self):
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
import base64
|
3
|
+
|
4
|
+
from ... schema import Document, Metadata
|
5
|
+
from ... messaging import TranslatorRegistry
|
6
|
+
|
7
|
+
from . sender import ServiceSender
|
8
|
+
|
9
|
+
class DocumentLoad(ServiceSender):
|
10
|
+
def __init__(self, pulsar_client, queue):
|
11
|
+
|
12
|
+
super(DocumentLoad, self).__init__(
|
13
|
+
pulsar_client = pulsar_client,
|
14
|
+
queue = queue,
|
15
|
+
schema = Document,
|
16
|
+
)
|
17
|
+
|
18
|
+
self.translator = TranslatorRegistry.get_request_translator("document")
|
19
|
+
|
20
|
+
def to_request(self, body):
|
21
|
+
print("Document received")
|
22
|
+
return self.translator.to_pulsar(body)
|
23
|
+
|
{trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/document_rag.py
RENAMED
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
from ... schema import DocumentRagQuery, DocumentRagResponse
|
3
|
+
from ... messaging import TranslatorRegistry
|
3
4
|
|
4
5
|
from . requestor import ServiceRequestor
|
5
6
|
|
@@ -20,14 +21,12 @@ class DocumentRagRequestor(ServiceRequestor):
|
|
20
21
|
timeout=timeout,
|
21
22
|
)
|
22
23
|
|
24
|
+
self.request_translator = TranslatorRegistry.get_request_translator("document-rag")
|
25
|
+
self.response_translator = TranslatorRegistry.get_response_translator("document-rag")
|
26
|
+
|
23
27
|
def to_request(self, body):
|
24
|
-
return
|
25
|
-
query=body["query"],
|
26
|
-
user=body.get("user", "trustgraph"),
|
27
|
-
collection=body.get("collection", "default"),
|
28
|
-
doc_limit=int(body.get("doc-limit", 20)),
|
29
|
-
)
|
28
|
+
return self.request_translator.to_pulsar(body)
|
30
29
|
|
31
30
|
def from_response(self, message):
|
32
|
-
return
|
31
|
+
return self.response_translator.from_response_with_completion(message)
|
33
32
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
from ... schema import EmbeddingsRequest, EmbeddingsResponse
|
3
|
+
from ... messaging import TranslatorRegistry
|
3
4
|
|
4
5
|
from . requestor import ServiceRequestor
|
5
6
|
|
@@ -20,11 +21,12 @@ class EmbeddingsRequestor(ServiceRequestor):
|
|
20
21
|
timeout=timeout,
|
21
22
|
)
|
22
23
|
|
24
|
+
self.request_translator = TranslatorRegistry.get_request_translator("embeddings")
|
25
|
+
self.response_translator = TranslatorRegistry.get_response_translator("embeddings")
|
26
|
+
|
23
27
|
def to_request(self, body):
|
24
|
-
return
|
25
|
-
text=body["text"]
|
26
|
-
)
|
28
|
+
return self.request_translator.to_pulsar(body)
|
27
29
|
|
28
30
|
def from_response(self, message):
|
29
|
-
return
|
31
|
+
return self.response_translator.from_response_with_completion(message)
|
30
32
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
from ... schema import FlowRequest, FlowResponse
|
3
|
+
from ... schema import flow_request_queue
|
4
|
+
from ... schema import flow_response_queue
|
5
|
+
from ... messaging import TranslatorRegistry
|
6
|
+
|
7
|
+
from . requestor import ServiceRequestor
|
8
|
+
|
9
|
+
class FlowRequestor(ServiceRequestor):
|
10
|
+
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
11
|
+
|
12
|
+
super(FlowRequestor, self).__init__(
|
13
|
+
pulsar_client=pulsar_client,
|
14
|
+
consumer_name = consumer,
|
15
|
+
subscription = subscriber,
|
16
|
+
request_queue=flow_request_queue,
|
17
|
+
response_queue=flow_response_queue,
|
18
|
+
request_schema=FlowRequest,
|
19
|
+
response_schema=FlowResponse,
|
20
|
+
timeout=timeout,
|
21
|
+
)
|
22
|
+
|
23
|
+
self.request_translator = TranslatorRegistry.get_request_translator("flow")
|
24
|
+
self.response_translator = TranslatorRegistry.get_response_translator("flow")
|
25
|
+
|
26
|
+
def to_request(self, body):
|
27
|
+
return self.request_translator.to_pulsar(body)
|
28
|
+
|
29
|
+
def from_response(self, message):
|
30
|
+
return self.response_translator.from_response_with_completion(message)
|
31
|
+
|
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
2
|
from ... schema import GraphEmbeddingsRequest, GraphEmbeddingsResponse
|
3
|
+
from ... messaging import TranslatorRegistry
|
3
4
|
|
4
5
|
from . requestor import ServiceRequestor
|
5
|
-
from . serialize import serialize_value
|
6
6
|
|
7
7
|
class GraphEmbeddingsQueryRequestor(ServiceRequestor):
|
8
8
|
def __init__(
|
@@ -21,22 +21,12 @@ class GraphEmbeddingsQueryRequestor(ServiceRequestor):
|
|
21
21
|
timeout=timeout,
|
22
22
|
)
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
limit = int(body.get("limit", 20))
|
24
|
+
self.request_translator = TranslatorRegistry.get_request_translator("graph-embeddings-query")
|
25
|
+
self.response_translator = TranslatorRegistry.get_response_translator("graph-embeddings-query")
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
limit = limit,
|
31
|
-
user = body.get("user", "trustgraph"),
|
32
|
-
collection = body.get("collection", "default"),
|
33
|
-
)
|
27
|
+
def to_request(self, body):
|
28
|
+
return self.request_translator.to_pulsar(body)
|
34
29
|
|
35
30
|
def from_response(self, message):
|
36
|
-
|
37
|
-
return {
|
38
|
-
"entities": [
|
39
|
-
serialize_value(ent) for ent in message.entities
|
40
|
-
]
|
41
|
-
}, True
|
31
|
+
return self.response_translator.from_response_with_completion(message)
|
42
32
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
from ... schema import GraphRagQuery, GraphRagResponse
|
3
|
+
from ... messaging import TranslatorRegistry
|
3
4
|
|
4
5
|
from . requestor import ServiceRequestor
|
5
6
|
|
@@ -20,17 +21,12 @@ class GraphRagRequestor(ServiceRequestor):
|
|
20
21
|
timeout=timeout,
|
21
22
|
)
|
22
23
|
|
24
|
+
self.request_translator = TranslatorRegistry.get_request_translator("graph-rag")
|
25
|
+
self.response_translator = TranslatorRegistry.get_response_translator("graph-rag")
|
26
|
+
|
23
27
|
def to_request(self, body):
|
24
|
-
return
|
25
|
-
query=body["query"],
|
26
|
-
user=body.get("user", "trustgraph"),
|
27
|
-
collection=body.get("collection", "default"),
|
28
|
-
entity_limit=int(body.get("entity-limit", 50)),
|
29
|
-
triple_limit=int(body.get("triple-limit", 30)),
|
30
|
-
max_subgraph_size=int(body.get("max-subgraph-size", 1000)),
|
31
|
-
max_path_length=int(body.get("max-path-length", 2)),
|
32
|
-
)
|
28
|
+
return self.request_translator.to_pulsar(body)
|
33
29
|
|
34
30
|
def from_response(self, message):
|
35
|
-
return
|
31
|
+
return self.response_translator.from_response_with_completion(message)
|
36
32
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
import base64
|
3
|
+
|
4
|
+
from ... schema import KnowledgeRequest, KnowledgeResponse, Triples
|
5
|
+
from ... schema import GraphEmbeddings, Metadata, EntityEmbeddings
|
6
|
+
from ... schema import knowledge_request_queue
|
7
|
+
from ... schema import knowledge_response_queue
|
8
|
+
from ... messaging import TranslatorRegistry
|
9
|
+
|
10
|
+
from . requestor import ServiceRequestor
|
11
|
+
|
12
|
+
class KnowledgeRequestor(ServiceRequestor):
|
13
|
+
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
14
|
+
|
15
|
+
super(KnowledgeRequestor, self).__init__(
|
16
|
+
pulsar_client=pulsar_client,
|
17
|
+
consumer_name = consumer,
|
18
|
+
subscription = subscriber,
|
19
|
+
request_queue=knowledge_request_queue,
|
20
|
+
response_queue=knowledge_response_queue,
|
21
|
+
request_schema=KnowledgeRequest,
|
22
|
+
response_schema=KnowledgeResponse,
|
23
|
+
timeout=timeout,
|
24
|
+
)
|
25
|
+
|
26
|
+
self.request_translator = TranslatorRegistry.get_request_translator("knowledge")
|
27
|
+
self.response_translator = TranslatorRegistry.get_response_translator("knowledge")
|
28
|
+
|
29
|
+
def to_request(self, body):
|
30
|
+
return self.request_translator.to_pulsar(body)
|
31
|
+
|
32
|
+
def from_response(self, message):
|
33
|
+
return self.response_translator.from_response_with_completion(message)
|
34
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
|
2
|
+
import base64
|
3
|
+
|
4
|
+
from ... schema import LibrarianRequest, LibrarianResponse
|
5
|
+
from ... schema import librarian_request_queue
|
6
|
+
from ... schema import librarian_response_queue
|
7
|
+
from ... messaging import TranslatorRegistry
|
8
|
+
|
9
|
+
from . requestor import ServiceRequestor
|
10
|
+
|
11
|
+
class LibrarianRequestor(ServiceRequestor):
|
12
|
+
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
13
|
+
|
14
|
+
super(LibrarianRequestor, self).__init__(
|
15
|
+
pulsar_client=pulsar_client,
|
16
|
+
consumer_name = consumer,
|
17
|
+
subscription = subscriber,
|
18
|
+
request_queue=librarian_request_queue,
|
19
|
+
response_queue=librarian_response_queue,
|
20
|
+
request_schema=LibrarianRequest,
|
21
|
+
response_schema=LibrarianResponse,
|
22
|
+
timeout=timeout,
|
23
|
+
)
|
24
|
+
|
25
|
+
self.request_translator = TranslatorRegistry.get_request_translator("librarian")
|
26
|
+
self.response_translator = TranslatorRegistry.get_response_translator("librarian")
|
27
|
+
|
28
|
+
def to_request(self, body):
|
29
|
+
# Handle base64 content processing
|
30
|
+
if "content" in body:
|
31
|
+
# Content gets base64 decoded & encoded again to ensure valid base64
|
32
|
+
content = base64.b64decode(body["content"].encode("utf-8"))
|
33
|
+
content = base64.b64encode(content).decode("utf-8")
|
34
|
+
body = body.copy()
|
35
|
+
body["content"] = content
|
36
|
+
|
37
|
+
return self.request_translator.to_pulsar(body)
|
38
|
+
|
39
|
+
def from_response(self, message):
|
40
|
+
return self.response_translator.from_response_with_completion(message)
|
41
|
+
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import json
|
3
3
|
|
4
4
|
from ... schema import PromptRequest, PromptResponse
|
5
|
+
from ... messaging import TranslatorRegistry
|
5
6
|
|
6
7
|
from . requestor import ServiceRequestor
|
7
8
|
|
@@ -22,22 +23,12 @@ class PromptRequestor(ServiceRequestor):
|
|
22
23
|
timeout=timeout,
|
23
24
|
)
|
24
25
|
|
26
|
+
self.request_translator = TranslatorRegistry.get_request_translator("prompt")
|
27
|
+
self.response_translator = TranslatorRegistry.get_response_translator("prompt")
|
28
|
+
|
25
29
|
def to_request(self, body):
|
26
|
-
return
|
27
|
-
id=body["id"],
|
28
|
-
terms={
|
29
|
-
k: json.dumps(v)
|
30
|
-
for k, v in body["variables"].items()
|
31
|
-
}
|
32
|
-
)
|
30
|
+
return self.request_translator.to_pulsar(body)
|
33
31
|
|
34
32
|
def from_response(self, message):
|
35
|
-
|
36
|
-
return {
|
37
|
-
"object": message.object
|
38
|
-
}, True
|
39
|
-
else:
|
40
|
-
return {
|
41
|
-
"text": message.text
|
42
|
-
}, True
|
33
|
+
return self.response_translator.from_response_with_completion(message)
|
43
34
|
|
@@ -3,6 +3,13 @@ import base64
|
|
3
3
|
|
4
4
|
from ... schema import Value, Triple, DocumentMetadata, ProcessingMetadata
|
5
5
|
|
6
|
+
# DEPRECATED: These functions have been moved to trustgraph.... messaging.translators
|
7
|
+
# Use the new messaging translation system instead for consistency and reusability.
|
8
|
+
# Examples:
|
9
|
+
# from trustgraph.... messaging.translators.primitives import ValueTranslator
|
10
|
+
# value_translator = ValueTranslator()
|
11
|
+
# pulsar_value = value_translator.to_pulsar({"v": "example", "e": True})
|
12
|
+
|
6
13
|
def to_value(x):
|
7
14
|
return Value(value=x["v"], is_uri=x["e"])
|
8
15
|
|
{trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/text_completion.py
RENAMED
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
from ... schema import TextCompletionRequest, TextCompletionResponse
|
3
|
+
from ... messaging import TranslatorRegistry
|
3
4
|
|
4
5
|
from . requestor import ServiceRequestor
|
5
6
|
|
@@ -20,12 +21,12 @@ class TextCompletionRequestor(ServiceRequestor):
|
|
20
21
|
timeout=timeout,
|
21
22
|
)
|
22
23
|
|
24
|
+
self.request_translator = TranslatorRegistry.get_request_translator("text-completion")
|
25
|
+
self.response_translator = TranslatorRegistry.get_response_translator("text-completion")
|
26
|
+
|
23
27
|
def to_request(self, body):
|
24
|
-
return
|
25
|
-
system=body["system"],
|
26
|
-
prompt=body["prompt"]
|
27
|
-
)
|
28
|
+
return self.request_translator.to_pulsar(body)
|
28
29
|
|
29
30
|
def from_response(self, message):
|
30
|
-
return
|
31
|
+
return self.response_translator.from_response_with_completion(message)
|
31
32
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
import base64
|
3
|
+
|
4
|
+
from ... schema import TextDocument, Metadata
|
5
|
+
from ... messaging import TranslatorRegistry
|
6
|
+
|
7
|
+
from . sender import ServiceSender
|
8
|
+
|
9
|
+
class TextLoad(ServiceSender):
|
10
|
+
def __init__(self, pulsar_client, queue):
|
11
|
+
|
12
|
+
super(TextLoad, self).__init__(
|
13
|
+
pulsar_client = pulsar_client,
|
14
|
+
queue = queue,
|
15
|
+
schema = TextDocument,
|
16
|
+
)
|
17
|
+
|
18
|
+
self.translator = TranslatorRegistry.get_request_translator("text-document")
|
19
|
+
|
20
|
+
def to_request(self, body):
|
21
|
+
print("Text document received")
|
22
|
+
return self.translator.to_pulsar(body)
|
23
|
+
|
{trustgraph-flow-1.0.15 → trustgraph-flow-1.0.17}/trustgraph/gateway/dispatch/triples_query.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
2
|
from ... schema import TriplesQueryRequest, TriplesQueryResponse, Triples
|
3
|
+
from ... messaging import TranslatorRegistry
|
3
4
|
|
4
5
|
from . requestor import ServiceRequestor
|
5
|
-
from . serialize import to_value, serialize_subgraph
|
6
6
|
|
7
7
|
class TriplesQueryRequestor(ServiceRequestor):
|
8
8
|
def __init__(
|
@@ -21,34 +21,12 @@ class TriplesQueryRequestor(ServiceRequestor):
|
|
21
21
|
timeout=timeout,
|
22
22
|
)
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
if "s" in body:
|
27
|
-
s = to_value(body["s"])
|
28
|
-
else:
|
29
|
-
s = None
|
30
|
-
|
31
|
-
if "p" in body:
|
32
|
-
p = to_value(body["p"])
|
33
|
-
else:
|
34
|
-
p = None
|
35
|
-
|
36
|
-
if "o" in body:
|
37
|
-
o = to_value(body["o"])
|
38
|
-
else:
|
39
|
-
o = None
|
24
|
+
self.request_translator = TranslatorRegistry.get_request_translator("triples-query")
|
25
|
+
self.response_translator = TranslatorRegistry.get_response_translator("triples-query")
|
40
26
|
|
41
|
-
|
42
|
-
|
43
|
-
return TriplesQueryRequest(
|
44
|
-
s = s, p = p, o = o,
|
45
|
-
limit = limit,
|
46
|
-
user = body.get("user", "trustgraph"),
|
47
|
-
collection = body.get("collection", "default"),
|
48
|
-
)
|
27
|
+
def to_request(self, body):
|
28
|
+
return self.request_translator.to_pulsar(body)
|
49
29
|
|
50
30
|
def from_response(self, message):
|
51
|
-
return
|
52
|
-
"response": serialize_subgraph(message.triples)
|
53
|
-
}, True
|
31
|
+
return self.response_translator.from_response_with_completion(message)
|
54
32
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.17
|
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/v1.0.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v1.0.17.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "1.0.15"
|
@@ -1,78 +0,0 @@
|
|
1
|
-
|
2
|
-
from ... schema import ConfigRequest, ConfigResponse, ConfigKey, ConfigValue
|
3
|
-
from ... schema import config_request_queue
|
4
|
-
from ... schema import config_response_queue
|
5
|
-
|
6
|
-
from . requestor import ServiceRequestor
|
7
|
-
|
8
|
-
class ConfigRequestor(ServiceRequestor):
|
9
|
-
def __init__(self, pulsar_client, consumer, subscriber, timeout=120):
|
10
|
-
|
11
|
-
super(ConfigRequestor, self).__init__(
|
12
|
-
pulsar_client=pulsar_client,
|
13
|
-
consumer_name = consumer,
|
14
|
-
subscription = subscriber,
|
15
|
-
request_queue=config_request_queue,
|
16
|
-
response_queue=config_response_queue,
|
17
|
-
request_schema=ConfigRequest,
|
18
|
-
response_schema=ConfigResponse,
|
19
|
-
timeout=timeout,
|
20
|
-
)
|
21
|
-
|
22
|
-
def to_request(self, body):
|
23
|
-
|
24
|
-
if "keys" in body:
|
25
|
-
keys = [
|
26
|
-
ConfigKey(
|
27
|
-
type = k["type"],
|
28
|
-
key = k["key"],
|
29
|
-
)
|
30
|
-
for k in body["keys"]
|
31
|
-
]
|
32
|
-
else:
|
33
|
-
keys = None
|
34
|
-
|
35
|
-
if "values" in body:
|
36
|
-
values = [
|
37
|
-
ConfigValue(
|
38
|
-
type = v["type"],
|
39
|
-
key = v["key"],
|
40
|
-
value = v["value"],
|
41
|
-
)
|
42
|
-
for v in body["values"]
|
43
|
-
]
|
44
|
-
else:
|
45
|
-
values = None
|
46
|
-
|
47
|
-
return ConfigRequest(
|
48
|
-
operation = body.get("operation", None),
|
49
|
-
keys = keys,
|
50
|
-
type = body.get("type", None),
|
51
|
-
values = values
|
52
|
-
)
|
53
|
-
|
54
|
-
def from_response(self, message):
|
55
|
-
|
56
|
-
response = { }
|
57
|
-
|
58
|
-
if message.version is not None:
|
59
|
-
response["version"] = message.version
|
60
|
-
|
61
|
-
if message.values is not None:
|
62
|
-
response["values"] = [
|
63
|
-
{
|
64
|
-
"type": v.type,
|
65
|
-
"key": v.key,
|
66
|
-
"value": v.value,
|
67
|
-
}
|
68
|
-
for v in message.values
|
69
|
-
]
|
70
|
-
|
71
|
-
if message.directory is not None:
|
72
|
-
response["directory"] = message.directory
|
73
|
-
|
74
|
-
if message.config is not None:
|
75
|
-
response["config"] = message.config
|
76
|
-
|
77
|
-
return response, True
|
78
|
-
|
@@ -1,40 +0,0 @@
|
|
1
|
-
|
2
|
-
import base64
|
3
|
-
|
4
|
-
from ... schema import Document, Metadata
|
5
|
-
|
6
|
-
from . sender import ServiceSender
|
7
|
-
from . serialize import to_subgraph
|
8
|
-
|
9
|
-
class DocumentLoad(ServiceSender):
|
10
|
-
def __init__(self, pulsar_client, queue):
|
11
|
-
|
12
|
-
super(DocumentLoad, self).__init__(
|
13
|
-
pulsar_client = pulsar_client,
|
14
|
-
queue = queue,
|
15
|
-
schema = Document,
|
16
|
-
)
|
17
|
-
|
18
|
-
def to_request(self, body):
|
19
|
-
|
20
|
-
if "metadata" in body:
|
21
|
-
metadata = to_subgraph(body["metadata"])
|
22
|
-
else:
|
23
|
-
metadata = []
|
24
|
-
|
25
|
-
# Doing a base64 decoe/encode here to make sure the
|
26
|
-
# content is valid base64
|
27
|
-
doc = base64.b64decode(body["data"])
|
28
|
-
|
29
|
-
print("Document received")
|
30
|
-
|
31
|
-
return Document(
|
32
|
-
metadata=Metadata(
|
33
|
-
id=body.get("id"),
|
34
|
-
metadata=metadata,
|
35
|
-
user=body.get("user", "trustgraph"),
|
36
|
-
collection=body.get("collection", "default"),
|
37
|
-
),
|
38
|
-
data=base64.b64encode(doc).decode("utf-8")
|
39
|
-
)
|
40
|
-
|