trustgraph-flow 1.3.18__tar.gz → 1.4.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-1.3.18 → trustgraph_flow-1.4.1}/PKG-INFO +2 -2
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/pyproject.toml +1 -1
- trustgraph_flow-1.4.1/trustgraph/flow_version.py +1 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/pinecone/service.py +35 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/qdrant/service.py +20 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/pinecone/service.py +35 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/qdrant/service.py +20 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/memgraph/service.py +68 -16
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/neo4j/service.py +68 -16
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/memgraph/write.py +83 -44
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/neo4j/write.py +65 -25
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph_flow.egg-info/requires.txt +1 -1
- trustgraph_flow-1.3.18/trustgraph/flow_version.py +0 -1
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/README.md +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/setup.cfg +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/mcp_tool/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/mcp_tool/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/mcp_tool/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/react/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/react/types.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/agent/tool_filter.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/config/service/config.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/config/service/flow.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/config/service/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/cores/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/cores/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/cores/knowledge.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/cores/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/direct/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/external/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/agent/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/agent/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/agent/extract.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/objects/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/objects/processor.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/auth.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/config/receiver.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/agent.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/config.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/core_export.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/core_import.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/document_load.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/document_rag.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/embeddings.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/flow.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/knowledge.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/librarian.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/manager.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/mux.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/nlp_query.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/objects_import.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/objects_query.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/prompt.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/requestor.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/sender.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/serialize.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/streamer.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/structured_query.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/text_completion.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/text_load.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/triples_export.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/triples_import.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/dispatch/triples_query.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/endpoint/manager.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/endpoint/metrics.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/endpoint/socket.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/running.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/unused/dbpedia.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/unused/encyclopedia.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/gateway/unused/internet_search.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/librarian/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/metering/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/metering/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/metering/counter.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/tgi/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/model/text_completion/vllm/llm.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/processing/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/processing/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/processing/processing.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/prompt/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/prompt/template/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/prompt/template/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/prompt/template/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/objects/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/objects/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/objects/cassandra/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/nlp_query/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/nlp_query/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/nlp_query/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/structured_query/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/structured_query/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/retrieval/structured_query/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/rev_gateway/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/rev_gateway/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/rev_gateway/dispatcher.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/rev_gateway/service.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/knowledge/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/knowledge/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/knowledge/store.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/objects/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/objects/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/objects/cassandra/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/tables/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/tables/config.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/tables/knowledge.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/tables/library.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/template/__init__.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/template/prompt_manager.py +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph_flow.egg-info/SOURCES.txt +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph_flow.egg-info/entry_points.txt +0 -0
- {trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.4.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
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
@@ -8,7 +8,7 @@ Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: Operating System :: OS Independent
|
9
9
|
Requires-Python: >=3.8
|
10
10
|
Description-Content-Type: text/markdown
|
11
|
-
Requires-Dist: trustgraph-base<1.
|
11
|
+
Requires-Dist: trustgraph-base<1.5,>=1.4
|
12
12
|
Requires-Dist: aiohttp
|
13
13
|
Requires-Dist: anthropic
|
14
14
|
Requires-Dist: cassandra-driver
|
@@ -10,7 +10,7 @@ description = "TrustGraph provides a means to run a pipeline of flexible AI proc
|
|
10
10
|
readme = "README.md"
|
11
11
|
requires-python = ">=3.8"
|
12
12
|
dependencies = [
|
13
|
-
"trustgraph-base>=1.
|
13
|
+
"trustgraph-base>=1.4,<1.5",
|
14
14
|
"aiohttp",
|
15
15
|
"anthropic",
|
16
16
|
"cassandra-driver",
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "1.4.1"
|
{trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/pinecone/service.py
RENAMED
@@ -47,6 +47,39 @@ class Processor(DocumentEmbeddingsQueryService):
|
|
47
47
|
}
|
48
48
|
)
|
49
49
|
|
50
|
+
self.last_index_name = None
|
51
|
+
|
52
|
+
def ensure_index_exists(self, index_name, dim):
|
53
|
+
"""Ensure index exists, create if it doesn't"""
|
54
|
+
if index_name != self.last_index_name:
|
55
|
+
if not self.pinecone.has_index(index_name):
|
56
|
+
try:
|
57
|
+
self.pinecone.create_index(
|
58
|
+
name=index_name,
|
59
|
+
dimension=dim,
|
60
|
+
metric="cosine",
|
61
|
+
spec=ServerlessSpec(
|
62
|
+
cloud="aws",
|
63
|
+
region="us-east-1",
|
64
|
+
)
|
65
|
+
)
|
66
|
+
logger.info(f"Created index: {index_name}")
|
67
|
+
|
68
|
+
# Wait for index to be ready
|
69
|
+
import time
|
70
|
+
for i in range(0, 1000):
|
71
|
+
if self.pinecone.describe_index(index_name).status["ready"]:
|
72
|
+
break
|
73
|
+
time.sleep(1)
|
74
|
+
|
75
|
+
if not self.pinecone.describe_index(index_name).status["ready"]:
|
76
|
+
raise RuntimeError("Gave up waiting for index creation")
|
77
|
+
|
78
|
+
except Exception as e:
|
79
|
+
logger.error(f"Pinecone index creation failed: {e}")
|
80
|
+
raise e
|
81
|
+
self.last_index_name = index_name
|
82
|
+
|
50
83
|
async def query_document_embeddings(self, msg):
|
51
84
|
|
52
85
|
try:
|
@@ -65,6 +98,8 @@ class Processor(DocumentEmbeddingsQueryService):
|
|
65
98
|
"d-" + msg.user + "-" + msg.collection + "-" + str(dim)
|
66
99
|
)
|
67
100
|
|
101
|
+
self.ensure_index_exists(index_name, dim)
|
102
|
+
|
68
103
|
index = self.pinecone.Index(index_name)
|
69
104
|
|
70
105
|
results = index.query(
|
{trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/doc_embeddings/qdrant/service.py
RENAMED
@@ -38,6 +38,24 @@ class Processor(DocumentEmbeddingsQueryService):
|
|
38
38
|
)
|
39
39
|
|
40
40
|
self.qdrant = QdrantClient(url=store_uri, api_key=api_key)
|
41
|
+
self.last_collection = None
|
42
|
+
|
43
|
+
def ensure_collection_exists(self, collection, dim):
|
44
|
+
"""Ensure collection exists, create if it doesn't"""
|
45
|
+
if collection != self.last_collection:
|
46
|
+
if not self.qdrant.collection_exists(collection):
|
47
|
+
try:
|
48
|
+
self.qdrant.create_collection(
|
49
|
+
collection_name=collection,
|
50
|
+
vectors_config=VectorParams(
|
51
|
+
size=dim, distance=Distance.COSINE
|
52
|
+
),
|
53
|
+
)
|
54
|
+
logger.info(f"Created collection: {collection}")
|
55
|
+
except Exception as e:
|
56
|
+
logger.error(f"Qdrant collection creation failed: {e}")
|
57
|
+
raise e
|
58
|
+
self.last_collection = collection
|
41
59
|
|
42
60
|
async def query_document_embeddings(self, msg):
|
43
61
|
|
@@ -53,6 +71,8 @@ class Processor(DocumentEmbeddingsQueryService):
|
|
53
71
|
str(dim)
|
54
72
|
)
|
55
73
|
|
74
|
+
self.ensure_collection_exists(collection, dim)
|
75
|
+
|
56
76
|
search_result = self.qdrant.query_points(
|
57
77
|
collection_name=collection,
|
58
78
|
query=vec,
|
@@ -49,6 +49,39 @@ class Processor(GraphEmbeddingsQueryService):
|
|
49
49
|
}
|
50
50
|
)
|
51
51
|
|
52
|
+
self.last_index_name = None
|
53
|
+
|
54
|
+
def ensure_index_exists(self, index_name, dim):
|
55
|
+
"""Ensure index exists, create if it doesn't"""
|
56
|
+
if index_name != self.last_index_name:
|
57
|
+
if not self.pinecone.has_index(index_name):
|
58
|
+
try:
|
59
|
+
self.pinecone.create_index(
|
60
|
+
name=index_name,
|
61
|
+
dimension=dim,
|
62
|
+
metric="cosine",
|
63
|
+
spec=ServerlessSpec(
|
64
|
+
cloud="aws",
|
65
|
+
region="us-east-1",
|
66
|
+
)
|
67
|
+
)
|
68
|
+
logger.info(f"Created index: {index_name}")
|
69
|
+
|
70
|
+
# Wait for index to be ready
|
71
|
+
import time
|
72
|
+
for i in range(0, 1000):
|
73
|
+
if self.pinecone.describe_index(index_name).status["ready"]:
|
74
|
+
break
|
75
|
+
time.sleep(1)
|
76
|
+
|
77
|
+
if not self.pinecone.describe_index(index_name).status["ready"]:
|
78
|
+
raise RuntimeError("Gave up waiting for index creation")
|
79
|
+
|
80
|
+
except Exception as e:
|
81
|
+
logger.error(f"Pinecone index creation failed: {e}")
|
82
|
+
raise e
|
83
|
+
self.last_index_name = index_name
|
84
|
+
|
52
85
|
def create_value(self, ent):
|
53
86
|
if ent.startswith("http://") or ent.startswith("https://"):
|
54
87
|
return Value(value=ent, is_uri=True)
|
@@ -74,6 +107,8 @@ class Processor(GraphEmbeddingsQueryService):
|
|
74
107
|
"t-" + msg.user + "-" + msg.collection + "-" + str(dim)
|
75
108
|
)
|
76
109
|
|
110
|
+
self.ensure_index_exists(index_name, dim)
|
111
|
+
|
77
112
|
index = self.pinecone.Index(index_name)
|
78
113
|
|
79
114
|
# Heuristic hack, get (2*limit), so that we have more chance
|
{trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/graph_embeddings/qdrant/service.py
RENAMED
@@ -38,6 +38,24 @@ class Processor(GraphEmbeddingsQueryService):
|
|
38
38
|
)
|
39
39
|
|
40
40
|
self.qdrant = QdrantClient(url=store_uri, api_key=api_key)
|
41
|
+
self.last_collection = None
|
42
|
+
|
43
|
+
def ensure_collection_exists(self, collection, dim):
|
44
|
+
"""Ensure collection exists, create if it doesn't"""
|
45
|
+
if collection != self.last_collection:
|
46
|
+
if not self.qdrant.collection_exists(collection):
|
47
|
+
try:
|
48
|
+
self.qdrant.create_collection(
|
49
|
+
collection_name=collection,
|
50
|
+
vectors_config=VectorParams(
|
51
|
+
size=dim, distance=Distance.COSINE
|
52
|
+
),
|
53
|
+
)
|
54
|
+
logger.info(f"Created collection: {collection}")
|
55
|
+
except Exception as e:
|
56
|
+
logger.error(f"Qdrant collection creation failed: {e}")
|
57
|
+
raise e
|
58
|
+
self.last_collection = collection
|
41
59
|
|
42
60
|
def create_value(self, ent):
|
43
61
|
if ent.startswith("http://") or ent.startswith("https://"):
|
@@ -60,6 +78,8 @@ class Processor(GraphEmbeddingsQueryService):
|
|
60
78
|
str(dim)
|
61
79
|
)
|
62
80
|
|
81
|
+
self.ensure_collection_exists(collection, dim)
|
82
|
+
|
63
83
|
# Heuristic hack, get (2*limit), so that we have more chance
|
64
84
|
# of getting (limit) entities
|
65
85
|
search_result = self.qdrant.query_points(
|
{trustgraph_flow-1.3.18 → trustgraph_flow-1.4.1}/trustgraph/query/triples/memgraph/service.py
RENAMED
@@ -55,6 +55,10 @@ class Processor(TriplesQueryService):
|
|
55
55
|
|
56
56
|
try:
|
57
57
|
|
58
|
+
# Extract user and collection, use defaults if not provided
|
59
|
+
user = query.user if query.user else "default"
|
60
|
+
collection = query.collection if query.collection else "default"
|
61
|
+
|
58
62
|
triples = []
|
59
63
|
|
60
64
|
if query.s is not None:
|
@@ -64,10 +68,13 @@ class Processor(TriplesQueryService):
|
|
64
68
|
# SPO
|
65
69
|
|
66
70
|
records, summary, keys = self.io.execute_query(
|
67
|
-
"MATCH (src:Node {uri: $src
|
71
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
72
|
+
"[rel:Rel {uri: $rel, user: $user, collection: $collection}]->"
|
73
|
+
"(dest:Literal {value: $value, user: $user, collection: $collection}) "
|
68
74
|
"RETURN $src as src "
|
69
75
|
"LIMIT " + str(query.limit),
|
70
76
|
src=query.s.value, rel=query.p.value, value=query.o.value,
|
77
|
+
user=user, collection=collection,
|
71
78
|
database_=self.db,
|
72
79
|
)
|
73
80
|
|
@@ -75,10 +82,13 @@ class Processor(TriplesQueryService):
|
|
75
82
|
triples.append((query.s.value, query.p.value, query.o.value))
|
76
83
|
|
77
84
|
records, summary, keys = self.io.execute_query(
|
78
|
-
"MATCH (src:Node {uri: $src
|
85
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
86
|
+
"[rel:Rel {uri: $rel, user: $user, collection: $collection}]->"
|
87
|
+
"(dest:Node {uri: $uri, user: $user, collection: $collection}) "
|
79
88
|
"RETURN $src as src "
|
80
89
|
"LIMIT " + str(query.limit),
|
81
90
|
src=query.s.value, rel=query.p.value, uri=query.o.value,
|
91
|
+
user=user, collection=collection,
|
82
92
|
database_=self.db,
|
83
93
|
)
|
84
94
|
|
@@ -90,10 +100,13 @@ class Processor(TriplesQueryService):
|
|
90
100
|
# SP
|
91
101
|
|
92
102
|
records, summary, keys = self.io.execute_query(
|
93
|
-
"MATCH (src:Node {uri: $src
|
103
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
104
|
+
"[rel:Rel {uri: $rel, user: $user, collection: $collection}]->"
|
105
|
+
"(dest:Literal {user: $user, collection: $collection}) "
|
94
106
|
"RETURN dest.value as dest "
|
95
107
|
"LIMIT " + str(query.limit),
|
96
108
|
src=query.s.value, rel=query.p.value,
|
109
|
+
user=user, collection=collection,
|
97
110
|
database_=self.db,
|
98
111
|
)
|
99
112
|
|
@@ -102,10 +115,13 @@ class Processor(TriplesQueryService):
|
|
102
115
|
triples.append((query.s.value, query.p.value, data["dest"]))
|
103
116
|
|
104
117
|
records, summary, keys = self.io.execute_query(
|
105
|
-
"MATCH (src:Node {uri: $src
|
118
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
119
|
+
"[rel:Rel {uri: $rel, user: $user, collection: $collection}]->"
|
120
|
+
"(dest:Node {user: $user, collection: $collection}) "
|
106
121
|
"RETURN dest.uri as dest "
|
107
122
|
"LIMIT " + str(query.limit),
|
108
123
|
src=query.s.value, rel=query.p.value,
|
124
|
+
user=user, collection=collection,
|
109
125
|
database_=self.db,
|
110
126
|
)
|
111
127
|
|
@@ -120,10 +136,13 @@ class Processor(TriplesQueryService):
|
|
120
136
|
# SO
|
121
137
|
|
122
138
|
records, summary, keys = self.io.execute_query(
|
123
|
-
"MATCH (src:Node {uri: $src
|
139
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
140
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
141
|
+
"(dest:Literal {value: $value, user: $user, collection: $collection}) "
|
124
142
|
"RETURN rel.uri as rel "
|
125
143
|
"LIMIT " + str(query.limit),
|
126
144
|
src=query.s.value, value=query.o.value,
|
145
|
+
user=user, collection=collection,
|
127
146
|
database_=self.db,
|
128
147
|
)
|
129
148
|
|
@@ -132,10 +151,13 @@ class Processor(TriplesQueryService):
|
|
132
151
|
triples.append((query.s.value, data["rel"], query.o.value))
|
133
152
|
|
134
153
|
records, summary, keys = self.io.execute_query(
|
135
|
-
"MATCH (src:Node {uri: $src
|
154
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
155
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
156
|
+
"(dest:Node {uri: $uri, user: $user, collection: $collection}) "
|
136
157
|
"RETURN rel.uri as rel "
|
137
158
|
"LIMIT " + str(query.limit),
|
138
159
|
src=query.s.value, uri=query.o.value,
|
160
|
+
user=user, collection=collection,
|
139
161
|
database_=self.db,
|
140
162
|
)
|
141
163
|
|
@@ -148,10 +170,13 @@ class Processor(TriplesQueryService):
|
|
148
170
|
# S
|
149
171
|
|
150
172
|
records, summary, keys = self.io.execute_query(
|
151
|
-
"MATCH (src:Node {uri: $src})-
|
173
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
174
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
175
|
+
"(dest:Literal {user: $user, collection: $collection}) "
|
152
176
|
"RETURN rel.uri as rel, dest.value as dest "
|
153
177
|
"LIMIT " + str(query.limit),
|
154
178
|
src=query.s.value,
|
179
|
+
user=user, collection=collection,
|
155
180
|
database_=self.db,
|
156
181
|
)
|
157
182
|
|
@@ -160,10 +185,13 @@ class Processor(TriplesQueryService):
|
|
160
185
|
triples.append((query.s.value, data["rel"], data["dest"]))
|
161
186
|
|
162
187
|
records, summary, keys = self.io.execute_query(
|
163
|
-
"MATCH (src:Node {uri: $src})-
|
188
|
+
"MATCH (src:Node {uri: $src, user: $user, collection: $collection})-"
|
189
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
190
|
+
"(dest:Node {user: $user, collection: $collection}) "
|
164
191
|
"RETURN rel.uri as rel, dest.uri as dest "
|
165
192
|
"LIMIT " + str(query.limit),
|
166
193
|
src=query.s.value,
|
194
|
+
user=user, collection=collection,
|
167
195
|
database_=self.db,
|
168
196
|
)
|
169
197
|
|
@@ -181,10 +209,13 @@ class Processor(TriplesQueryService):
|
|
181
209
|
# PO
|
182
210
|
|
183
211
|
records, summary, keys = self.io.execute_query(
|
184
|
-
"MATCH (src:Node
|
212
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
213
|
+
"[rel:Rel {uri: $uri, user: $user, collection: $collection}]->"
|
214
|
+
"(dest:Literal {value: $value, user: $user, collection: $collection}) "
|
185
215
|
"RETURN src.uri as src "
|
186
216
|
"LIMIT " + str(query.limit),
|
187
217
|
uri=query.p.value, value=query.o.value,
|
218
|
+
user=user, collection=collection,
|
188
219
|
database_=self.db,
|
189
220
|
)
|
190
221
|
|
@@ -193,10 +224,13 @@ class Processor(TriplesQueryService):
|
|
193
224
|
triples.append((data["src"], query.p.value, query.o.value))
|
194
225
|
|
195
226
|
records, summary, keys = self.io.execute_query(
|
196
|
-
"MATCH (src:Node
|
227
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
228
|
+
"[rel:Rel {uri: $uri, user: $user, collection: $collection}]->"
|
229
|
+
"(dest:Node {uri: $dest, user: $user, collection: $collection}) "
|
197
230
|
"RETURN src.uri as src "
|
198
231
|
"LIMIT " + str(query.limit),
|
199
232
|
uri=query.p.value, dest=query.o.value,
|
233
|
+
user=user, collection=collection,
|
200
234
|
database_=self.db,
|
201
235
|
)
|
202
236
|
|
@@ -209,10 +243,13 @@ class Processor(TriplesQueryService):
|
|
209
243
|
# P
|
210
244
|
|
211
245
|
records, summary, keys = self.io.execute_query(
|
212
|
-
"MATCH (src:Node
|
246
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
247
|
+
"[rel:Rel {uri: $uri, user: $user, collection: $collection}]->"
|
248
|
+
"(dest:Literal {user: $user, collection: $collection}) "
|
213
249
|
"RETURN src.uri as src, dest.value as dest "
|
214
250
|
"LIMIT " + str(query.limit),
|
215
251
|
uri=query.p.value,
|
252
|
+
user=user, collection=collection,
|
216
253
|
database_=self.db,
|
217
254
|
)
|
218
255
|
|
@@ -221,10 +258,13 @@ class Processor(TriplesQueryService):
|
|
221
258
|
triples.append((data["src"], query.p.value, data["dest"]))
|
222
259
|
|
223
260
|
records, summary, keys = self.io.execute_query(
|
224
|
-
"MATCH (src:Node
|
261
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
262
|
+
"[rel:Rel {uri: $uri, user: $user, collection: $collection}]->"
|
263
|
+
"(dest:Node {user: $user, collection: $collection}) "
|
225
264
|
"RETURN src.uri as src, dest.uri as dest "
|
226
265
|
"LIMIT " + str(query.limit),
|
227
266
|
uri=query.p.value,
|
267
|
+
user=user, collection=collection,
|
228
268
|
database_=self.db,
|
229
269
|
)
|
230
270
|
|
@@ -239,10 +279,13 @@ class Processor(TriplesQueryService):
|
|
239
279
|
# O
|
240
280
|
|
241
281
|
records, summary, keys = self.io.execute_query(
|
242
|
-
"MATCH (src:Node
|
282
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
283
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
284
|
+
"(dest:Literal {value: $value, user: $user, collection: $collection}) "
|
243
285
|
"RETURN src.uri as src, rel.uri as rel "
|
244
286
|
"LIMIT " + str(query.limit),
|
245
287
|
value=query.o.value,
|
288
|
+
user=user, collection=collection,
|
246
289
|
database_=self.db,
|
247
290
|
)
|
248
291
|
|
@@ -251,10 +294,13 @@ class Processor(TriplesQueryService):
|
|
251
294
|
triples.append((data["src"], data["rel"], query.o.value))
|
252
295
|
|
253
296
|
records, summary, keys = self.io.execute_query(
|
254
|
-
"MATCH (src:Node
|
297
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
298
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
299
|
+
"(dest:Node {uri: $uri, user: $user, collection: $collection}) "
|
255
300
|
"RETURN src.uri as src, rel.uri as rel "
|
256
301
|
"LIMIT " + str(query.limit),
|
257
302
|
uri=query.o.value,
|
303
|
+
user=user, collection=collection,
|
258
304
|
database_=self.db,
|
259
305
|
)
|
260
306
|
|
@@ -267,9 +313,12 @@ class Processor(TriplesQueryService):
|
|
267
313
|
# *
|
268
314
|
|
269
315
|
records, summary, keys = self.io.execute_query(
|
270
|
-
"MATCH (src:Node
|
316
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
317
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
318
|
+
"(dest:Literal {user: $user, collection: $collection}) "
|
271
319
|
"RETURN src.uri as src, rel.uri as rel, dest.value as dest "
|
272
320
|
"LIMIT " + str(query.limit),
|
321
|
+
user=user, collection=collection,
|
273
322
|
database_=self.db,
|
274
323
|
)
|
275
324
|
|
@@ -278,9 +327,12 @@ class Processor(TriplesQueryService):
|
|
278
327
|
triples.append((data["src"], data["rel"], data["dest"]))
|
279
328
|
|
280
329
|
records, summary, keys = self.io.execute_query(
|
281
|
-
"MATCH (src:Node
|
330
|
+
"MATCH (src:Node {user: $user, collection: $collection})-"
|
331
|
+
"[rel:Rel {user: $user, collection: $collection}]->"
|
332
|
+
"(dest:Node {user: $user, collection: $collection}) "
|
282
333
|
"RETURN src.uri as src, rel.uri as rel, dest.uri as dest "
|
283
334
|
"LIMIT " + str(query.limit),
|
335
|
+
user=user, collection=collection,
|
284
336
|
database_=self.db,
|
285
337
|
)
|
286
338
|
|