trustgraph-flow 1.2.7__tar.gz → 1.2.9__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.2.7 → trustgraph_flow-1.2.9}/PKG-INFO +1 -1
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/pyproject.toml +2 -1
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/decoding/mistral_ocr/processor.py +1 -1
- trustgraph_flow-1.2.9/trustgraph/extract/kg/objects/__init__.py +3 -0
- trustgraph_flow-1.2.9/trustgraph/extract/kg/objects/__main__.py +7 -0
- trustgraph_flow-1.2.9/trustgraph/extract/kg/objects/processor.py +241 -0
- trustgraph_flow-1.2.9/trustgraph/flow_version.py +1 -0
- trustgraph_flow-1.2.9/trustgraph/storage/objects/__init__.py +1 -0
- trustgraph_flow-1.2.9/trustgraph/storage/objects/cassandra/__init__.py +1 -0
- trustgraph_flow-1.2.9/trustgraph/storage/objects/cassandra/__main__.py +3 -0
- trustgraph_flow-1.2.9/trustgraph/storage/objects/cassandra/write.py +411 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph_flow.egg-info/PKG-INFO +1 -1
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph_flow.egg-info/SOURCES.txt +7 -4
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph_flow.egg-info/entry_points.txt +2 -1
- trustgraph_flow-1.2.7/trustgraph/extract/object/row/__init__.py +0 -3
- trustgraph_flow-1.2.7/trustgraph/extract/object/row/__main__.py +0 -7
- trustgraph_flow-1.2.7/trustgraph/extract/object/row/extract.py +0 -225
- trustgraph_flow-1.2.7/trustgraph/flow_version.py +0 -1
- trustgraph_flow-1.2.7/trustgraph/tables/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/README.md +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/setup.cfg +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/mcp_tool/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/mcp_tool/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/mcp_tool/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/react/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/agent/react/types.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/config/service/config.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/config/service/flow.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/config/service/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/cores/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/cores/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/cores/knowledge.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/cores/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/direct/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/external/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/agent/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/agent/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/agent/extract.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/auth.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/config/receiver.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/agent.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/config.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/core_export.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/core_import.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/document_load.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/document_rag.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/embeddings.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/flow.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/knowledge.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/librarian.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/manager.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/mux.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/prompt.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/requestor.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/sender.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/serialize.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/streamer.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/text_completion.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/text_load.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/triples_export.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/triples_import.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/dispatch/triples_query.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/endpoint/manager.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/endpoint/metrics.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/endpoint/socket.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/running.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/unused/dbpedia.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/unused/encyclopedia.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/gateway/unused/internet_search.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/librarian/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/metering/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/metering/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/metering/counter.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/extract/object → trustgraph_flow-1.2.9/trustgraph/model}/__init__.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/model → trustgraph_flow-1.2.9/trustgraph/model/text_completion}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/tgi/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/model/text_completion/vllm/llm.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/processing/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/processing/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/processing/processing.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/model/text_completion → trustgraph_flow-1.2.9/trustgraph/prompt}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/prompt/template/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/prompt/template/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/prompt/template/service.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/prompt → trustgraph_flow-1.2.9/trustgraph/query}/__init__.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/query → trustgraph_flow-1.2.9/trustgraph/query/doc_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/query/doc_embeddings → trustgraph_flow-1.2.9/trustgraph/query/graph_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/query/graph_embeddings → trustgraph_flow-1.2.9/trustgraph/query/triples}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/query/triples → trustgraph_flow-1.2.9/trustgraph/retrieval}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/rev_gateway/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/rev_gateway/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/rev_gateway/dispatcher.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/rev_gateway/service.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/retrieval → trustgraph_flow-1.2.9/trustgraph/storage}/__init__.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/storage → trustgraph_flow-1.2.9/trustgraph/storage/doc_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/storage/doc_embeddings → trustgraph_flow-1.2.9/trustgraph/storage/graph_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/knowledge/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/knowledge/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/knowledge/store.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/storage/graph_embeddings → trustgraph_flow-1.2.9/trustgraph/storage/object_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/storage/object_embeddings → trustgraph_flow-1.2.9/trustgraph/storage/rows}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/storage/rows → trustgraph_flow-1.2.9/trustgraph/storage/triples}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph_flow-1.2.7/trustgraph/storage/triples → trustgraph_flow-1.2.9/trustgraph/tables}/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/tables/config.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/tables/knowledge.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/tables/library.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/template/__init__.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph/template/prompt_manager.py +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph_flow-1.2.7 → trustgraph_flow-1.2.9}/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.2.
|
3
|
+
Version: 1.2.9
|
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
|
@@ -78,6 +78,7 @@ graph-embeddings = "trustgraph.embeddings.graph_embeddings:run"
|
|
78
78
|
graph-rag = "trustgraph.retrieval.graph_rag:run"
|
79
79
|
kg-extract-agent = "trustgraph.extract.kg.agent:run"
|
80
80
|
kg-extract-definitions = "trustgraph.extract.kg.definitions:run"
|
81
|
+
kg-extract-objects = "trustgraph.extract.kg.objects:run"
|
81
82
|
kg-extract-relationships = "trustgraph.extract.kg.relationships:run"
|
82
83
|
kg-extract-topics = "trustgraph.extract.kg.topics:run"
|
83
84
|
kg-manager = "trustgraph.cores:run"
|
@@ -85,7 +86,7 @@ kg-store = "trustgraph.storage.knowledge:run"
|
|
85
86
|
librarian = "trustgraph.librarian:run"
|
86
87
|
mcp-tool = "trustgraph.agent.mcp_tool:run"
|
87
88
|
metering = "trustgraph.metering:run"
|
88
|
-
|
89
|
+
objects-write-cassandra = "trustgraph.storage.objects.cassandra:run"
|
89
90
|
oe-write-milvus = "trustgraph.storage.object_embeddings.milvus:run"
|
90
91
|
pdf-decoder = "trustgraph.decoding.pdf:run"
|
91
92
|
pdf-ocr-mistral = "trustgraph.decoding.mistral_ocr:run"
|
@@ -0,0 +1,241 @@
|
|
1
|
+
"""
|
2
|
+
Object extraction service - extracts structured objects from text chunks
|
3
|
+
based on configured schemas.
|
4
|
+
"""
|
5
|
+
|
6
|
+
import json
|
7
|
+
import logging
|
8
|
+
from typing import Dict, List, Any
|
9
|
+
|
10
|
+
# Module logger
|
11
|
+
logger = logging.getLogger(__name__)
|
12
|
+
|
13
|
+
from .... schema import Chunk, ExtractedObject, Metadata
|
14
|
+
from .... schema import PromptRequest, PromptResponse
|
15
|
+
from .... schema import RowSchema, Field
|
16
|
+
|
17
|
+
from .... base import FlowProcessor, ConsumerSpec, ProducerSpec
|
18
|
+
from .... base import PromptClientSpec
|
19
|
+
from .... messaging.translators import row_schema_translator
|
20
|
+
|
21
|
+
default_ident = "kg-extract-objects"
|
22
|
+
|
23
|
+
|
24
|
+
def convert_values_to_strings(obj: Dict[str, Any]) -> Dict[str, str]:
|
25
|
+
"""Convert all values in a dictionary to strings for Pulsar Map(String()) compatibility"""
|
26
|
+
result = {}
|
27
|
+
for key, value in obj.items():
|
28
|
+
if value is None:
|
29
|
+
result[key] = ""
|
30
|
+
elif isinstance(value, str):
|
31
|
+
result[key] = value
|
32
|
+
elif isinstance(value, (int, float, bool)):
|
33
|
+
result[key] = str(value)
|
34
|
+
elif isinstance(value, (list, dict)):
|
35
|
+
# For complex types, serialize as JSON
|
36
|
+
result[key] = json.dumps(value)
|
37
|
+
else:
|
38
|
+
# For any other type, convert to string
|
39
|
+
result[key] = str(value)
|
40
|
+
return result
|
41
|
+
default_concurrency = 1
|
42
|
+
|
43
|
+
class Processor(FlowProcessor):
|
44
|
+
|
45
|
+
def __init__(self, **params):
|
46
|
+
|
47
|
+
id = params.get("id")
|
48
|
+
concurrency = params.get("concurrency", 1)
|
49
|
+
|
50
|
+
# Config key for schemas
|
51
|
+
self.config_key = params.get("config_type", "schema")
|
52
|
+
|
53
|
+
super(Processor, self).__init__(
|
54
|
+
**params | {
|
55
|
+
"id": id,
|
56
|
+
"config-type": self.config_key,
|
57
|
+
"concurrency": concurrency,
|
58
|
+
}
|
59
|
+
)
|
60
|
+
|
61
|
+
self.register_specification(
|
62
|
+
ConsumerSpec(
|
63
|
+
name = "input",
|
64
|
+
schema = Chunk,
|
65
|
+
handler = self.on_chunk,
|
66
|
+
concurrency = concurrency,
|
67
|
+
)
|
68
|
+
)
|
69
|
+
|
70
|
+
self.register_specification(
|
71
|
+
PromptClientSpec(
|
72
|
+
request_name = "prompt-request",
|
73
|
+
response_name = "prompt-response",
|
74
|
+
)
|
75
|
+
)
|
76
|
+
|
77
|
+
self.register_specification(
|
78
|
+
ProducerSpec(
|
79
|
+
name = "output",
|
80
|
+
schema = ExtractedObject
|
81
|
+
)
|
82
|
+
)
|
83
|
+
|
84
|
+
# Register config handler for schema updates
|
85
|
+
self.register_config_handler(self.on_schema_config)
|
86
|
+
|
87
|
+
# Schema storage: name -> RowSchema
|
88
|
+
self.schemas: Dict[str, RowSchema] = {}
|
89
|
+
|
90
|
+
async def on_schema_config(self, config, version):
|
91
|
+
"""Handle schema configuration updates"""
|
92
|
+
|
93
|
+
logger.info(f"Loading schema configuration version {version}")
|
94
|
+
|
95
|
+
# Clear existing schemas
|
96
|
+
self.schemas = {}
|
97
|
+
|
98
|
+
# Check if our config type exists
|
99
|
+
if self.config_key not in config:
|
100
|
+
logger.warning(f"No '{self.config_key}' type in configuration")
|
101
|
+
return
|
102
|
+
|
103
|
+
# Get the schemas dictionary for our type
|
104
|
+
schemas_config = config[self.config_key]
|
105
|
+
|
106
|
+
# Process each schema in the schemas config
|
107
|
+
for schema_name, schema_json in schemas_config.items():
|
108
|
+
|
109
|
+
try:
|
110
|
+
# Parse the JSON schema definition
|
111
|
+
schema_def = json.loads(schema_json)
|
112
|
+
|
113
|
+
# Create Field objects
|
114
|
+
fields = []
|
115
|
+
for field_def in schema_def.get("fields", []):
|
116
|
+
field = Field(
|
117
|
+
name=field_def["name"],
|
118
|
+
type=field_def["type"],
|
119
|
+
size=field_def.get("size", 0),
|
120
|
+
primary=field_def.get("primary_key", False),
|
121
|
+
description=field_def.get("description", ""),
|
122
|
+
required=field_def.get("required", False),
|
123
|
+
enum_values=field_def.get("enum", []),
|
124
|
+
indexed=field_def.get("indexed", False)
|
125
|
+
)
|
126
|
+
fields.append(field)
|
127
|
+
|
128
|
+
# Create RowSchema
|
129
|
+
row_schema = RowSchema(
|
130
|
+
name=schema_def.get("name", schema_name),
|
131
|
+
description=schema_def.get("description", ""),
|
132
|
+
fields=fields
|
133
|
+
)
|
134
|
+
|
135
|
+
self.schemas[schema_name] = row_schema
|
136
|
+
logger.info(f"Loaded schema: {schema_name} with {len(fields)} fields")
|
137
|
+
|
138
|
+
except Exception as e:
|
139
|
+
logger.error(f"Failed to parse schema {schema_name}: {e}", exc_info=True)
|
140
|
+
|
141
|
+
logger.info(f"Schema configuration loaded: {len(self.schemas)} schemas")
|
142
|
+
|
143
|
+
async def extract_objects_for_schema(self, text: str, schema_name: str, schema: RowSchema, flow) -> List[Dict[str, Any]]:
|
144
|
+
"""Extract objects from text for a specific schema"""
|
145
|
+
|
146
|
+
try:
|
147
|
+
# Convert Pulsar RowSchema to JSON-serializable dict
|
148
|
+
schema_dict = row_schema_translator.from_pulsar(schema)
|
149
|
+
|
150
|
+
# Use prompt client to extract rows based on schema
|
151
|
+
objects = await flow("prompt-request").extract_objects(
|
152
|
+
schema=schema_dict,
|
153
|
+
text=text
|
154
|
+
)
|
155
|
+
|
156
|
+
return objects if isinstance(objects, list) else []
|
157
|
+
|
158
|
+
except Exception as e:
|
159
|
+
logger.error(f"Failed to extract objects for schema {schema_name}: {e}", exc_info=True)
|
160
|
+
return []
|
161
|
+
|
162
|
+
async def on_chunk(self, msg, consumer, flow):
|
163
|
+
"""Process incoming chunk and extract objects"""
|
164
|
+
|
165
|
+
v = msg.value()
|
166
|
+
logger.info(f"Extracting objects from chunk {v.metadata.id}...")
|
167
|
+
|
168
|
+
chunk_text = v.chunk.decode("utf-8")
|
169
|
+
|
170
|
+
# If no schemas configured, log warning and return
|
171
|
+
if not self.schemas:
|
172
|
+
logger.warning("No schemas configured - skipping extraction")
|
173
|
+
return
|
174
|
+
|
175
|
+
try:
|
176
|
+
# Extract objects for each configured schema
|
177
|
+
for schema_name, schema in self.schemas.items():
|
178
|
+
|
179
|
+
logger.debug(f"Extracting {schema_name} objects from chunk")
|
180
|
+
|
181
|
+
# Extract objects using prompt
|
182
|
+
objects = await self.extract_objects_for_schema(
|
183
|
+
chunk_text,
|
184
|
+
schema_name,
|
185
|
+
schema,
|
186
|
+
flow
|
187
|
+
)
|
188
|
+
|
189
|
+
# Emit each extracted object
|
190
|
+
for obj in objects:
|
191
|
+
|
192
|
+
# Calculate confidence (could be enhanced with actual confidence from prompt)
|
193
|
+
confidence = 0.8 # Default confidence
|
194
|
+
|
195
|
+
# Convert all values to strings for Pulsar compatibility
|
196
|
+
string_values = convert_values_to_strings(obj)
|
197
|
+
|
198
|
+
# Create ExtractedObject
|
199
|
+
extracted = ExtractedObject(
|
200
|
+
metadata=Metadata(
|
201
|
+
id=f"{v.metadata.id}:{schema_name}:{hash(str(obj))}",
|
202
|
+
metadata=[],
|
203
|
+
user=v.metadata.user,
|
204
|
+
collection=v.metadata.collection,
|
205
|
+
),
|
206
|
+
schema_name=schema_name,
|
207
|
+
values=string_values,
|
208
|
+
confidence=confidence,
|
209
|
+
source_span=chunk_text[:100] # First 100 chars as source reference
|
210
|
+
)
|
211
|
+
|
212
|
+
await flow("output").send(extracted)
|
213
|
+
logger.debug(f"Emitted extracted object for schema {schema_name}")
|
214
|
+
|
215
|
+
except Exception as e:
|
216
|
+
logger.error(f"Object extraction exception: {e}", exc_info=True)
|
217
|
+
|
218
|
+
logger.debug("Object extraction complete")
|
219
|
+
|
220
|
+
@staticmethod
|
221
|
+
def add_args(parser):
|
222
|
+
"""Add command-line arguments"""
|
223
|
+
|
224
|
+
parser.add_argument(
|
225
|
+
'-c', '--concurrency',
|
226
|
+
type=int,
|
227
|
+
default=default_concurrency,
|
228
|
+
help=f'Concurrent processing threads (default: {default_concurrency})'
|
229
|
+
)
|
230
|
+
|
231
|
+
parser.add_argument(
|
232
|
+
'--config-type',
|
233
|
+
default='schema',
|
234
|
+
help='Configuration type prefix for schemas (default: schema)'
|
235
|
+
)
|
236
|
+
|
237
|
+
FlowProcessor.add_args(parser)
|
238
|
+
|
239
|
+
def run():
|
240
|
+
"""Entry point for kg-extract-objects command"""
|
241
|
+
Processor.launch(default_ident, __doc__)
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "1.2.9"
|
@@ -0,0 +1 @@
|
|
1
|
+
# Objects storage module
|
@@ -0,0 +1 @@
|
|
1
|
+
from . write import *
|