trustgraph-flow 0.23.3__tar.gz → 0.23.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/PKG-INFO +2 -2
- trustgraph-flow-0.23.4/trustgraph/flow_version.py +1 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/agent.py +8 -5
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/embeddings.py +8 -5
- trustgraph-flow-0.23.4/trustgraph/gateway/flow_endpoint.py +75 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/graph_embeddings_query.py +8 -5
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/graph_rag.py +8 -5
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/prompt.py +8 -5
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/requestor.py +4 -1
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/service.py +132 -18
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/text_completion.py +8 -5
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/triples_query.py +8 -5
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph_flow.egg-info/SOURCES.txt +1 -0
- trustgraph-flow-0.23.3/trustgraph/flow_version.py +0 -1
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/README.md +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/agent-manager-react +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/api-gateway +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/chunker-token +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/config-svc +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/de-query-pinecone +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/de-write-pinecone +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/document-embeddings +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/document-rag +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/embeddings-fastembed +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/ge-query-pinecone +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/ge-write-pinecone +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/graph-embeddings +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/graph-rag +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/librarian +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/metering +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/object-extract-row +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/pdf-ocr-mistral +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/prompt-generic +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/prompt-template +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/run-processing +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-azure-openai +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-googleaistudio +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-lmstudio +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-mistral +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-query-falkordb +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-query-memgraph +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-write-falkordb +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-write-memgraph +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/scripts/wikipedia-lookup +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/setup.cfg +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/setup.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/agent/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/agent/react/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/agent/react/types.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/config/service/config.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/config/service/flow.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/config/service/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/external/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/extract/object/row/extract.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/auth.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/config.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/dbpedia.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/document_embeddings_load.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/document_embeddings_stream.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/document_load.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/document_rag.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/encyclopedia.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/endpoint.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/flow.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/graph_embeddings_load.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/graph_embeddings_stream.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/internet_search.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/librarian.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/metrics.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/mux.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/running.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/sender.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/serialize.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/socket.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/text_load.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/triples_load.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/triples_stream.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/librarian/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/librarian/table_store.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/template/prompt_manager.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.23.
|
3
|
+
Version: 0.23.4
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.4.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.23.4"
|
@@ -1,20 +1,23 @@
|
|
1
1
|
|
2
2
|
from .. schema import AgentRequest, AgentResponse
|
3
|
-
from .. schema import agent_request_queue
|
4
|
-
from .. schema import agent_response_queue
|
5
3
|
|
6
4
|
from . endpoint import ServiceEndpoint
|
7
5
|
from . requestor import ServiceRequestor
|
8
6
|
|
9
7
|
class AgentRequestor(ServiceRequestor):
|
10
|
-
def __init__(
|
8
|
+
def __init__(
|
9
|
+
self, pulsar_client, request_queue, response_queue, timeout, auth,
|
10
|
+
consumer, subscriber,
|
11
|
+
):
|
11
12
|
|
12
13
|
super(AgentRequestor, self).__init__(
|
13
14
|
pulsar_client=pulsar_client,
|
14
|
-
request_queue=
|
15
|
-
response_queue=
|
15
|
+
request_queue=request_queue,
|
16
|
+
response_queue=response_queue,
|
16
17
|
request_schema=AgentRequest,
|
17
18
|
response_schema=AgentResponse,
|
19
|
+
subscription = subscriber,
|
20
|
+
consumer_name = consumer,
|
18
21
|
timeout=timeout,
|
19
22
|
)
|
20
23
|
|
@@ -1,20 +1,23 @@
|
|
1
1
|
|
2
2
|
from .. schema import EmbeddingsRequest, EmbeddingsResponse
|
3
|
-
from .. schema import embeddings_request_queue
|
4
|
-
from .. schema import embeddings_response_queue
|
5
3
|
|
6
4
|
from . endpoint import ServiceEndpoint
|
7
5
|
from . requestor import ServiceRequestor
|
8
6
|
|
9
7
|
class EmbeddingsRequestor(ServiceRequestor):
|
10
|
-
def __init__(
|
8
|
+
def __init__(
|
9
|
+
self, pulsar_client, request_queue, response_queue, timeout, auth,
|
10
|
+
consumer, subscriber,
|
11
|
+
):
|
11
12
|
|
12
13
|
super(EmbeddingsRequestor, self).__init__(
|
13
14
|
pulsar_client=pulsar_client,
|
14
|
-
request_queue=
|
15
|
-
response_queue=
|
15
|
+
request_queue=request_queue,
|
16
|
+
response_queue=response_queue,
|
16
17
|
request_schema=EmbeddingsRequest,
|
17
18
|
response_schema=EmbeddingsResponse,
|
19
|
+
subscription = subscriber,
|
20
|
+
consumer_name = consumer,
|
18
21
|
timeout=timeout,
|
19
22
|
)
|
20
23
|
|
@@ -0,0 +1,75 @@
|
|
1
|
+
|
2
|
+
import asyncio
|
3
|
+
from aiohttp import web
|
4
|
+
import uuid
|
5
|
+
import logging
|
6
|
+
|
7
|
+
logger = logging.getLogger("flow-endpoint")
|
8
|
+
logger.setLevel(logging.INFO)
|
9
|
+
|
10
|
+
class FlowEndpoint:
|
11
|
+
|
12
|
+
def __init__(self, endpoint_path, auth, requestors):
|
13
|
+
|
14
|
+
self.path = endpoint_path
|
15
|
+
|
16
|
+
self.auth = auth
|
17
|
+
self.operation = "service"
|
18
|
+
|
19
|
+
self.requestors = requestors
|
20
|
+
|
21
|
+
async def start(self):
|
22
|
+
pass
|
23
|
+
|
24
|
+
def add_routes(self, app):
|
25
|
+
|
26
|
+
pass
|
27
|
+
app.add_routes([
|
28
|
+
web.post(self.path, self.handle),
|
29
|
+
])
|
30
|
+
|
31
|
+
async def handle(self, request):
|
32
|
+
|
33
|
+
print(request.path, "...")
|
34
|
+
|
35
|
+
flow_id = request.match_info['flow']
|
36
|
+
kind = request.match_info['kind']
|
37
|
+
k = (flow_id, kind)
|
38
|
+
|
39
|
+
if k not in self.requestors:
|
40
|
+
raise web.HTTPBadRequest()
|
41
|
+
|
42
|
+
requestor = self.requestors[k]
|
43
|
+
|
44
|
+
try:
|
45
|
+
ht = request.headers["Authorization"]
|
46
|
+
tokens = ht.split(" ", 2)
|
47
|
+
if tokens[0] != "Bearer":
|
48
|
+
return web.HTTPUnauthorized()
|
49
|
+
token = tokens[1]
|
50
|
+
except:
|
51
|
+
token = ""
|
52
|
+
|
53
|
+
if not self.auth.permitted(token, self.operation):
|
54
|
+
return web.HTTPUnauthorized()
|
55
|
+
|
56
|
+
try:
|
57
|
+
|
58
|
+
data = await request.json()
|
59
|
+
|
60
|
+
print(data)
|
61
|
+
|
62
|
+
async def responder(x, fin):
|
63
|
+
print(x)
|
64
|
+
|
65
|
+
resp = await requestor.process(data, responder)
|
66
|
+
|
67
|
+
return web.json_response(resp)
|
68
|
+
|
69
|
+
except Exception as e:
|
70
|
+
logging.error(f"Exception: {e}")
|
71
|
+
|
72
|
+
return web.json_response(
|
73
|
+
{ "error": str(e) }
|
74
|
+
)
|
75
|
+
|
{trustgraph-flow-0.23.3 → trustgraph-flow-0.23.4}/trustgraph/gateway/graph_embeddings_query.py
RENAMED
@@ -1,21 +1,24 @@
|
|
1
1
|
|
2
2
|
from .. schema import GraphEmbeddingsRequest, GraphEmbeddingsResponse
|
3
|
-
from .. schema import graph_embeddings_request_queue
|
4
|
-
from .. schema import graph_embeddings_response_queue
|
5
3
|
|
6
4
|
from . endpoint import ServiceEndpoint
|
7
5
|
from . requestor import ServiceRequestor
|
8
6
|
from . serialize import serialize_value
|
9
7
|
|
10
8
|
class GraphEmbeddingsQueryRequestor(ServiceRequestor):
|
11
|
-
def __init__(
|
9
|
+
def __init__(
|
10
|
+
self, pulsar_client, request_queue, response_queue, timeout, auth,
|
11
|
+
consumer, subscriber,
|
12
|
+
):
|
12
13
|
|
13
14
|
super(GraphEmbeddingsQueryRequestor, self).__init__(
|
14
15
|
pulsar_client=pulsar_client,
|
15
|
-
request_queue=
|
16
|
-
response_queue=
|
16
|
+
request_queue=request_queue,
|
17
|
+
response_queue=response_queue,
|
17
18
|
request_schema=GraphEmbeddingsRequest,
|
18
19
|
response_schema=GraphEmbeddingsResponse,
|
20
|
+
subscription = subscriber,
|
21
|
+
consumer_name = consumer,
|
19
22
|
timeout=timeout,
|
20
23
|
)
|
21
24
|
|
@@ -1,20 +1,23 @@
|
|
1
1
|
|
2
2
|
from .. schema import GraphRagQuery, GraphRagResponse
|
3
|
-
from .. schema import graph_rag_request_queue
|
4
|
-
from .. schema import graph_rag_response_queue
|
5
3
|
|
6
4
|
from . endpoint import ServiceEndpoint
|
7
5
|
from . requestor import ServiceRequestor
|
8
6
|
|
9
7
|
class GraphRagRequestor(ServiceRequestor):
|
10
|
-
def __init__(
|
8
|
+
def __init__(
|
9
|
+
self, pulsar_client, request_queue, response_queue, timeout, auth,
|
10
|
+
consumer, subscriber,
|
11
|
+
):
|
11
12
|
|
12
13
|
super(GraphRagRequestor, self).__init__(
|
13
14
|
pulsar_client=pulsar_client,
|
14
|
-
request_queue=
|
15
|
-
response_queue=
|
15
|
+
request_queue=request_queue,
|
16
|
+
response_queue=response_queue,
|
16
17
|
request_schema=GraphRagQuery,
|
17
18
|
response_schema=GraphRagResponse,
|
19
|
+
subscription = subscriber,
|
20
|
+
consumer_name = consumer,
|
18
21
|
timeout=timeout,
|
19
22
|
)
|
20
23
|
|
@@ -2,21 +2,24 @@
|
|
2
2
|
import json
|
3
3
|
|
4
4
|
from .. schema import PromptRequest, PromptResponse
|
5
|
-
from .. schema import prompt_request_queue
|
6
|
-
from .. schema import prompt_response_queue
|
7
5
|
|
8
6
|
from . endpoint import ServiceEndpoint
|
9
7
|
from . requestor import ServiceRequestor
|
10
8
|
|
11
9
|
class PromptRequestor(ServiceRequestor):
|
12
|
-
def __init__(
|
10
|
+
def __init__(
|
11
|
+
self, pulsar_client, request_queue, response_queue, timeout, auth,
|
12
|
+
consumer, subscriber,
|
13
|
+
):
|
13
14
|
|
14
15
|
super(PromptRequestor, self).__init__(
|
15
16
|
pulsar_client=pulsar_client,
|
16
|
-
request_queue=
|
17
|
-
response_queue=
|
17
|
+
request_queue=request_queue,
|
18
|
+
response_queue=response_queue,
|
18
19
|
request_schema=PromptRequest,
|
19
20
|
response_schema=PromptResponse,
|
21
|
+
subscription = subscriber,
|
22
|
+
consumer_name = consumer,
|
20
23
|
timeout=timeout,
|
21
24
|
)
|
22
25
|
|
@@ -34,10 +34,13 @@ class ServiceRequestor:
|
|
34
34
|
self.timeout = timeout
|
35
35
|
|
36
36
|
async def start(self):
|
37
|
-
|
38
37
|
await self.pub.start()
|
39
38
|
await self.sub.start()
|
40
39
|
|
40
|
+
async def stop(self):
|
41
|
+
await self.pub.stop()
|
42
|
+
await self.sub.stop()
|
43
|
+
|
41
44
|
def to_request(self, request):
|
42
45
|
raise RuntimeError("Not defined")
|
43
46
|
|
@@ -17,6 +17,8 @@ from aiohttp import web
|
|
17
17
|
import logging
|
18
18
|
import os
|
19
19
|
import base64
|
20
|
+
import uuid
|
21
|
+
import json
|
20
22
|
|
21
23
|
import pulsar
|
22
24
|
from prometheus_client import start_http_server
|
@@ -26,15 +28,17 @@ from .. log_level import LogLevel
|
|
26
28
|
from . serialize import to_subgraph
|
27
29
|
from . running import Running
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
from .. schema import ConfigPush, config_push_queue
|
32
|
+
|
33
|
+
from . text_completion import TextCompletionRequestor
|
34
|
+
from . prompt import PromptRequestor
|
35
|
+
from . graph_rag import GraphRagRequestor
|
32
36
|
#from . document_rag import DocumentRagRequestor
|
33
|
-
|
34
|
-
|
35
|
-
|
37
|
+
from . triples_query import TriplesQueryRequestor
|
38
|
+
from . graph_embeddings_query import GraphEmbeddingsQueryRequestor
|
39
|
+
from . embeddings import EmbeddingsRequestor
|
36
40
|
#from . encyclopedia import EncyclopediaRequestor
|
37
|
-
|
41
|
+
from . agent import AgentRequestor
|
38
42
|
#from . dbpedia import DbpediaRequestor
|
39
43
|
#from . internet_search import InternetSearchRequestor
|
40
44
|
#from . librarian import LibrarianRequestor
|
@@ -52,7 +56,10 @@ from . mux import MuxEndpoint
|
|
52
56
|
from . metrics import MetricsEndpoint
|
53
57
|
|
54
58
|
from . endpoint import ServiceEndpoint
|
59
|
+
from . flow_endpoint import FlowEndpoint
|
55
60
|
from . auth import Authenticator
|
61
|
+
from .. base import Subscriber
|
62
|
+
from .. base import Consumer
|
56
63
|
|
57
64
|
logger = logging.getLogger("api")
|
58
65
|
logger.setLevel(logging.INFO)
|
@@ -68,11 +75,6 @@ class Api:
|
|
68
75
|
|
69
76
|
def __init__(self, **config):
|
70
77
|
|
71
|
-
self.app = web.Application(
|
72
|
-
middlewares=[],
|
73
|
-
client_max_size=256 * 1024 * 1024
|
74
|
-
)
|
75
|
-
|
76
78
|
self.port = int(config.get("port", default_port))
|
77
79
|
self.timeout = int(config.get("timeout", default_timeout))
|
78
80
|
self.pulsar_host = config.get("pulsar_host", default_pulsar_host)
|
@@ -143,11 +145,11 @@ class Api:
|
|
143
145
|
# pulsar_client=self.pulsar_client, timeout=self.timeout,
|
144
146
|
# auth = self.auth,
|
145
147
|
# ),
|
146
|
-
"config": ConfigRequestor(
|
148
|
+
(None, "config"): ConfigRequestor(
|
147
149
|
pulsar_client=self.pulsar_client, timeout=self.timeout,
|
148
150
|
auth = self.auth,
|
149
151
|
),
|
150
|
-
"flow": FlowRequestor(
|
152
|
+
(None, "flow"): FlowRequestor(
|
151
153
|
pulsar_client=self.pulsar_client, timeout=self.timeout,
|
152
154
|
auth = self.auth,
|
153
155
|
),
|
@@ -211,11 +213,16 @@ class Api:
|
|
211
213
|
# ),
|
212
214
|
ServiceEndpoint(
|
213
215
|
endpoint_path = "/api/v1/config", auth=self.auth,
|
214
|
-
requestor = self.services["config"],
|
216
|
+
requestor = self.services[(None, "config")],
|
215
217
|
),
|
216
218
|
ServiceEndpoint(
|
217
219
|
endpoint_path = "/api/v1/flow", auth=self.auth,
|
218
|
-
requestor = self.services["flow"],
|
220
|
+
requestor = self.services[(None, "flow")],
|
221
|
+
),
|
222
|
+
FlowEndpoint(
|
223
|
+
endpoint_path = "/api/v1/flow/{flow}/{kind}",
|
224
|
+
auth=self.auth,
|
225
|
+
requestors = self.services,
|
219
226
|
),
|
220
227
|
# ServiceEndpoint(
|
221
228
|
# endpoint_path = "/api/v1/encyclopedia", auth=self.auth,
|
@@ -273,10 +280,117 @@ class Api:
|
|
273
280
|
),
|
274
281
|
]
|
275
282
|
|
276
|
-
|
277
|
-
|
283
|
+
self.flows = {}
|
284
|
+
|
285
|
+
async def on_config(self, msg, proc, flow):
|
286
|
+
|
287
|
+
try:
|
288
|
+
|
289
|
+
v = msg.value()
|
290
|
+
|
291
|
+
print(f"Config version", v.version)
|
292
|
+
|
293
|
+
if "flows" in v.config:
|
294
|
+
|
295
|
+
flows = v.config["flows"]
|
296
|
+
|
297
|
+
wanted = list(flows.keys())
|
298
|
+
current = list(self.flows.keys())
|
299
|
+
|
300
|
+
for k in wanted:
|
301
|
+
if k not in current:
|
302
|
+
self.flows[k] = json.loads(flows[k])
|
303
|
+
await self.start_flow(k, self.flows[k])
|
304
|
+
|
305
|
+
for k in current:
|
306
|
+
if k not in wanted:
|
307
|
+
await self.stop_flow(k, self.flows[k])
|
308
|
+
del self.flows[k]
|
309
|
+
|
310
|
+
except Exception as e:
|
311
|
+
print(f"Exception: {e}", flush=True)
|
312
|
+
|
313
|
+
async def start_flow(self, id, flow):
|
314
|
+
|
315
|
+
print("Start flow", id)
|
316
|
+
intf = flow["interfaces"]
|
317
|
+
|
318
|
+
kinds = {
|
319
|
+
"agent": AgentRequestor,
|
320
|
+
"text-completion": TextCompletionRequestor,
|
321
|
+
"prompt": PromptRequestor,
|
322
|
+
"graph-rag": GraphRagRequestor,
|
323
|
+
"embeddings": EmbeddingsRequestor,
|
324
|
+
"graph-embeddings": GraphEmbeddingsQueryRequestor,
|
325
|
+
"triples-query": TriplesQueryRequestor,
|
326
|
+
}
|
327
|
+
|
328
|
+
for api_kind, requestor in kinds.items():
|
329
|
+
|
330
|
+
if api_kind in intf:
|
331
|
+
k = (id, api_kind)
|
332
|
+
if k in self.services:
|
333
|
+
await self.services[k].stop()
|
334
|
+
del self.services[k]
|
335
|
+
|
336
|
+
self.services[k] = requestor(
|
337
|
+
pulsar_client=self.pulsar_client, timeout=self.timeout,
|
338
|
+
request_queue = intf[api_kind]["request"],
|
339
|
+
response_queue = intf[api_kind]["response"],
|
340
|
+
consumer = f"api-gateway-{id}-{api_kind}-request",
|
341
|
+
subscriber = f"api-gateway-{id}-{api_kind}-request",
|
342
|
+
auth = self.auth,
|
343
|
+
)
|
344
|
+
await self.services[k].start()
|
345
|
+
|
346
|
+
async def stop_flow(self, id, flow):
|
347
|
+
print("Stop flow", id)
|
348
|
+
intf = flow["interfaces"]
|
349
|
+
|
350
|
+
svc_list = list(self.services.keys())
|
351
|
+
|
352
|
+
for k in svc_list:
|
353
|
+
|
354
|
+
kid, kkind = k
|
355
|
+
|
356
|
+
if id == kid:
|
357
|
+
await self.services[k].stop()
|
358
|
+
del self.services[k]
|
359
|
+
|
360
|
+
async def config_loader(self):
|
361
|
+
|
362
|
+
async with asyncio.TaskGroup() as tg:
|
363
|
+
|
364
|
+
id = str(uuid.uuid4())
|
365
|
+
|
366
|
+
self.config_cons = Consumer(
|
367
|
+
taskgroup = tg,
|
368
|
+
flow = None,
|
369
|
+
client = self.pulsar_client,
|
370
|
+
subscriber = f"gateway-{id}",
|
371
|
+
topic = config_push_queue,
|
372
|
+
schema = ConfigPush,
|
373
|
+
handler = self.on_config,
|
374
|
+
start_of_messages = True,
|
375
|
+
)
|
376
|
+
|
377
|
+
await self.config_cons.start()
|
378
|
+
|
379
|
+
print("Waiting...")
|
380
|
+
|
381
|
+
print("Config consumer done. :/")
|
278
382
|
|
279
383
|
async def app_factory(self):
|
384
|
+
|
385
|
+
self.app = web.Application(
|
386
|
+
middlewares=[],
|
387
|
+
client_max_size=256 * 1024 * 1024
|
388
|
+
)
|
389
|
+
|
390
|
+
asyncio.create_task(self.config_loader())
|
391
|
+
|
392
|
+
for ep in self.endpoints:
|
393
|
+
ep.add_routes(self.app)
|
280
394
|
|
281
395
|
for ep in self.endpoints:
|
282
396
|
await ep.start()
|
@@ -1,20 +1,23 @@
|
|
1
1
|
|
2
2
|
from .. schema import TextCompletionRequest, TextCompletionResponse
|
3
|
-
from .. schema import text_completion_request_queue
|
4
|
-
from .. schema import text_completion_response_queue
|
5
3
|
|
6
4
|
from . endpoint import ServiceEndpoint
|
7
5
|
from . requestor import ServiceRequestor
|
8
6
|
|
9
7
|
class TextCompletionRequestor(ServiceRequestor):
|
10
|
-
def __init__(
|
8
|
+
def __init__(
|
9
|
+
self, pulsar_client, request_queue, response_queue, timeout, auth,
|
10
|
+
consumer, subscriber,
|
11
|
+
):
|
11
12
|
|
12
13
|
super(TextCompletionRequestor, self).__init__(
|
13
14
|
pulsar_client=pulsar_client,
|
14
|
-
request_queue=
|
15
|
-
response_queue=
|
15
|
+
request_queue=request_queue,
|
16
|
+
response_queue=response_queue,
|
16
17
|
request_schema=TextCompletionRequest,
|
17
18
|
response_schema=TextCompletionResponse,
|
19
|
+
subscription = subscriber,
|
20
|
+
consumer_name = consumer,
|
18
21
|
timeout=timeout,
|
19
22
|
)
|
20
23
|
|
@@ -1,21 +1,24 @@
|
|
1
1
|
|
2
2
|
from .. schema import TriplesQueryRequest, TriplesQueryResponse, Triples
|
3
|
-
from .. schema import triples_request_queue
|
4
|
-
from .. schema import triples_response_queue
|
5
3
|
|
6
4
|
from . endpoint import ServiceEndpoint
|
7
5
|
from . requestor import ServiceRequestor
|
8
6
|
from . serialize import to_value, serialize_subgraph
|
9
7
|
|
10
8
|
class TriplesQueryRequestor(ServiceRequestor):
|
11
|
-
def __init__(
|
9
|
+
def __init__(
|
10
|
+
self, pulsar_client, request_queue, response_queue, timeout, auth,
|
11
|
+
consumer, subscriber,
|
12
|
+
):
|
12
13
|
|
13
14
|
super(TriplesQueryRequestor, self).__init__(
|
14
15
|
pulsar_client=pulsar_client,
|
15
|
-
request_queue=
|
16
|
-
response_queue=
|
16
|
+
request_queue=request_queue,
|
17
|
+
response_queue=response_queue,
|
17
18
|
request_schema=TriplesQueryRequest,
|
18
19
|
response_schema=TriplesQueryResponse,
|
20
|
+
subscription = subscriber,
|
21
|
+
consumer_name = consumer,
|
19
22
|
timeout=timeout,
|
20
23
|
)
|
21
24
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.23.
|
3
|
+
Version: 0.23.4
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.4.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -134,6 +134,7 @@ trustgraph/gateway/embeddings.py
|
|
134
134
|
trustgraph/gateway/encyclopedia.py
|
135
135
|
trustgraph/gateway/endpoint.py
|
136
136
|
trustgraph/gateway/flow.py
|
137
|
+
trustgraph/gateway/flow_endpoint.py
|
137
138
|
trustgraph/gateway/graph_embeddings_load.py
|
138
139
|
trustgraph/gateway/graph_embeddings_query.py
|
139
140
|
trustgraph/gateway/graph_embeddings_stream.py
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.23.3"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|