trustgraph-flow 0.11.19__tar.gz → 0.12.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/PKG-INFO +6 -23
- trustgraph-flow-0.12.1/scripts/text-completion-azure-openai +6 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/setup.py +1 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/chunking/recursive/chunker.py +8 -6
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/chunking/token/chunker.py +8 -6
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/decoding/pdf/pdf_decoder.py +8 -6
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/direct/cassandra.py +31 -25
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/vectorize/vectorize.py +4 -4
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/definitions/extract.py +5 -5
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/relationships/extract.py +14 -9
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/topics/extract.py +5 -5
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/object/row/extract.py +8 -8
- trustgraph-flow-0.12.1/trustgraph/flow_version.py +1 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/graph_rag.py +124 -107
- trustgraph-flow-0.12.1/trustgraph/model/text_completion/azure_openai/llm.py +209 -0
- trustgraph-flow-0.12.1/trustgraph/model/text_completion/openai/__init__.py +3 -0
- trustgraph-flow-0.12.1/trustgraph/model/text_completion/openai/__main__.py +7 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/doc_embeddings/qdrant/service.py +4 -1
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/graph_embeddings/qdrant/service.py +4 -1
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/triples/cassandra/service.py +11 -1
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/retrieval/graph_rag/rag.py +3 -1
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/doc_embeddings/qdrant/write.py +5 -4
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/graph_embeddings/qdrant/write.py +5 -4
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/triples/cassandra/write.py +20 -1
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph_flow.egg-info/PKG-INFO +6 -23
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph_flow.egg-info/SOURCES.txt +4 -0
- trustgraph-flow-0.11.19/trustgraph/flow_version.py +0 -1
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/README.md +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/chunker-token +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/document-rag +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/embeddings-vectorize +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/graph-rag +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/metering +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/object-extract-row +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/prompt-generic +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/prompt-template +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/run-processing +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/setup.cfg +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/document_rag.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/vectorize/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/vectorize/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/metering/pricelist.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/template/prompts.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/claude → trustgraph-flow-0.12.1/trustgraph/model/text_completion/azure_openai}/__init__.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/claude → trustgraph-flow-0.12.1/trustgraph/model/text_completion/azure_openai}/__main__.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/cohere → trustgraph-flow-0.12.1/trustgraph/model/text_completion/claude}/__init__.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/cohere → trustgraph-flow-0.12.1/trustgraph/model/text_completion/claude}/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/llamafile → trustgraph-flow-0.12.1/trustgraph/model/text_completion/cohere}/__init__.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/llamafile → trustgraph-flow-0.12.1/trustgraph/model/text_completion/cohere}/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/ollama → trustgraph-flow-0.12.1/trustgraph/model/text_completion/llamafile}/__init__.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/ollama → trustgraph-flow-0.12.1/trustgraph/model/text_completion/llamafile}/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/openai → trustgraph-flow-0.12.1/trustgraph/model/text_completion/ollama}/__init__.py +0 -0
- {trustgraph-flow-0.11.19/trustgraph/model/text_completion/openai → trustgraph-flow-0.12.1/trustgraph/model/text_completion/ollama}/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph_flow.egg-info/requires.txt +13 -13
- {trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,36 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.12.1
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.11.19.tar.gz
|
7
6
|
Author: trustgraph.ai
|
8
7
|
Author-email: security@trustgraph.ai
|
8
|
+
License: UNKNOWN
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.12.1.tar.gz
|
10
|
+
Platform: UNKNOWN
|
9
11
|
Classifier: Programming Language :: Python :: 3
|
10
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
11
13
|
Classifier: Operating System :: OS Independent
|
12
14
|
Requires-Python: >=3.8
|
13
15
|
Description-Content-Type: text/markdown
|
14
|
-
Requires-Dist: trustgraph-base
|
15
|
-
Requires-Dist: urllib3
|
16
|
-
Requires-Dist: rdflib
|
17
|
-
Requires-Dist: pymilvus
|
18
|
-
Requires-Dist: langchain
|
19
|
-
Requires-Dist: langchain-core
|
20
|
-
Requires-Dist: langchain-text-splitters
|
21
|
-
Requires-Dist: langchain-community
|
22
|
-
Requires-Dist: requests
|
23
|
-
Requires-Dist: cassandra-driver
|
24
|
-
Requires-Dist: pulsar-client
|
25
|
-
Requires-Dist: pypdf
|
26
|
-
Requires-Dist: qdrant-client
|
27
|
-
Requires-Dist: tabulate
|
28
|
-
Requires-Dist: anthropic
|
29
|
-
Requires-Dist: pyyaml
|
30
|
-
Requires-Dist: prometheus-client
|
31
|
-
Requires-Dist: cohere
|
32
|
-
Requires-Dist: openai
|
33
|
-
Requires-Dist: neo4j
|
34
|
-
Requires-Dist: tiktoken
|
35
16
|
|
36
17
|
See https://trustgraph.ai/
|
18
|
+
|
19
|
+
|
@@ -83,6 +83,7 @@ setuptools.setup(
|
|
83
83
|
"scripts/rows-write-cassandra",
|
84
84
|
"scripts/run-processing",
|
85
85
|
"scripts/text-completion-azure",
|
86
|
+
"scripts/text-completion-azure-openai",
|
86
87
|
"scripts/text-completion-claude",
|
87
88
|
"scripts/text-completion-cohere",
|
88
89
|
"scripts/text-completion-llamafile",
|
@@ -7,7 +7,7 @@ as text as separate output objects.
|
|
7
7
|
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
8
8
|
from prometheus_client import Histogram
|
9
9
|
|
10
|
-
from ... schema import TextDocument, Chunk,
|
10
|
+
from ... schema import TextDocument, Chunk, Metadata
|
11
11
|
from ... schema import text_ingest_queue, chunk_ingest_queue
|
12
12
|
from ... log_level import LogLevel
|
13
13
|
from ... base import ConsumerProducer
|
@@ -55,7 +55,7 @@ class Processor(ConsumerProducer):
|
|
55
55
|
def handle(self, msg):
|
56
56
|
|
57
57
|
v = msg.value()
|
58
|
-
print(f"Chunking {v.
|
58
|
+
print(f"Chunking {v.metadata.id}...", flush=True)
|
59
59
|
|
60
60
|
texts = self.text_splitter.create_documents(
|
61
61
|
[v.text.decode("utf-8")]
|
@@ -63,13 +63,15 @@ class Processor(ConsumerProducer):
|
|
63
63
|
|
64
64
|
for ix, chunk in enumerate(texts):
|
65
65
|
|
66
|
-
id = v.
|
66
|
+
id = v.metadata.id + "-c" + str(ix)
|
67
67
|
|
68
68
|
r = Chunk(
|
69
|
-
|
70
|
-
source=v.
|
69
|
+
metadata=Metadata(
|
70
|
+
source=v.metadata.source,
|
71
71
|
id=id,
|
72
|
-
title=v.
|
72
|
+
title=v.metadata.title,
|
73
|
+
user=v.metadata.user,
|
74
|
+
collection=v.metadata.collection,
|
73
75
|
),
|
74
76
|
chunk=chunk.page_content.encode("utf-8"),
|
75
77
|
)
|
@@ -7,7 +7,7 @@ as text as separate output objects.
|
|
7
7
|
from langchain_text_splitters import TokenTextSplitter
|
8
8
|
from prometheus_client import Histogram
|
9
9
|
|
10
|
-
from ... schema import TextDocument, Chunk,
|
10
|
+
from ... schema import TextDocument, Chunk, Metadata
|
11
11
|
from ... schema import text_ingest_queue, chunk_ingest_queue
|
12
12
|
from ... log_level import LogLevel
|
13
13
|
from ... base import ConsumerProducer
|
@@ -54,7 +54,7 @@ class Processor(ConsumerProducer):
|
|
54
54
|
def handle(self, msg):
|
55
55
|
|
56
56
|
v = msg.value()
|
57
|
-
print(f"Chunking {v.
|
57
|
+
print(f"Chunking {v.metadata.id}...", flush=True)
|
58
58
|
|
59
59
|
texts = self.text_splitter.create_documents(
|
60
60
|
[v.text.decode("utf-8")]
|
@@ -62,13 +62,15 @@ class Processor(ConsumerProducer):
|
|
62
62
|
|
63
63
|
for ix, chunk in enumerate(texts):
|
64
64
|
|
65
|
-
id = v.
|
65
|
+
id = v.metadata.id + "-c" + str(ix)
|
66
66
|
|
67
67
|
r = Chunk(
|
68
|
-
|
69
|
-
source=v.
|
68
|
+
metadata=Metadata(
|
69
|
+
source=v.metadata.source,
|
70
70
|
id=id,
|
71
|
-
title=v.
|
71
|
+
title=v.metadata.title,
|
72
|
+
user=v.metadata.user,
|
73
|
+
collection=v.metadata.collection,
|
72
74
|
),
|
73
75
|
chunk=chunk.page_content.encode("utf-8"),
|
74
76
|
)
|
@@ -8,7 +8,7 @@ import tempfile
|
|
8
8
|
import base64
|
9
9
|
from langchain_community.document_loaders import PyPDFLoader
|
10
10
|
|
11
|
-
from ... schema import Document, TextDocument,
|
11
|
+
from ... schema import Document, TextDocument, Metadata
|
12
12
|
from ... schema import document_ingest_queue, text_ingest_queue
|
13
13
|
from ... log_level import LogLevel
|
14
14
|
from ... base import ConsumerProducer
|
@@ -45,7 +45,7 @@ class Processor(ConsumerProducer):
|
|
45
45
|
|
46
46
|
v = msg.value()
|
47
47
|
|
48
|
-
print(f"Decoding {v.
|
48
|
+
print(f"Decoding {v.metadata.id}...", flush=True)
|
49
49
|
|
50
50
|
with tempfile.NamedTemporaryFile(delete_on_close=False) as fp:
|
51
51
|
|
@@ -59,12 +59,14 @@ class Processor(ConsumerProducer):
|
|
59
59
|
|
60
60
|
for ix, page in enumerate(pages):
|
61
61
|
|
62
|
-
id = v.
|
62
|
+
id = v.metadata.id + "-p" + str(ix)
|
63
63
|
r = TextDocument(
|
64
|
-
|
65
|
-
source=v.
|
66
|
-
title=v.
|
64
|
+
metadata=Metadata(
|
65
|
+
source=v.metadata.source,
|
66
|
+
title=v.metadata.title,
|
67
67
|
id=id,
|
68
|
+
user=v.metadata.user,
|
69
|
+
collection=v.metadata.collection,
|
68
70
|
),
|
69
71
|
text=page.page_content.encode("utf-8"),
|
70
72
|
)
|
@@ -4,10 +4,16 @@ from cassandra.auth import PlainTextAuthProvider
|
|
4
4
|
|
5
5
|
class TrustGraph:
|
6
6
|
|
7
|
-
def __init__(
|
7
|
+
def __init__(
|
8
|
+
self, hosts=None,
|
9
|
+
keyspace="trustgraph", table="default",
|
10
|
+
):
|
8
11
|
|
9
12
|
if hosts is None:
|
10
13
|
hosts = ["localhost"]
|
14
|
+
|
15
|
+
self.keyspace = keyspace
|
16
|
+
self.table = table
|
11
17
|
|
12
18
|
self.cluster = Cluster(hosts)
|
13
19
|
self.session = self.cluster.connect()
|
@@ -16,26 +22,26 @@ class TrustGraph:
|
|
16
22
|
|
17
23
|
def clear(self):
|
18
24
|
|
19
|
-
self.session.execute("""
|
20
|
-
drop keyspace if exists
|
25
|
+
self.session.execute(f"""
|
26
|
+
drop keyspace if exists {self.keyspace};
|
21
27
|
""");
|
22
28
|
|
23
29
|
self.init()
|
24
30
|
|
25
31
|
def init(self):
|
26
32
|
|
27
|
-
self.session.execute("""
|
28
|
-
create keyspace if not exists
|
29
|
-
with replication = {
|
33
|
+
self.session.execute(f"""
|
34
|
+
create keyspace if not exists {self.keyspace}
|
35
|
+
with replication = {{
|
30
36
|
'class' : 'SimpleStrategy',
|
31
37
|
'replication_factor' : 1
|
32
|
-
};
|
38
|
+
}};
|
33
39
|
""");
|
34
40
|
|
35
|
-
self.session.set_keyspace(
|
41
|
+
self.session.set_keyspace(self.keyspace)
|
36
42
|
|
37
|
-
self.session.execute("""
|
38
|
-
create table if not exists
|
43
|
+
self.session.execute(f"""
|
44
|
+
create table if not exists {self.table} (
|
39
45
|
s text,
|
40
46
|
p text,
|
41
47
|
o text,
|
@@ -43,66 +49,66 @@ class TrustGraph:
|
|
43
49
|
);
|
44
50
|
""");
|
45
51
|
|
46
|
-
self.session.execute("""
|
47
|
-
create index if not exists
|
48
|
-
ON
|
52
|
+
self.session.execute(f"""
|
53
|
+
create index if not exists {self.table}_p
|
54
|
+
ON {self.table} (p);
|
49
55
|
""");
|
50
56
|
|
51
|
-
self.session.execute("""
|
52
|
-
create index if not exists
|
53
|
-
ON
|
57
|
+
self.session.execute(f"""
|
58
|
+
create index if not exists {self.table}_o
|
59
|
+
ON {self.table} (o);
|
54
60
|
""");
|
55
61
|
|
56
62
|
def insert(self, s, p, o):
|
57
63
|
|
58
64
|
self.session.execute(
|
59
|
-
"insert into
|
65
|
+
f"insert into {self.table} (s, p, o) values (%s, %s, %s)",
|
60
66
|
(s, p, o)
|
61
67
|
)
|
62
68
|
|
63
69
|
def get_all(self, limit=50):
|
64
70
|
return self.session.execute(
|
65
|
-
f"select s, p, o from
|
71
|
+
f"select s, p, o from {self.table} limit {limit}"
|
66
72
|
)
|
67
73
|
|
68
74
|
def get_s(self, s, limit=10):
|
69
75
|
return self.session.execute(
|
70
|
-
f"select p, o from
|
76
|
+
f"select p, o from {self.table} where s = %s limit {limit}",
|
71
77
|
(s,)
|
72
78
|
)
|
73
79
|
|
74
80
|
def get_p(self, p, limit=10):
|
75
81
|
return self.session.execute(
|
76
|
-
f"select s, o from
|
82
|
+
f"select s, o from {self.table} where p = %s limit {limit}",
|
77
83
|
(p,)
|
78
84
|
)
|
79
85
|
|
80
86
|
def get_o(self, o, limit=10):
|
81
87
|
return self.session.execute(
|
82
|
-
f"select s, p from
|
88
|
+
f"select s, p from {self.table} where o = %s limit {limit}",
|
83
89
|
(o,)
|
84
90
|
)
|
85
91
|
|
86
92
|
def get_sp(self, s, p, limit=10):
|
87
93
|
return self.session.execute(
|
88
|
-
f"select o from
|
94
|
+
f"select o from {self.table} where s = %s and p = %s limit {limit}",
|
89
95
|
(s, p)
|
90
96
|
)
|
91
97
|
|
92
98
|
def get_po(self, p, o, limit=10):
|
93
99
|
return self.session.execute(
|
94
|
-
f"select s from
|
100
|
+
f"select s from {self.table} where p = %s and o = %s allow filtering limit {limit}",
|
95
101
|
(p, o)
|
96
102
|
)
|
97
103
|
|
98
104
|
def get_os(self, o, s, limit=10):
|
99
105
|
return self.session.execute(
|
100
|
-
f"select p from
|
106
|
+
f"select p from {self.table} where o = %s and s = %s limit {limit}",
|
101
107
|
(o, s)
|
102
108
|
)
|
103
109
|
|
104
110
|
def get_spo(self, s, p, o, limit=10):
|
105
111
|
return self.session.execute(
|
106
|
-
f"""select s as x from
|
112
|
+
f"""select s as x from {self.table} where s = %s and p = %s and o = %s limit {limit}""",
|
107
113
|
(s, p, o)
|
108
114
|
)
|
{trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/embeddings/vectorize/vectorize.py
RENAMED
@@ -50,15 +50,15 @@ class Processor(ConsumerProducer):
|
|
50
50
|
subscriber=module + "-emb",
|
51
51
|
)
|
52
52
|
|
53
|
-
def emit(self,
|
53
|
+
def emit(self, metadata, chunk, vectors):
|
54
54
|
|
55
|
-
r = ChunkEmbeddings(
|
55
|
+
r = ChunkEmbeddings(metadata=metadata, chunk=chunk, vectors=vectors)
|
56
56
|
self.producer.send(r)
|
57
57
|
|
58
58
|
def handle(self, msg):
|
59
59
|
|
60
60
|
v = msg.value()
|
61
|
-
print(f"Indexing {v.
|
61
|
+
print(f"Indexing {v.metadata.id}...", flush=True)
|
62
62
|
|
63
63
|
chunk = v.chunk.decode("utf-8")
|
64
64
|
|
@@ -67,7 +67,7 @@ class Processor(ConsumerProducer):
|
|
67
67
|
vectors = self.embeddings.request(chunk)
|
68
68
|
|
69
69
|
self.emit(
|
70
|
-
|
70
|
+
metadata=v.metadata,
|
71
71
|
chunk=chunk.encode("utf-8"),
|
72
72
|
vectors=vectors
|
73
73
|
)
|
{trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/definitions/extract.py
RENAMED
@@ -7,7 +7,7 @@ get entity definitions which are output as graph edges.
|
|
7
7
|
import urllib.parse
|
8
8
|
import json
|
9
9
|
|
10
|
-
from .... schema import ChunkEmbeddings, Triple,
|
10
|
+
from .... schema import ChunkEmbeddings, Triple, Metadata, Value
|
11
11
|
from .... schema import chunk_embeddings_ingest_queue, triples_store_queue
|
12
12
|
from .... schema import prompt_request_queue
|
13
13
|
from .... schema import prompt_response_queue
|
@@ -69,15 +69,15 @@ class Processor(ConsumerProducer):
|
|
69
69
|
|
70
70
|
return self.prompt.request_definitions(chunk)
|
71
71
|
|
72
|
-
def emit_edge(self, s, p, o):
|
72
|
+
def emit_edge(self, metadata, s, p, o):
|
73
73
|
|
74
|
-
t = Triple(s=s, p=p, o=o)
|
74
|
+
t = Triple(metadata=metadata, s=s, p=p, o=o)
|
75
75
|
self.producer.send(t)
|
76
76
|
|
77
77
|
def handle(self, msg):
|
78
78
|
|
79
79
|
v = msg.value()
|
80
|
-
print(f"Indexing {v.
|
80
|
+
print(f"Indexing {v.metadata.id}...", flush=True)
|
81
81
|
|
82
82
|
chunk = v.chunk.decode("utf-8")
|
83
83
|
|
@@ -101,7 +101,7 @@ class Processor(ConsumerProducer):
|
|
101
101
|
s_value = Value(value=str(s_uri), is_uri=True)
|
102
102
|
o_value = Value(value=str(o), is_uri=False)
|
103
103
|
|
104
|
-
self.emit_edge(s_value, DEFINITION_VALUE, o_value)
|
104
|
+
self.emit_edge(v.metadata, s_value, DEFINITION_VALUE, o_value)
|
105
105
|
|
106
106
|
except Exception as e:
|
107
107
|
print("Exception: ", e, flush=True)
|
{trustgraph-flow-0.11.19 → trustgraph-flow-0.12.1}/trustgraph/extract/kg/relationships/extract.py
RENAMED
@@ -9,7 +9,8 @@ import urllib.parse
|
|
9
9
|
import os
|
10
10
|
from pulsar.schema import JsonSchema
|
11
11
|
|
12
|
-
from .... schema import ChunkEmbeddings, Triple, GraphEmbeddings
|
12
|
+
from .... schema import ChunkEmbeddings, Triple, GraphEmbeddings
|
13
|
+
from .... schema import Metadata, Value
|
13
14
|
from .... schema import chunk_embeddings_ingest_queue, triples_store_queue
|
14
15
|
from .... schema import graph_embeddings_store_queue
|
15
16
|
from .... schema import prompt_request_queue
|
@@ -91,20 +92,20 @@ class Processor(ConsumerProducer):
|
|
91
92
|
|
92
93
|
return self.prompt.request_relationships(chunk)
|
93
94
|
|
94
|
-
def emit_edge(self, s, p, o):
|
95
|
+
def emit_edge(self, metadata, s, p, o):
|
95
96
|
|
96
|
-
t = Triple(s=s, p=p, o=o)
|
97
|
+
t = Triple(metadata=metadata, s=s, p=p, o=o)
|
97
98
|
self.producer.send(t)
|
98
99
|
|
99
|
-
def emit_vec(self, ent, vec):
|
100
|
+
def emit_vec(self, metadata, ent, vec):
|
100
101
|
|
101
|
-
r = GraphEmbeddings(entity=ent, vectors=vec)
|
102
|
+
r = GraphEmbeddings(metadata=metadata, entity=ent, vectors=vec)
|
102
103
|
self.vec_prod.send(r)
|
103
104
|
|
104
105
|
def handle(self, msg):
|
105
106
|
|
106
107
|
v = msg.value()
|
107
|
-
print(f"Indexing {v.
|
108
|
+
print(f"Indexing {v.metadata.id}...", flush=True)
|
108
109
|
|
109
110
|
chunk = v.chunk.decode("utf-8")
|
110
111
|
|
@@ -139,6 +140,7 @@ class Processor(ConsumerProducer):
|
|
139
140
|
o_value = Value(value=str(o), is_uri=False)
|
140
141
|
|
141
142
|
self.emit_edge(
|
143
|
+
v.metadata,
|
142
144
|
s_value,
|
143
145
|
p_value,
|
144
146
|
o_value
|
@@ -146,6 +148,7 @@ class Processor(ConsumerProducer):
|
|
146
148
|
|
147
149
|
# Label for s
|
148
150
|
self.emit_edge(
|
151
|
+
v.metadata,
|
149
152
|
s_value,
|
150
153
|
RDF_LABEL_VALUE,
|
151
154
|
Value(value=str(s), is_uri=False)
|
@@ -153,6 +156,7 @@ class Processor(ConsumerProducer):
|
|
153
156
|
|
154
157
|
# Label for p
|
155
158
|
self.emit_edge(
|
159
|
+
v.metadata,
|
156
160
|
p_value,
|
157
161
|
RDF_LABEL_VALUE,
|
158
162
|
Value(value=str(p), is_uri=False)
|
@@ -161,15 +165,16 @@ class Processor(ConsumerProducer):
|
|
161
165
|
if rel.o_entity:
|
162
166
|
# Label for o
|
163
167
|
self.emit_edge(
|
168
|
+
v.metadata,
|
164
169
|
o_value,
|
165
170
|
RDF_LABEL_VALUE,
|
166
171
|
Value(value=str(o), is_uri=False)
|
167
172
|
)
|
168
173
|
|
169
|
-
self.emit_vec(s_value, v.vectors)
|
170
|
-
self.emit_vec(p_value, v.vectors)
|
174
|
+
self.emit_vec(v.metadata, s_value, v.vectors)
|
175
|
+
self.emit_vec(v.metadata, p_value, v.vectors)
|
171
176
|
if rel.o_entity:
|
172
|
-
self.emit_vec(o_value, v.vectors)
|
177
|
+
self.emit_vec(v.metadata, o_value, v.vectors)
|
173
178
|
|
174
179
|
except Exception as e:
|
175
180
|
print("Exception: ", e, flush=True)
|
@@ -7,7 +7,7 @@ get entity definitions which are output as graph edges.
|
|
7
7
|
import urllib.parse
|
8
8
|
import json
|
9
9
|
|
10
|
-
from .... schema import ChunkEmbeddings, Triple,
|
10
|
+
from .... schema import ChunkEmbeddings, Triple, Metadata, Value
|
11
11
|
from .... schema import chunk_embeddings_ingest_queue, triples_store_queue
|
12
12
|
from .... schema import prompt_request_queue
|
13
13
|
from .... schema import prompt_response_queue
|
@@ -69,15 +69,15 @@ class Processor(ConsumerProducer):
|
|
69
69
|
|
70
70
|
return self.prompt.request_topics(chunk)
|
71
71
|
|
72
|
-
def emit_edge(self, s, p, o):
|
72
|
+
def emit_edge(self, metadata, s, p, o):
|
73
73
|
|
74
|
-
t = Triple(s=s, p=p, o=o)
|
74
|
+
t = Triple(metadata=metadata, s=s, p=p, o=o)
|
75
75
|
self.producer.send(t)
|
76
76
|
|
77
77
|
def handle(self, msg):
|
78
78
|
|
79
79
|
v = msg.value()
|
80
|
-
print(f"Indexing {v.
|
80
|
+
print(f"Indexing {v.metadata.id}...", flush=True)
|
81
81
|
|
82
82
|
chunk = v.chunk.decode("utf-8")
|
83
83
|
|
@@ -101,7 +101,7 @@ class Processor(ConsumerProducer):
|
|
101
101
|
s_value = Value(value=str(s_uri), is_uri=True)
|
102
102
|
o_value = Value(value=str(o), is_uri=False)
|
103
103
|
|
104
|
-
self.emit_edge(s_value, DEFINITION_VALUE, o_value)
|
104
|
+
self.emit_edge(v. metadata, s_value, DEFINITION_VALUE, o_value)
|
105
105
|
|
106
106
|
except Exception as e:
|
107
107
|
print("Exception: ", e, flush=True)
|
@@ -8,7 +8,7 @@ import urllib.parse
|
|
8
8
|
import os
|
9
9
|
from pulsar.schema import JsonSchema
|
10
10
|
|
11
|
-
from .... schema import ChunkEmbeddings, Rows, ObjectEmbeddings,
|
11
|
+
from .... schema import ChunkEmbeddings, Rows, ObjectEmbeddings, Metadata
|
12
12
|
from .... schema import RowSchema, Field
|
13
13
|
from .... schema import chunk_embeddings_ingest_queue, rows_store_queue
|
14
14
|
from .... schema import object_embeddings_store_queue
|
@@ -124,24 +124,24 @@ class Processor(ConsumerProducer):
|
|
124
124
|
def get_rows(self, chunk):
|
125
125
|
return self.prompt.request_rows(self.schema, chunk)
|
126
126
|
|
127
|
-
def emit_rows(self,
|
127
|
+
def emit_rows(self, metadata, rows):
|
128
128
|
|
129
129
|
t = Rows(
|
130
|
-
|
130
|
+
metadata=metadata, row_schema=self.row_schema, rows=rows
|
131
131
|
)
|
132
132
|
self.producer.send(t)
|
133
133
|
|
134
|
-
def emit_vec(self,
|
134
|
+
def emit_vec(self, metadata, name, vec, key_name, key):
|
135
135
|
|
136
136
|
r = ObjectEmbeddings(
|
137
|
-
|
137
|
+
metadata=metadata, vectors=vec, name=name, key_name=key_name, id=key
|
138
138
|
)
|
139
139
|
self.vec_prod.send(r)
|
140
140
|
|
141
141
|
def handle(self, msg):
|
142
142
|
|
143
143
|
v = msg.value()
|
144
|
-
print(f"Indexing {v.
|
144
|
+
print(f"Indexing {v.metadata.id}...", flush=True)
|
145
145
|
|
146
146
|
chunk = v.chunk.decode("utf-8")
|
147
147
|
|
@@ -150,13 +150,13 @@ class Processor(ConsumerProducer):
|
|
150
150
|
rows = self.get_rows(chunk)
|
151
151
|
|
152
152
|
self.emit_rows(
|
153
|
-
|
153
|
+
metadata=v.metadata,
|
154
154
|
rows=rows
|
155
155
|
)
|
156
156
|
|
157
157
|
for row in rows:
|
158
158
|
self.emit_vec(
|
159
|
-
|
159
|
+
metadata=v.metadata, vec=v.vectors,
|
160
160
|
name=self.schema.name, key_name=self.primary.name,
|
161
161
|
key=row[self.primary.name]
|
162
162
|
)
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.12.1"
|