trustgraph-flow 1.3.17__tar.gz → 1.3.18__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.17 → trustgraph_flow-1.3.18}/PKG-INFO +1 -1
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/pyproject.toml +0 -1
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/direct/milvus_doc_embeddings.py +34 -11
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/direct/milvus_graph_embeddings.py +34 -11
- trustgraph_flow-1.3.18/trustgraph/flow_version.py +1 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/milvus/service.py +6 -1
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/milvus/service.py +6 -1
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/milvus/write.py +5 -1
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/milvus/write.py +5 -1
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph_flow.egg-info/PKG-INFO +1 -1
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph_flow.egg-info/SOURCES.txt +0 -4
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph_flow.egg-info/entry_points.txt +0 -1
- trustgraph_flow-1.3.17/trustgraph/direct/milvus_object_embeddings.py +0 -157
- trustgraph_flow-1.3.17/trustgraph/flow_version.py +0 -1
- trustgraph_flow-1.3.17/trustgraph/storage/object_embeddings/milvus/write.py +0 -61
- trustgraph_flow-1.3.17/trustgraph/storage/triples/neo4j/__init__.py +0 -3
- trustgraph_flow-1.3.17/trustgraph/storage/triples/neo4j/__main__.py +0 -7
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/README.md +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/setup.cfg +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/mcp_tool/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/mcp_tool/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/mcp_tool/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/react/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/react/types.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/agent/tool_filter.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/config/service/config.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/config/service/flow.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/config/service/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/cores/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/cores/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/cores/knowledge.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/cores/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/direct/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/external/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/agent/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/agent/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/agent/extract.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/objects/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/objects/processor.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/auth.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/config/receiver.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/agent.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/config.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/core_export.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/core_import.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/document_load.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/document_rag.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/embeddings.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/flow.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/knowledge.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/librarian.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/manager.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/mux.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/nlp_query.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/objects_import.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/objects_query.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/prompt.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/requestor.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/sender.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/serialize.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/streamer.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/structured_query.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/text_completion.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/text_load.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/triples_export.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/triples_import.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/dispatch/triples_query.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/endpoint/manager.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/endpoint/metrics.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/endpoint/socket.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/running.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/unused/dbpedia.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/unused/encyclopedia.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/gateway/unused/internet_search.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/librarian/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/metering/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/metering/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/metering/counter.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/tgi/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/model/text_completion/vllm/llm.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/processing/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/processing/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/processing/processing.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/prompt/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/prompt/template/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/prompt/template/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/prompt/template/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/objects/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/objects/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/objects/cassandra/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/nlp_query/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/nlp_query/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/nlp_query/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/structured_query/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/structured_query/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/retrieval/structured_query/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/rev_gateway/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/rev_gateway/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/rev_gateway/dispatcher.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/rev_gateway/service.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/knowledge/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/knowledge/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/knowledge/store.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/objects/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/objects/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/objects/cassandra/write.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/object_embeddings/milvus → trustgraph_flow-1.3.18/trustgraph/storage/rows/cassandra}/__init__.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/object_embeddings/milvus → trustgraph_flow-1.3.18/trustgraph/storage/rows/cassandra}/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/rows → trustgraph_flow-1.3.18/trustgraph/storage/triples}/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/rows → trustgraph_flow-1.3.18/trustgraph/storage/triples}/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/triples/cassandra → trustgraph_flow-1.3.18/trustgraph/storage/triples/falkordb}/__init__.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/triples/cassandra → trustgraph_flow-1.3.18/trustgraph/storage/triples/falkordb}/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/triples/falkordb → trustgraph_flow-1.3.18/trustgraph/storage/triples/memgraph}/__init__.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/triples/falkordb → trustgraph_flow-1.3.18/trustgraph/storage/triples/memgraph}/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/triples/memgraph → trustgraph_flow-1.3.18/trustgraph/storage/triples/neo4j}/__init__.py +0 -0
- {trustgraph_flow-1.3.17/trustgraph/storage/triples/memgraph → trustgraph_flow-1.3.18/trustgraph/storage/triples/neo4j}/__main__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/tables/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/tables/config.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/tables/knowledge.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/tables/library.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/template/__init__.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/template/prompt_manager.py +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/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.
|
3
|
+
Version: 1.3.18
|
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
|
@@ -90,7 +90,6 @@ metering = "trustgraph.metering:run"
|
|
90
90
|
nlp-query = "trustgraph.retrieval.nlp_query:run"
|
91
91
|
objects-write-cassandra = "trustgraph.storage.objects.cassandra:run"
|
92
92
|
objects-query-cassandra = "trustgraph.query.objects.cassandra:run"
|
93
|
-
oe-write-milvus = "trustgraph.storage.object_embeddings.milvus:run"
|
94
93
|
pdf-decoder = "trustgraph.decoding.pdf:run"
|
95
94
|
pdf-ocr-mistral = "trustgraph.decoding.mistral_ocr:run"
|
96
95
|
prompt-template = "trustgraph.prompt.template:run"
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/direct/milvus_doc_embeddings.py
RENAMED
@@ -2,9 +2,32 @@
|
|
2
2
|
from pymilvus import MilvusClient, CollectionSchema, FieldSchema, DataType
|
3
3
|
import time
|
4
4
|
import logging
|
5
|
+
import re
|
5
6
|
|
6
7
|
logger = logging.getLogger(__name__)
|
7
8
|
|
9
|
+
def make_safe_collection_name(user, collection, dimension, prefix):
|
10
|
+
"""
|
11
|
+
Create a safe Milvus collection name from user/collection parameters.
|
12
|
+
Milvus only allows letters, numbers, and underscores.
|
13
|
+
"""
|
14
|
+
def sanitize(s):
|
15
|
+
# Replace non-alphanumeric characters (except underscore) with underscore
|
16
|
+
# Then collapse multiple underscores into single underscore
|
17
|
+
safe = re.sub(r'[^a-zA-Z0-9_]', '_', s)
|
18
|
+
safe = re.sub(r'_+', '_', safe)
|
19
|
+
# Remove leading/trailing underscores
|
20
|
+
safe = safe.strip('_')
|
21
|
+
# Ensure it's not empty
|
22
|
+
if not safe:
|
23
|
+
safe = 'default'
|
24
|
+
return safe
|
25
|
+
|
26
|
+
safe_user = sanitize(user)
|
27
|
+
safe_collection = sanitize(collection)
|
28
|
+
|
29
|
+
return f"{prefix}_{safe_user}_{safe_collection}_{dimension}"
|
30
|
+
|
8
31
|
class DocVectors:
|
9
32
|
|
10
33
|
def __init__(self, uri="http://localhost:19530", prefix='doc'):
|
@@ -26,9 +49,9 @@ class DocVectors:
|
|
26
49
|
self.next_reload = time.time() + self.reload_time
|
27
50
|
logger.debug(f"Reload at {self.next_reload}")
|
28
51
|
|
29
|
-
def init_collection(self, dimension):
|
52
|
+
def init_collection(self, dimension, user, collection):
|
30
53
|
|
31
|
-
collection_name = self.prefix
|
54
|
+
collection_name = make_safe_collection_name(user, collection, dimension, self.prefix)
|
32
55
|
|
33
56
|
pkey_field = FieldSchema(
|
34
57
|
name="id",
|
@@ -75,14 +98,14 @@ class DocVectors:
|
|
75
98
|
index_params=index_params
|
76
99
|
)
|
77
100
|
|
78
|
-
self.collections[dimension] = collection_name
|
101
|
+
self.collections[(dimension, user, collection)] = collection_name
|
79
102
|
|
80
|
-
def insert(self, embeds, doc):
|
103
|
+
def insert(self, embeds, doc, user, collection):
|
81
104
|
|
82
105
|
dim = len(embeds)
|
83
106
|
|
84
|
-
if dim not in self.collections:
|
85
|
-
self.init_collection(dim)
|
107
|
+
if (dim, user, collection) not in self.collections:
|
108
|
+
self.init_collection(dim, user, collection)
|
86
109
|
|
87
110
|
data = [
|
88
111
|
{
|
@@ -92,18 +115,18 @@ class DocVectors:
|
|
92
115
|
]
|
93
116
|
|
94
117
|
self.client.insert(
|
95
|
-
collection_name=self.collections[dim],
|
118
|
+
collection_name=self.collections[(dim, user, collection)],
|
96
119
|
data=data
|
97
120
|
)
|
98
121
|
|
99
|
-
def search(self, embeds, fields=["doc"], limit=10):
|
122
|
+
def search(self, embeds, user, collection, fields=["doc"], limit=10):
|
100
123
|
|
101
124
|
dim = len(embeds)
|
102
125
|
|
103
|
-
if dim not in self.collections:
|
104
|
-
self.init_collection(dim)
|
126
|
+
if (dim, user, collection) not in self.collections:
|
127
|
+
self.init_collection(dim, user, collection)
|
105
128
|
|
106
|
-
coll = self.collections[dim]
|
129
|
+
coll = self.collections[(dim, user, collection)]
|
107
130
|
|
108
131
|
search_params = {
|
109
132
|
"metric_type": "COSINE",
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/direct/milvus_graph_embeddings.py
RENAMED
@@ -2,9 +2,32 @@
|
|
2
2
|
from pymilvus import MilvusClient, CollectionSchema, FieldSchema, DataType
|
3
3
|
import time
|
4
4
|
import logging
|
5
|
+
import re
|
5
6
|
|
6
7
|
logger = logging.getLogger(__name__)
|
7
8
|
|
9
|
+
def make_safe_collection_name(user, collection, dimension, prefix):
|
10
|
+
"""
|
11
|
+
Create a safe Milvus collection name from user/collection parameters.
|
12
|
+
Milvus only allows letters, numbers, and underscores.
|
13
|
+
"""
|
14
|
+
def sanitize(s):
|
15
|
+
# Replace non-alphanumeric characters (except underscore) with underscore
|
16
|
+
# Then collapse multiple underscores into single underscore
|
17
|
+
safe = re.sub(r'[^a-zA-Z0-9_]', '_', s)
|
18
|
+
safe = re.sub(r'_+', '_', safe)
|
19
|
+
# Remove leading/trailing underscores
|
20
|
+
safe = safe.strip('_')
|
21
|
+
# Ensure it's not empty
|
22
|
+
if not safe:
|
23
|
+
safe = 'default'
|
24
|
+
return safe
|
25
|
+
|
26
|
+
safe_user = sanitize(user)
|
27
|
+
safe_collection = sanitize(collection)
|
28
|
+
|
29
|
+
return f"{prefix}_{safe_user}_{safe_collection}_{dimension}"
|
30
|
+
|
8
31
|
class EntityVectors:
|
9
32
|
|
10
33
|
def __init__(self, uri="http://localhost:19530", prefix='entity'):
|
@@ -26,9 +49,9 @@ class EntityVectors:
|
|
26
49
|
self.next_reload = time.time() + self.reload_time
|
27
50
|
logger.debug(f"Reload at {self.next_reload}")
|
28
51
|
|
29
|
-
def init_collection(self, dimension):
|
52
|
+
def init_collection(self, dimension, user, collection):
|
30
53
|
|
31
|
-
collection_name = self.prefix
|
54
|
+
collection_name = make_safe_collection_name(user, collection, dimension, self.prefix)
|
32
55
|
|
33
56
|
pkey_field = FieldSchema(
|
34
57
|
name="id",
|
@@ -75,14 +98,14 @@ class EntityVectors:
|
|
75
98
|
index_params=index_params
|
76
99
|
)
|
77
100
|
|
78
|
-
self.collections[dimension] = collection_name
|
101
|
+
self.collections[(dimension, user, collection)] = collection_name
|
79
102
|
|
80
|
-
def insert(self, embeds, entity):
|
103
|
+
def insert(self, embeds, entity, user, collection):
|
81
104
|
|
82
105
|
dim = len(embeds)
|
83
106
|
|
84
|
-
if dim not in self.collections:
|
85
|
-
self.init_collection(dim)
|
107
|
+
if (dim, user, collection) not in self.collections:
|
108
|
+
self.init_collection(dim, user, collection)
|
86
109
|
|
87
110
|
data = [
|
88
111
|
{
|
@@ -92,18 +115,18 @@ class EntityVectors:
|
|
92
115
|
]
|
93
116
|
|
94
117
|
self.client.insert(
|
95
|
-
collection_name=self.collections[dim],
|
118
|
+
collection_name=self.collections[(dim, user, collection)],
|
96
119
|
data=data
|
97
120
|
)
|
98
121
|
|
99
|
-
def search(self, embeds, fields=["entity"], limit=10):
|
122
|
+
def search(self, embeds, user, collection, fields=["entity"], limit=10):
|
100
123
|
|
101
124
|
dim = len(embeds)
|
102
125
|
|
103
|
-
if dim not in self.collections:
|
104
|
-
self.init_collection(dim)
|
126
|
+
if (dim, user, collection) not in self.collections:
|
127
|
+
self.init_collection(dim, user, collection)
|
105
128
|
|
106
|
-
coll = self.collections[dim]
|
129
|
+
coll = self.collections[(dim, user, collection)]
|
107
130
|
|
108
131
|
search_params = {
|
109
132
|
"metric_type": "COSINE",
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "1.3.18"
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/query/doc_embeddings/milvus/service.py
RENAMED
@@ -43,7 +43,12 @@ class Processor(DocumentEmbeddingsQueryService):
|
|
43
43
|
|
44
44
|
for vec in msg.vectors:
|
45
45
|
|
46
|
-
resp = self.vecstore.search(
|
46
|
+
resp = self.vecstore.search(
|
47
|
+
vec,
|
48
|
+
msg.user,
|
49
|
+
msg.collection,
|
50
|
+
limit=msg.limit
|
51
|
+
)
|
47
52
|
|
48
53
|
for r in resp:
|
49
54
|
chunk = r["entity"]["doc"]
|
@@ -50,7 +50,12 @@ class Processor(GraphEmbeddingsQueryService):
|
|
50
50
|
|
51
51
|
for vec in msg.vectors:
|
52
52
|
|
53
|
-
resp = self.vecstore.search(
|
53
|
+
resp = self.vecstore.search(
|
54
|
+
vec,
|
55
|
+
msg.user,
|
56
|
+
msg.collection,
|
57
|
+
limit=msg.limit * 2
|
58
|
+
)
|
54
59
|
|
55
60
|
for r in resp:
|
56
61
|
ent = r["entity"]["entity"]
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/storage/doc_embeddings/milvus/write.py
RENAMED
@@ -33,7 +33,11 @@ class Processor(DocumentEmbeddingsStoreService):
|
|
33
33
|
if chunk == "": continue
|
34
34
|
|
35
35
|
for vec in emb.vectors:
|
36
|
-
self.vecstore.insert(
|
36
|
+
self.vecstore.insert(
|
37
|
+
vec, chunk,
|
38
|
+
message.metadata.user,
|
39
|
+
message.metadata.collection
|
40
|
+
)
|
37
41
|
|
38
42
|
@staticmethod
|
39
43
|
def add_args(parser):
|
@@ -29,7 +29,11 @@ class Processor(GraphEmbeddingsStoreService):
|
|
29
29
|
|
30
30
|
if entity.entity.value != "" and entity.entity.value is not None:
|
31
31
|
for vec in entity.vectors:
|
32
|
-
self.vecstore.insert(
|
32
|
+
self.vecstore.insert(
|
33
|
+
vec, entity.entity.value,
|
34
|
+
message.metadata.user,
|
35
|
+
message.metadata.collection
|
36
|
+
)
|
33
37
|
|
34
38
|
@staticmethod
|
35
39
|
def add_args(parser):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.18
|
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
|
@@ -40,7 +40,6 @@ trustgraph/direct/__init__.py
|
|
40
40
|
trustgraph/direct/cassandra.py
|
41
41
|
trustgraph/direct/milvus_doc_embeddings.py
|
42
42
|
trustgraph/direct/milvus_graph_embeddings.py
|
43
|
-
trustgraph/direct/milvus_object_embeddings.py
|
44
43
|
trustgraph/embeddings/__init__.py
|
45
44
|
trustgraph/embeddings/document_embeddings/__init__.py
|
46
45
|
trustgraph/embeddings/document_embeddings/__main__.py
|
@@ -260,9 +259,6 @@ trustgraph/storage/knowledge/__init__.py
|
|
260
259
|
trustgraph/storage/knowledge/__main__.py
|
261
260
|
trustgraph/storage/knowledge/store.py
|
262
261
|
trustgraph/storage/object_embeddings/__init__.py
|
263
|
-
trustgraph/storage/object_embeddings/milvus/__init__.py
|
264
|
-
trustgraph/storage/object_embeddings/milvus/__main__.py
|
265
|
-
trustgraph/storage/object_embeddings/milvus/write.py
|
266
262
|
trustgraph/storage/objects/__init__.py
|
267
263
|
trustgraph/storage/objects/cassandra/__init__.py
|
268
264
|
trustgraph/storage/objects/cassandra/__main__.py
|
@@ -35,7 +35,6 @@ metering = trustgraph.metering:run
|
|
35
35
|
nlp-query = trustgraph.retrieval.nlp_query:run
|
36
36
|
objects-query-cassandra = trustgraph.query.objects.cassandra:run
|
37
37
|
objects-write-cassandra = trustgraph.storage.objects.cassandra:run
|
38
|
-
oe-write-milvus = trustgraph.storage.object_embeddings.milvus:run
|
39
38
|
pdf-decoder = trustgraph.decoding.pdf:run
|
40
39
|
pdf-ocr-mistral = trustgraph.decoding.mistral_ocr:run
|
41
40
|
prompt-template = trustgraph.prompt.template:run
|
@@ -1,157 +0,0 @@
|
|
1
|
-
|
2
|
-
from pymilvus import MilvusClient, CollectionSchema, FieldSchema, DataType
|
3
|
-
import time
|
4
|
-
import logging
|
5
|
-
|
6
|
-
logger = logging.getLogger(__name__)
|
7
|
-
|
8
|
-
class ObjectVectors:
|
9
|
-
|
10
|
-
def __init__(self, uri="http://localhost:19530", prefix='obj'):
|
11
|
-
|
12
|
-
self.client = MilvusClient(uri=uri)
|
13
|
-
|
14
|
-
# Strategy is to create collections per dimension. Probably only
|
15
|
-
# going to be using 1 anyway, but that means we don't need to
|
16
|
-
# hard-code the dimension anywhere, and no big deal if more than
|
17
|
-
# one are created.
|
18
|
-
self.collections = {}
|
19
|
-
|
20
|
-
self.prefix = prefix
|
21
|
-
|
22
|
-
# Time between reloads
|
23
|
-
self.reload_time = 90
|
24
|
-
|
25
|
-
# Next time to reload - this forces a reload at next window
|
26
|
-
self.next_reload = time.time() + self.reload_time
|
27
|
-
logger.debug(f"Reload at {self.next_reload}")
|
28
|
-
|
29
|
-
def init_collection(self, dimension, name):
|
30
|
-
|
31
|
-
collection_name = self.prefix + "_" + name + "_" + str(dimension)
|
32
|
-
|
33
|
-
pkey_field = FieldSchema(
|
34
|
-
name="id",
|
35
|
-
dtype=DataType.INT64,
|
36
|
-
is_primary=True,
|
37
|
-
auto_id=True,
|
38
|
-
)
|
39
|
-
|
40
|
-
vec_field = FieldSchema(
|
41
|
-
name="vector",
|
42
|
-
dtype=DataType.FLOAT_VECTOR,
|
43
|
-
dim=dimension,
|
44
|
-
)
|
45
|
-
|
46
|
-
name_field = FieldSchema(
|
47
|
-
name="name",
|
48
|
-
dtype=DataType.VARCHAR,
|
49
|
-
max_length=65535,
|
50
|
-
)
|
51
|
-
|
52
|
-
key_name_field = FieldSchema(
|
53
|
-
name="key_name",
|
54
|
-
dtype=DataType.VARCHAR,
|
55
|
-
max_length=65535,
|
56
|
-
)
|
57
|
-
|
58
|
-
key_field = FieldSchema(
|
59
|
-
name="key",
|
60
|
-
dtype=DataType.VARCHAR,
|
61
|
-
max_length=65535,
|
62
|
-
)
|
63
|
-
|
64
|
-
schema = CollectionSchema(
|
65
|
-
fields = [
|
66
|
-
pkey_field, vec_field, name_field, key_name_field, key_field
|
67
|
-
],
|
68
|
-
description = "Object embedding schema",
|
69
|
-
)
|
70
|
-
|
71
|
-
self.client.create_collection(
|
72
|
-
collection_name=collection_name,
|
73
|
-
schema=schema,
|
74
|
-
metric_type="COSINE",
|
75
|
-
)
|
76
|
-
|
77
|
-
index_params = MilvusClient.prepare_index_params()
|
78
|
-
|
79
|
-
index_params.add_index(
|
80
|
-
field_name="vector",
|
81
|
-
metric_type="COSINE",
|
82
|
-
index_type="IVF_SQ8",
|
83
|
-
index_name="vector_index",
|
84
|
-
params={ "nlist": 128 }
|
85
|
-
)
|
86
|
-
|
87
|
-
self.client.create_index(
|
88
|
-
collection_name=collection_name,
|
89
|
-
index_params=index_params
|
90
|
-
)
|
91
|
-
|
92
|
-
self.collections[(dimension, name)] = collection_name
|
93
|
-
|
94
|
-
def insert(self, embeds, name, key_name, key):
|
95
|
-
|
96
|
-
dim = len(embeds)
|
97
|
-
|
98
|
-
if (dim, name) not in self.collections:
|
99
|
-
self.init_collection(dim, name)
|
100
|
-
|
101
|
-
data = [
|
102
|
-
{
|
103
|
-
"vector": embeds,
|
104
|
-
"name": name,
|
105
|
-
"key_name": key_name,
|
106
|
-
"key": key,
|
107
|
-
}
|
108
|
-
]
|
109
|
-
|
110
|
-
self.client.insert(
|
111
|
-
collection_name=self.collections[(dim, name)],
|
112
|
-
data=data
|
113
|
-
)
|
114
|
-
|
115
|
-
def search(self, embeds, name, fields=["key_name", "name"], limit=10):
|
116
|
-
|
117
|
-
dim = len(embeds)
|
118
|
-
|
119
|
-
if dim not in self.collections:
|
120
|
-
self.init_collection(dim, name)
|
121
|
-
|
122
|
-
coll = self.collections[(dim, name)]
|
123
|
-
|
124
|
-
search_params = {
|
125
|
-
"metric_type": "COSINE",
|
126
|
-
"params": {
|
127
|
-
"radius": 0.1,
|
128
|
-
"range_filter": 0.8
|
129
|
-
}
|
130
|
-
}
|
131
|
-
|
132
|
-
logger.debug("Loading...")
|
133
|
-
self.client.load_collection(
|
134
|
-
collection_name=coll,
|
135
|
-
)
|
136
|
-
|
137
|
-
logger.debug("Searching...")
|
138
|
-
|
139
|
-
res = self.client.search(
|
140
|
-
collection_name=coll,
|
141
|
-
data=[embeds],
|
142
|
-
limit=limit,
|
143
|
-
output_fields=fields,
|
144
|
-
search_params=search_params,
|
145
|
-
)[0]
|
146
|
-
|
147
|
-
|
148
|
-
# If reload time has passed, unload collection
|
149
|
-
if time.time() > self.next_reload:
|
150
|
-
logger.debug(f"Unloading, reload at {self.next_reload}")
|
151
|
-
self.client.release_collection(
|
152
|
-
collection_name=coll,
|
153
|
-
)
|
154
|
-
self.next_reload = time.time() + self.reload_time
|
155
|
-
|
156
|
-
return res
|
157
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "1.3.17"
|
@@ -1,61 +0,0 @@
|
|
1
|
-
|
2
|
-
"""
|
3
|
-
Accepts entity/vector pairs and writes them to a Milvus store.
|
4
|
-
"""
|
5
|
-
|
6
|
-
from .... schema import ObjectEmbeddings
|
7
|
-
from .... schema import object_embeddings_store_queue
|
8
|
-
from .... log_level import LogLevel
|
9
|
-
from .... direct.milvus_object_embeddings import ObjectVectors
|
10
|
-
from .... base import Consumer
|
11
|
-
|
12
|
-
module = "oe-write"
|
13
|
-
|
14
|
-
default_input_queue = object_embeddings_store_queue
|
15
|
-
default_subscriber = module
|
16
|
-
default_store_uri = 'http://localhost:19530'
|
17
|
-
|
18
|
-
class Processor(Consumer):
|
19
|
-
|
20
|
-
def __init__(self, **params):
|
21
|
-
|
22
|
-
input_queue = params.get("input_queue", default_input_queue)
|
23
|
-
subscriber = params.get("subscriber", default_subscriber)
|
24
|
-
store_uri = params.get("store_uri", default_store_uri)
|
25
|
-
|
26
|
-
super(Processor, self).__init__(
|
27
|
-
**params | {
|
28
|
-
"input_queue": input_queue,
|
29
|
-
"subscriber": subscriber,
|
30
|
-
"input_schema": ObjectEmbeddings,
|
31
|
-
"store_uri": store_uri,
|
32
|
-
}
|
33
|
-
)
|
34
|
-
|
35
|
-
self.vecstore = ObjectVectors(store_uri)
|
36
|
-
|
37
|
-
async def handle(self, msg):
|
38
|
-
|
39
|
-
v = msg.value()
|
40
|
-
|
41
|
-
if v.id != "" and v.id is not None:
|
42
|
-
for vec in v.vectors:
|
43
|
-
self.vecstore.insert(vec, v.name, v.key_name, v.id)
|
44
|
-
|
45
|
-
@staticmethod
|
46
|
-
def add_args(parser):
|
47
|
-
|
48
|
-
Consumer.add_args(
|
49
|
-
parser, default_input_queue, default_subscriber,
|
50
|
-
)
|
51
|
-
|
52
|
-
parser.add_argument(
|
53
|
-
'-t', '--store-uri',
|
54
|
-
default=default_store_uri,
|
55
|
-
help=f'Milvus store URI (default: {default_store_uri})'
|
56
|
-
)
|
57
|
-
|
58
|
-
def run():
|
59
|
-
|
60
|
-
Processor.launch(module, __doc__)
|
61
|
-
|
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
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/mistral_ocr/__init__.py
RENAMED
File without changes
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/mistral_ocr/__main__.py
RENAMED
File without changes
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/decoding/mistral_ocr/processor.py
RENAMED
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
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/fastembed/__init__.py
RENAMED
File without changes
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/fastembed/__main__.py
RENAMED
File without changes
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/fastembed/processor.py
RENAMED
File without changes
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/graph_embeddings/__init__.py
RENAMED
File without changes
|
{trustgraph_flow-1.3.17 → trustgraph_flow-1.3.18}/trustgraph/embeddings/graph_embeddings/__main__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|