trustgraph-flow 0.17.0__tar.gz → 0.17.1__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.17.0 → trustgraph-flow-0.17.1}/PKG-INFO +2 -2
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/agent.py +2 -1
- trustgraph-flow-0.17.1/trustgraph/api/gateway/auth.py +22 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/dbpedia.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/embeddings.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/encyclopedia.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/endpoint.py +16 -8
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/graph_embeddings_load.py +4 -2
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/graph_embeddings_stream.py +4 -2
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/graph_rag.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/internet_search.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/prompt.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/service.py +33 -4
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/socket.py +20 -4
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/text_completion.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/triples_load.py +2 -2
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/triples_query.py +2 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/triples_stream.py +2 -2
- trustgraph-flow-0.17.1/trustgraph/flow_version.py +1 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph_flow.egg-info/SOURCES.txt +1 -0
- trustgraph-flow-0.17.0/trustgraph/flow_version.py +0 -1
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/README.md +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/agent-manager-react +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/api-gateway +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/chunker-token +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/de-query-pinecone +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/de-write-pinecone +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/document-rag +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/embeddings-vectorize +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/ge-query-pinecone +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/ge-write-pinecone +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/graph-rag +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/metering +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/object-extract-row +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/prompt-generic +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/prompt-template +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/run-processing +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-azure-openai +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-googleaistudio +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/scripts/wikipedia-lookup +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/setup.cfg +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/setup.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/agent/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/agent/react/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/agent/react/types.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/publisher.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/running.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/serialize.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/subscriber.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/document_rag.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/embeddings/vectorize/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/embeddings/vectorize/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/embeddings/vectorize/vectorize.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/external/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/extract/object/row/extract.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/graph_rag.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/metering/pricelist.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/template/prompt_manager.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.17.
|
3
|
+
Version: 0.17.1
|
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
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.17.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.17.1.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -6,7 +6,7 @@ from ... schema import agent_response_queue
|
|
6
6
|
from . endpoint import MultiResponseServiceEndpoint
|
7
7
|
|
8
8
|
class AgentEndpoint(MultiResponseServiceEndpoint):
|
9
|
-
def __init__(self, pulsar_host, timeout):
|
9
|
+
def __init__(self, pulsar_host, timeout, auth):
|
10
10
|
|
11
11
|
super(AgentEndpoint, self).__init__(
|
12
12
|
pulsar_host=pulsar_host,
|
@@ -16,6 +16,7 @@ class AgentEndpoint(MultiResponseServiceEndpoint):
|
|
16
16
|
response_schema=AgentResponse,
|
17
17
|
endpoint_path="/api/v1/agent",
|
18
18
|
timeout=timeout,
|
19
|
+
auth=auth,
|
19
20
|
)
|
20
21
|
|
21
22
|
def to_request(self, body):
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
class Authenticator:
|
3
|
+
|
4
|
+
def __init__(self, token=None, allow_all=False):
|
5
|
+
|
6
|
+
if not allow_all and token is None:
|
7
|
+
raise RuntimeError("Need a token")
|
8
|
+
|
9
|
+
if not allow_all and token == "":
|
10
|
+
raise RuntimeError("Need a token")
|
11
|
+
|
12
|
+
self.token = token
|
13
|
+
self.allow_all = allow_all
|
14
|
+
|
15
|
+
def permitted(self, token, roles):
|
16
|
+
|
17
|
+
if self.allow_all: return True
|
18
|
+
|
19
|
+
if self.token != token: return False
|
20
|
+
|
21
|
+
return True
|
22
|
+
|
@@ -6,7 +6,7 @@ from ... schema import dbpedia_lookup_response_queue
|
|
6
6
|
from . endpoint import ServiceEndpoint
|
7
7
|
|
8
8
|
class DbpediaEndpoint(ServiceEndpoint):
|
9
|
-
def __init__(self, pulsar_host, timeout):
|
9
|
+
def __init__(self, pulsar_host, timeout, auth):
|
10
10
|
|
11
11
|
super(DbpediaEndpoint, self).__init__(
|
12
12
|
pulsar_host=pulsar_host,
|
@@ -16,6 +16,7 @@ class DbpediaEndpoint(ServiceEndpoint):
|
|
16
16
|
response_schema=LookupResponse,
|
17
17
|
endpoint_path="/api/v1/dbpedia",
|
18
18
|
timeout=timeout,
|
19
|
+
auth=auth,
|
19
20
|
)
|
20
21
|
|
21
22
|
def to_request(self, body):
|
@@ -6,7 +6,7 @@ from ... schema import embeddings_response_queue
|
|
6
6
|
from . endpoint import ServiceEndpoint
|
7
7
|
|
8
8
|
class EmbeddingsEndpoint(ServiceEndpoint):
|
9
|
-
def __init__(self, pulsar_host, timeout):
|
9
|
+
def __init__(self, pulsar_host, timeout, auth):
|
10
10
|
|
11
11
|
super(EmbeddingsEndpoint, self).__init__(
|
12
12
|
pulsar_host=pulsar_host,
|
@@ -16,6 +16,7 @@ class EmbeddingsEndpoint(ServiceEndpoint):
|
|
16
16
|
response_schema=EmbeddingsResponse,
|
17
17
|
endpoint_path="/api/v1/embeddings",
|
18
18
|
timeout=timeout,
|
19
|
+
auth=auth,
|
19
20
|
)
|
20
21
|
|
21
22
|
def to_request(self, body):
|
@@ -6,7 +6,7 @@ from ... schema import encyclopedia_lookup_response_queue
|
|
6
6
|
from . endpoint import ServiceEndpoint
|
7
7
|
|
8
8
|
class EncyclopediaEndpoint(ServiceEndpoint):
|
9
|
-
def __init__(self, pulsar_host, timeout):
|
9
|
+
def __init__(self, pulsar_host, timeout, auth):
|
10
10
|
|
11
11
|
super(EncyclopediaEndpoint, self).__init__(
|
12
12
|
pulsar_host=pulsar_host,
|
@@ -16,6 +16,7 @@ class EncyclopediaEndpoint(ServiceEndpoint):
|
|
16
16
|
response_schema=LookupResponse,
|
17
17
|
endpoint_path="/api/v1/encyclopedia",
|
18
18
|
timeout=timeout,
|
19
|
+
auth=auth,
|
19
20
|
)
|
20
21
|
|
21
22
|
def to_request(self, body):
|
@@ -19,6 +19,7 @@ class ServiceEndpoint:
|
|
19
19
|
request_queue, request_schema,
|
20
20
|
response_queue, response_schema,
|
21
21
|
endpoint_path,
|
22
|
+
auth,
|
22
23
|
subscription="api-gateway", consumer_name="api-gateway",
|
23
24
|
timeout=600,
|
24
25
|
):
|
@@ -36,6 +37,9 @@ class ServiceEndpoint:
|
|
36
37
|
|
37
38
|
self.path = endpoint_path
|
38
39
|
self.timeout = timeout
|
40
|
+
self.auth = auth
|
41
|
+
|
42
|
+
self.operation = "service"
|
39
43
|
|
40
44
|
async def start(self):
|
41
45
|
|
@@ -58,14 +62,24 @@ class ServiceEndpoint:
|
|
58
62
|
|
59
63
|
id = str(uuid.uuid4())
|
60
64
|
|
65
|
+
try:
|
66
|
+
ht = request.headers["Authorization"]
|
67
|
+
tokens = ht.split(" ", 2)
|
68
|
+
if tokens[0] != "Bearer":
|
69
|
+
return web.HTTPUnauthorized()
|
70
|
+
token = tokens[1]
|
71
|
+
except:
|
72
|
+
token = ""
|
73
|
+
|
74
|
+
if not self.auth.permitted(token, self.operation):
|
75
|
+
return web.HTTPUnauthorized()
|
76
|
+
|
61
77
|
try:
|
62
78
|
|
63
79
|
data = await request.json()
|
64
80
|
|
65
81
|
q = await self.sub.subscribe(id)
|
66
82
|
|
67
|
-
print(data)
|
68
|
-
|
69
83
|
await self.pub.send(
|
70
84
|
id,
|
71
85
|
self.to_request(data),
|
@@ -76,8 +90,6 @@ class ServiceEndpoint:
|
|
76
90
|
except:
|
77
91
|
raise RuntimeError("Timeout waiting for response")
|
78
92
|
|
79
|
-
print(resp)
|
80
|
-
|
81
93
|
if resp.error:
|
82
94
|
return web.json_response(
|
83
95
|
{ "error": resp.error.message }
|
@@ -110,8 +122,6 @@ class MultiResponseServiceEndpoint(ServiceEndpoint):
|
|
110
122
|
|
111
123
|
q = await self.sub.subscribe(id)
|
112
124
|
|
113
|
-
print(data)
|
114
|
-
|
115
125
|
await self.pub.send(
|
116
126
|
id,
|
117
127
|
self.to_request(data),
|
@@ -126,8 +136,6 @@ class MultiResponseServiceEndpoint(ServiceEndpoint):
|
|
126
136
|
except:
|
127
137
|
raise RuntimeError("Timeout waiting for response")
|
128
138
|
|
129
|
-
print(resp)
|
130
|
-
|
131
139
|
if resp.error:
|
132
140
|
return web.json_response(
|
133
141
|
{ "error": resp.error.message }
|
{trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/graph_embeddings_load.py
RENAMED
@@ -14,10 +14,12 @@ from . serialize import to_subgraph, to_value
|
|
14
14
|
|
15
15
|
class GraphEmbeddingsLoadEndpoint(SocketEndpoint):
|
16
16
|
|
17
|
-
def __init__(
|
17
|
+
def __init__(
|
18
|
+
self, pulsar_host, auth, path="/api/v1/load/graph-embeddings",
|
19
|
+
):
|
18
20
|
|
19
21
|
super(GraphEmbeddingsLoadEndpoint, self).__init__(
|
20
|
-
endpoint_path=path
|
22
|
+
endpoint_path=path, auth=auth,
|
21
23
|
)
|
22
24
|
|
23
25
|
self.pulsar_host=pulsar_host
|
{trustgraph-flow-0.17.0 → trustgraph-flow-0.17.1}/trustgraph/api/gateway/graph_embeddings_stream.py
RENAMED
@@ -12,10 +12,12 @@ from . serialize import serialize_graph_embeddings
|
|
12
12
|
|
13
13
|
class GraphEmbeddingsStreamEndpoint(SocketEndpoint):
|
14
14
|
|
15
|
-
def __init__(
|
15
|
+
def __init__(
|
16
|
+
self, pulsar_host, auth, path="/api/v1/stream/graph-embeddings"
|
17
|
+
):
|
16
18
|
|
17
19
|
super(GraphEmbeddingsStreamEndpoint, self).__init__(
|
18
|
-
endpoint_path=path
|
20
|
+
endpoint_path=path, auth=auth,
|
19
21
|
)
|
20
22
|
|
21
23
|
self.pulsar_host=pulsar_host
|
@@ -6,7 +6,7 @@ from ... schema import graph_rag_response_queue
|
|
6
6
|
from . endpoint import ServiceEndpoint
|
7
7
|
|
8
8
|
class GraphRagEndpoint(ServiceEndpoint):
|
9
|
-
def __init__(self, pulsar_host, timeout):
|
9
|
+
def __init__(self, pulsar_host, timeout, auth):
|
10
10
|
|
11
11
|
super(GraphRagEndpoint, self).__init__(
|
12
12
|
pulsar_host=pulsar_host,
|
@@ -16,6 +16,7 @@ class GraphRagEndpoint(ServiceEndpoint):
|
|
16
16
|
response_schema=GraphRagResponse,
|
17
17
|
endpoint_path="/api/v1/graph-rag",
|
18
18
|
timeout=timeout,
|
19
|
+
auth=auth,
|
19
20
|
)
|
20
21
|
|
21
22
|
def to_request(self, body):
|
@@ -6,7 +6,7 @@ from ... schema import internet_search_response_queue
|
|
6
6
|
from . endpoint import ServiceEndpoint
|
7
7
|
|
8
8
|
class InternetSearchEndpoint(ServiceEndpoint):
|
9
|
-
def __init__(self, pulsar_host, timeout):
|
9
|
+
def __init__(self, pulsar_host, timeout, auth):
|
10
10
|
|
11
11
|
super(InternetSearchEndpoint, self).__init__(
|
12
12
|
pulsar_host=pulsar_host,
|
@@ -16,6 +16,7 @@ class InternetSearchEndpoint(ServiceEndpoint):
|
|
16
16
|
response_schema=LookupResponse,
|
17
17
|
endpoint_path="/api/v1/internet-search",
|
18
18
|
timeout=timeout,
|
19
|
+
auth=auth,
|
19
20
|
)
|
20
21
|
|
21
22
|
def to_request(self, body):
|
@@ -8,7 +8,7 @@ from ... schema import prompt_response_queue
|
|
8
8
|
from . endpoint import ServiceEndpoint
|
9
9
|
|
10
10
|
class PromptEndpoint(ServiceEndpoint):
|
11
|
-
def __init__(self, pulsar_host, timeout):
|
11
|
+
def __init__(self, pulsar_host, timeout, auth):
|
12
12
|
|
13
13
|
super(PromptEndpoint, self).__init__(
|
14
14
|
pulsar_host=pulsar_host,
|
@@ -18,6 +18,7 @@ class PromptEndpoint(ServiceEndpoint):
|
|
18
18
|
response_schema=PromptResponse,
|
19
19
|
endpoint_path="/api/v1/prompt",
|
20
20
|
timeout=timeout,
|
21
|
+
auth=auth,
|
21
22
|
)
|
22
23
|
|
23
24
|
def to_request(self, body):
|
@@ -45,6 +45,7 @@ from . triples_stream import TriplesStreamEndpoint
|
|
45
45
|
from . graph_embeddings_stream import GraphEmbeddingsStreamEndpoint
|
46
46
|
from . triples_load import TriplesLoadEndpoint
|
47
47
|
from . graph_embeddings_load import GraphEmbeddingsLoadEndpoint
|
48
|
+
from . auth import Authenticator
|
48
49
|
|
49
50
|
logger = logging.getLogger("api")
|
50
51
|
logger.setLevel(logging.INFO)
|
@@ -52,6 +53,7 @@ logger.setLevel(logging.INFO)
|
|
52
53
|
default_pulsar_host = os.getenv("PULSAR_HOST", "pulsar://pulsar:6650")
|
53
54
|
default_timeout = 600
|
54
55
|
default_port = 8088
|
56
|
+
default_api_token = os.getenv("GATEWAY_SECRET", "")
|
55
57
|
|
56
58
|
class Api:
|
57
59
|
|
@@ -66,45 +68,66 @@ class Api:
|
|
66
68
|
self.timeout = int(config.get("timeout", default_timeout))
|
67
69
|
self.pulsar_host = config.get("pulsar_host", default_pulsar_host)
|
68
70
|
|
71
|
+
api_token = config.get("api_token", default_api_token)
|
72
|
+
|
73
|
+
# Token not set, or token equal empty string means no auth
|
74
|
+
if api_token:
|
75
|
+
self.auth = Authenticator(token=api_token)
|
76
|
+
else:
|
77
|
+
self.auth = Authenticator(allow_all=True)
|
78
|
+
|
69
79
|
self.endpoints = [
|
70
80
|
TextCompletionEndpoint(
|
71
81
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
82
|
+
auth = self.auth,
|
72
83
|
),
|
73
84
|
PromptEndpoint(
|
74
85
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
86
|
+
auth = self.auth,
|
75
87
|
),
|
76
88
|
GraphRagEndpoint(
|
77
89
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
90
|
+
auth = self.auth,
|
78
91
|
),
|
79
92
|
TriplesQueryEndpoint(
|
80
93
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
94
|
+
auth = self.auth,
|
81
95
|
),
|
82
96
|
EmbeddingsEndpoint(
|
83
97
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
98
|
+
auth = self.auth,
|
84
99
|
),
|
85
100
|
AgentEndpoint(
|
86
101
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
102
|
+
auth = self.auth,
|
87
103
|
),
|
88
104
|
EncyclopediaEndpoint(
|
89
105
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
106
|
+
auth = self.auth,
|
90
107
|
),
|
91
108
|
DbpediaEndpoint(
|
92
109
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
110
|
+
auth = self.auth,
|
93
111
|
),
|
94
112
|
InternetSearchEndpoint(
|
95
113
|
pulsar_host=self.pulsar_host, timeout=self.timeout,
|
114
|
+
auth = self.auth,
|
96
115
|
),
|
97
116
|
TriplesStreamEndpoint(
|
98
|
-
pulsar_host=self.pulsar_host
|
117
|
+
pulsar_host=self.pulsar_host,
|
118
|
+
auth = self.auth,
|
99
119
|
),
|
100
120
|
GraphEmbeddingsStreamEndpoint(
|
101
|
-
pulsar_host=self.pulsar_host
|
121
|
+
pulsar_host=self.pulsar_host,
|
122
|
+
auth = self.auth,
|
102
123
|
),
|
103
124
|
TriplesLoadEndpoint(
|
104
|
-
pulsar_host=self.pulsar_host
|
125
|
+
pulsar_host=self.pulsar_host,
|
126
|
+
auth = self.auth,
|
105
127
|
),
|
106
128
|
GraphEmbeddingsLoadEndpoint(
|
107
|
-
pulsar_host=self.pulsar_host
|
129
|
+
pulsar_host=self.pulsar_host,
|
130
|
+
auth = self.auth,
|
108
131
|
),
|
109
132
|
]
|
110
133
|
|
@@ -254,6 +277,12 @@ def run():
|
|
254
277
|
help=f'API request timeout in seconds (default: {default_timeout})',
|
255
278
|
)
|
256
279
|
|
280
|
+
parser.add_argument(
|
281
|
+
'--api-token',
|
282
|
+
default=default_api_token,
|
283
|
+
help=f'Secret API token (default: no auth)',
|
284
|
+
)
|
285
|
+
|
257
286
|
parser.add_argument(
|
258
287
|
'-l', '--log-level',
|
259
288
|
type=LogLevel,
|
@@ -11,11 +11,12 @@ logger.setLevel(logging.INFO)
|
|
11
11
|
class SocketEndpoint:
|
12
12
|
|
13
13
|
def __init__(
|
14
|
-
self,
|
15
|
-
endpoint_path="/api/v1/socket",
|
14
|
+
self, endpoint_path, auth,
|
16
15
|
):
|
17
16
|
|
18
17
|
self.path = endpoint_path
|
18
|
+
self.auth = auth
|
19
|
+
self.operation = "socket"
|
19
20
|
|
20
21
|
async def listener(self, ws, running):
|
21
22
|
|
@@ -43,18 +44,33 @@ class SocketEndpoint:
|
|
43
44
|
|
44
45
|
async def handle(self, request):
|
45
46
|
|
47
|
+
try:
|
48
|
+
token = request.query['token']
|
49
|
+
except:
|
50
|
+
token = ""
|
51
|
+
|
52
|
+
if not self.auth.permitted(token, self.operation):
|
53
|
+
return web.HTTPUnauthorized()
|
54
|
+
|
46
55
|
running = Running()
|
47
56
|
ws = web.WebSocketResponse()
|
48
57
|
await ws.prepare(request)
|
49
58
|
|
50
59
|
task = asyncio.create_task(self.async_thread(ws, running))
|
51
60
|
|
52
|
-
|
61
|
+
try:
|
53
62
|
|
54
|
-
|
63
|
+
await self.listener(ws, running)
|
64
|
+
|
65
|
+
except Exception as e:
|
66
|
+
print(e, flush=True)
|
55
67
|
|
56
68
|
running.stop()
|
57
69
|
|
70
|
+
await ws.close()
|
71
|
+
|
72
|
+
await task
|
73
|
+
|
58
74
|
return ws
|
59
75
|
|
60
76
|
async def start(self):
|
@@ -6,7 +6,7 @@ from ... schema import text_completion_response_queue
|
|
6
6
|
from . endpoint import ServiceEndpoint
|
7
7
|
|
8
8
|
class TextCompletionEndpoint(ServiceEndpoint):
|
9
|
-
def __init__(self, pulsar_host, timeout):
|
9
|
+
def __init__(self, pulsar_host, timeout, auth):
|
10
10
|
|
11
11
|
super(TextCompletionEndpoint, self).__init__(
|
12
12
|
pulsar_host=pulsar_host,
|
@@ -16,6 +16,7 @@ class TextCompletionEndpoint(ServiceEndpoint):
|
|
16
16
|
response_schema=TextCompletionResponse,
|
17
17
|
endpoint_path="/api/v1/text-completion",
|
18
18
|
timeout=timeout,
|
19
|
+
auth=auth,
|
19
20
|
)
|
20
21
|
|
21
22
|
def to_request(self, body):
|
@@ -14,10 +14,10 @@ from . serialize import to_subgraph
|
|
14
14
|
|
15
15
|
class TriplesLoadEndpoint(SocketEndpoint):
|
16
16
|
|
17
|
-
def __init__(self, pulsar_host, path="/api/v1/load/triples"):
|
17
|
+
def __init__(self, pulsar_host, auth, path="/api/v1/load/triples"):
|
18
18
|
|
19
19
|
super(TriplesLoadEndpoint, self).__init__(
|
20
|
-
endpoint_path=path
|
20
|
+
endpoint_path=path, auth=auth,
|
21
21
|
)
|
22
22
|
|
23
23
|
self.pulsar_host=pulsar_host
|
@@ -7,7 +7,7 @@ from . endpoint import ServiceEndpoint
|
|
7
7
|
from . serialize import to_value, serialize_subgraph
|
8
8
|
|
9
9
|
class TriplesQueryEndpoint(ServiceEndpoint):
|
10
|
-
def __init__(self, pulsar_host, timeout):
|
10
|
+
def __init__(self, pulsar_host, timeout, auth):
|
11
11
|
|
12
12
|
super(TriplesQueryEndpoint, self).__init__(
|
13
13
|
pulsar_host=pulsar_host,
|
@@ -17,6 +17,7 @@ class TriplesQueryEndpoint(ServiceEndpoint):
|
|
17
17
|
response_schema=TriplesQueryResponse,
|
18
18
|
endpoint_path="/api/v1/triples-query",
|
19
19
|
timeout=timeout,
|
20
|
+
auth=auth,
|
20
21
|
)
|
21
22
|
|
22
23
|
def to_request(self, body):
|
@@ -12,10 +12,10 @@ from . serialize import serialize_triples
|
|
12
12
|
|
13
13
|
class TriplesStreamEndpoint(SocketEndpoint):
|
14
14
|
|
15
|
-
def __init__(self, pulsar_host, path="/api/v1/stream/triples"):
|
15
|
+
def __init__(self, pulsar_host, auth, path="/api/v1/stream/triples"):
|
16
16
|
|
17
17
|
super(TriplesStreamEndpoint, self).__init__(
|
18
|
-
endpoint_path=path
|
18
|
+
endpoint_path=path, auth=auth,
|
19
19
|
)
|
20
20
|
|
21
21
|
self.pulsar_host=pulsar_host
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.17.1"
|
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.17.
|
3
|
+
Version: 0.17.1
|
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
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.17.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.17.1.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -59,6 +59,7 @@ trustgraph/api/__init__.py
|
|
59
59
|
trustgraph/api/gateway/__init__.py
|
60
60
|
trustgraph/api/gateway/__main__.py
|
61
61
|
trustgraph/api/gateway/agent.py
|
62
|
+
trustgraph/api/gateway/auth.py
|
62
63
|
trustgraph/api/gateway/dbpedia.py
|
63
64
|
trustgraph/api/gateway/embeddings.py
|
64
65
|
trustgraph/api/gateway/encyclopedia.py
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.17.0"
|
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
|
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
|