trustgraph-flow 0.21.14__tar.gz → 0.21.16__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.21.14 → trustgraph-flow-0.21.16}/PKG-INFO +2 -2
- trustgraph-flow-0.21.16/scripts/pdf-ocr-mistral +6 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/setup.py +2 -0
- trustgraph-flow-0.21.16/trustgraph/decoding/mistral_ocr/processor.py +190 -0
- trustgraph-flow-0.21.16/trustgraph/embeddings/ollama/__init__.py +3 -0
- trustgraph-flow-0.21.16/trustgraph/embeddings/ollama/__main__.py +7 -0
- trustgraph-flow-0.21.16/trustgraph/flow_version.py +1 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph_flow.egg-info/SOURCES.txt +4 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph_flow.egg-info/requires.txt +1 -0
- trustgraph-flow-0.21.14/trustgraph/flow_version.py +0 -1
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/README.md +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/agent-manager-react +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/api-gateway +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/chunker-token +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/de-query-pinecone +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/de-write-pinecone +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/document-embeddings +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/document-rag +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/embeddings-fastembed +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/ge-query-pinecone +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/ge-write-pinecone +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/graph-embeddings +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/graph-rag +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/librarian +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/metering +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/object-extract-row +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/prompt-generic +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/prompt-template +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/run-processing +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-azure-openai +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-googleaistudio +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-lmstudio +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-mistral +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-query-falkordb +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-query-memgraph +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-write-falkordb +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-write-memgraph +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/scripts/wikipedia-lookup +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/setup.cfg +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/agent/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/agent/react/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/agent/react/types.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-0.21.14/trustgraph/embeddings/fastembed → trustgraph-flow-0.21.16/trustgraph/decoding/mistral_ocr}/__init__.py +0 -0
- {trustgraph-flow-0.21.14/trustgraph/embeddings/fastembed → trustgraph-flow-0.21.16/trustgraph/decoding/mistral_ocr}/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/document_rag.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.21.14/trustgraph/embeddings/ollama → trustgraph-flow-0.21.16/trustgraph/embeddings/fastembed}/__init__.py +0 -0
- {trustgraph-flow-0.21.14/trustgraph/embeddings/ollama → trustgraph-flow-0.21.16/trustgraph/embeddings/fastembed}/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/external/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/object/row/extract.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/agent.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/auth.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/dbpedia.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/document_embeddings_load.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/document_embeddings_stream.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/document_load.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/document_rag.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/embeddings.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/encyclopedia.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/endpoint.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/graph_embeddings_load.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/graph_embeddings_query.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/graph_embeddings_stream.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/graph_rag.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/internet_search.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/librarian.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/metrics.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/mux.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/prompt.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/requestor.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/running.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/sender.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/serialize.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/socket.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/text_completion.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/text_load.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/triples_load.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/triples_query.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/triples_stream.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/graph_rag.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/librarian/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/librarian/table_store.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/metering/pricelist.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/template/prompt_manager.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.21.
|
3
|
+
Version: 0.21.16
|
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.21.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.21.16.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -59,6 +59,7 @@ setuptools.setup(
|
|
59
59
|
"pulsar-client",
|
60
60
|
"pymilvus",
|
61
61
|
"pypdf",
|
62
|
+
"mistralai",
|
62
63
|
"pyyaml",
|
63
64
|
"qdrant-client",
|
64
65
|
"rdflib",
|
@@ -98,6 +99,7 @@ setuptools.setup(
|
|
98
99
|
"scripts/object-extract-row",
|
99
100
|
"scripts/oe-write-milvus",
|
100
101
|
"scripts/pdf-decoder",
|
102
|
+
"scripts/pdf-ocr-mistral",
|
101
103
|
"scripts/prompt-generic",
|
102
104
|
"scripts/prompt-template",
|
103
105
|
"scripts/rows-write-cassandra",
|
@@ -0,0 +1,190 @@
|
|
1
|
+
|
2
|
+
"""
|
3
|
+
Simple decoder, accepts PDF documents on input, outputs pages from the
|
4
|
+
PDF document as text as separate output objects.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from pypdf import PdfWriter, PdfReader
|
8
|
+
from io import BytesIO
|
9
|
+
import base64
|
10
|
+
import uuid
|
11
|
+
import os
|
12
|
+
|
13
|
+
from mistralai import Mistral
|
14
|
+
from mistralai import DocumentURLChunk, ImageURLChunk, TextChunk
|
15
|
+
from mistralai.models import OCRResponse
|
16
|
+
|
17
|
+
from ... schema import Document, TextDocument, Metadata
|
18
|
+
from ... schema import document_ingest_queue, text_ingest_queue
|
19
|
+
from ... log_level import LogLevel
|
20
|
+
from ... base import ConsumerProducer
|
21
|
+
|
22
|
+
module = ".".join(__name__.split(".")[1:-1])
|
23
|
+
|
24
|
+
default_input_queue = document_ingest_queue
|
25
|
+
default_output_queue = text_ingest_queue
|
26
|
+
default_subscriber = module
|
27
|
+
default_api_key = os.getenv("MISTRAL_TOKEN")
|
28
|
+
|
29
|
+
pages_per_chunk = 5
|
30
|
+
|
31
|
+
def chunks(lst, n):
|
32
|
+
"Yield successive n-sized chunks from lst."
|
33
|
+
for i in range(0, len(lst), n):
|
34
|
+
yield lst[i:i + n]
|
35
|
+
|
36
|
+
def replace_images_in_markdown(markdown_str: str, images_dict: dict) -> str:
|
37
|
+
"""
|
38
|
+
Replace image placeholders in markdown with base64-encoded images.
|
39
|
+
|
40
|
+
Args:
|
41
|
+
markdown_str: Markdown text containing image placeholders
|
42
|
+
images_dict: Dictionary mapping image IDs to base64 strings
|
43
|
+
|
44
|
+
Returns:
|
45
|
+
Markdown text with images replaced by base64 data
|
46
|
+
"""
|
47
|
+
for img_name, base64_str in images_dict.items():
|
48
|
+
markdown_str = markdown_str.replace(
|
49
|
+
f"", f""
|
50
|
+
)
|
51
|
+
return markdown_str
|
52
|
+
|
53
|
+
def get_combined_markdown(ocr_response: OCRResponse) -> str:
|
54
|
+
"""
|
55
|
+
Combine OCR text and images into a single markdown document.
|
56
|
+
|
57
|
+
Args:
|
58
|
+
ocr_response: Response from OCR processing containing text and images
|
59
|
+
|
60
|
+
Returns:
|
61
|
+
Combined markdown string with embedded images
|
62
|
+
"""
|
63
|
+
markdowns: list[str] = []
|
64
|
+
# Extract images from page
|
65
|
+
for page in ocr_response.pages:
|
66
|
+
image_data = {}
|
67
|
+
for img in page.images:
|
68
|
+
image_data[img.id] = img.image_base64
|
69
|
+
# Replace image placeholders with actual images
|
70
|
+
markdowns.append(replace_images_in_markdown(page.markdown, image_data))
|
71
|
+
|
72
|
+
return "\n\n".join(markdowns)
|
73
|
+
|
74
|
+
class Processor(ConsumerProducer):
|
75
|
+
|
76
|
+
def __init__(self, **params):
|
77
|
+
|
78
|
+
input_queue = params.get("input_queue", default_input_queue)
|
79
|
+
output_queue = params.get("output_queue", default_output_queue)
|
80
|
+
subscriber = params.get("subscriber", default_subscriber)
|
81
|
+
api_key = params.get("api_key", default_api_key)
|
82
|
+
|
83
|
+
super(Processor, self).__init__(
|
84
|
+
**params | {
|
85
|
+
"input_queue": input_queue,
|
86
|
+
"output_queue": output_queue,
|
87
|
+
"subscriber": subscriber,
|
88
|
+
"input_schema": Document,
|
89
|
+
"output_schema": TextDocument,
|
90
|
+
}
|
91
|
+
)
|
92
|
+
|
93
|
+
if api_key is None:
|
94
|
+
raise RuntimeError("Mistral API key not specified")
|
95
|
+
|
96
|
+
self.mistral = Mistral(api_key=api_key)
|
97
|
+
|
98
|
+
# Used with Mistral doc upload
|
99
|
+
self.unique_id = str(uuid.uuid4())
|
100
|
+
|
101
|
+
print("PDF inited")
|
102
|
+
|
103
|
+
def ocr(self, blob):
|
104
|
+
|
105
|
+
print("Parse PDF...", flush=True)
|
106
|
+
|
107
|
+
pdfbuf = BytesIO(blob)
|
108
|
+
pdf = PdfReader(pdfbuf)
|
109
|
+
|
110
|
+
for chunk in chunks(pdf.pages, pages_per_chunk):
|
111
|
+
|
112
|
+
print("Get next pages...", flush=True)
|
113
|
+
|
114
|
+
part = PdfWriter()
|
115
|
+
for page in chunk:
|
116
|
+
part.add_page(page)
|
117
|
+
|
118
|
+
buf = BytesIO()
|
119
|
+
part.write_stream(buf)
|
120
|
+
|
121
|
+
print("Upload chunk...", flush=True)
|
122
|
+
|
123
|
+
uploaded_file = self.mistral.files.upload(
|
124
|
+
file={
|
125
|
+
"file_name": self.unique_id,
|
126
|
+
"content": buf.getvalue(),
|
127
|
+
},
|
128
|
+
purpose="ocr",
|
129
|
+
)
|
130
|
+
|
131
|
+
signed_url = self.mistral.files.get_signed_url(
|
132
|
+
file_id=uploaded_file.id, expiry=1
|
133
|
+
)
|
134
|
+
|
135
|
+
print("OCR...", flush=True)
|
136
|
+
|
137
|
+
processed = self.mistral.ocr.process(
|
138
|
+
model="mistral-ocr-latest",
|
139
|
+
include_image_base64=True,
|
140
|
+
document={
|
141
|
+
"type": "document_url",
|
142
|
+
"document_url": signed_url.url,
|
143
|
+
}
|
144
|
+
)
|
145
|
+
|
146
|
+
print("Extract markdown...", flush=True)
|
147
|
+
|
148
|
+
markdown = get_combined_markdown(processed)
|
149
|
+
|
150
|
+
print("OCR complete.", flush=True)
|
151
|
+
|
152
|
+
return markdown
|
153
|
+
|
154
|
+
async def handle(self, msg):
|
155
|
+
|
156
|
+
print("PDF message received")
|
157
|
+
|
158
|
+
v = msg.value()
|
159
|
+
|
160
|
+
print(f"Decoding {v.metadata.id}...", flush=True)
|
161
|
+
|
162
|
+
markdown = self.ocr(base64.b64decode(v.data))
|
163
|
+
|
164
|
+
r = TextDocument(
|
165
|
+
metadata=v.metadata,
|
166
|
+
text=markdown.encode("utf-8"),
|
167
|
+
)
|
168
|
+
|
169
|
+
await self.send(r)
|
170
|
+
|
171
|
+
print("Done.", flush=True)
|
172
|
+
|
173
|
+
@staticmethod
|
174
|
+
def add_args(parser):
|
175
|
+
|
176
|
+
ConsumerProducer.add_args(
|
177
|
+
parser, default_input_queue, default_subscriber,
|
178
|
+
default_output_queue,
|
179
|
+
)
|
180
|
+
|
181
|
+
parser.add_argument(
|
182
|
+
'-k', '--api-key',
|
183
|
+
default=default_api_key,
|
184
|
+
help=f'Mistral API Key'
|
185
|
+
)
|
186
|
+
|
187
|
+
def run():
|
188
|
+
|
189
|
+
Processor.launch(module, __doc__)
|
190
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.21.16"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.21.
|
3
|
+
Version: 0.21.16
|
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.21.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.21.16.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -30,6 +30,7 @@ scripts/metering
|
|
30
30
|
scripts/object-extract-row
|
31
31
|
scripts/oe-write-milvus
|
32
32
|
scripts/pdf-decoder
|
33
|
+
scripts/pdf-ocr-mistral
|
33
34
|
scripts/prompt-generic
|
34
35
|
scripts/prompt-template
|
35
36
|
scripts/rows-write-cassandra
|
@@ -72,6 +73,9 @@ trustgraph/chunking/token/__init__.py
|
|
72
73
|
trustgraph/chunking/token/__main__.py
|
73
74
|
trustgraph/chunking/token/chunker.py
|
74
75
|
trustgraph/decoding/__init__.py
|
76
|
+
trustgraph/decoding/mistral_ocr/__init__.py
|
77
|
+
trustgraph/decoding/mistral_ocr/__main__.py
|
78
|
+
trustgraph/decoding/mistral_ocr/processor.py
|
75
79
|
trustgraph/decoding/pdf/__init__.py
|
76
80
|
trustgraph/decoding/pdf/__main__.py
|
77
81
|
trustgraph/decoding/pdf/pdf_decoder.py
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.21.14"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/recursive/__init__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/recursive/__main__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/chunking/recursive/chunker.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
|
File without changes
|
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/milvus_doc_embeddings.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/milvus_graph_embeddings.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/direct/milvus_object_embeddings.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
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/fastembed/processor.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/embeddings/ollama/processor.py
RENAMED
File without changes
|
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/external/wikipedia/__init__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/external/wikipedia/__main__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/external/wikipedia/service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/definitions/__init__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/definitions/__main__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/definitions/extract.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/relationships/__init__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/relationships/__main__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/relationships/extract.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/topics/__init__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/kg/topics/__main__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/object/row/__init__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/object/row/__main__.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/extract/object/row/extract.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/document_embeddings_load.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/document_embeddings_stream.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/graph_embeddings_load.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/graph_embeddings_query.py
RENAMED
File without changes
|
{trustgraph-flow-0.21.14 → trustgraph-flow-0.21.16}/trustgraph/gateway/graph_embeddings_stream.py
RENAMED
File without changes
|
File without changes
|