trustgraph-flow 1.2.3__tar.gz → 1.2.5__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.3 → trustgraph_flow-1.2.5}/PKG-INFO +1 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/mcp_tool/service.py +8 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/react/agent_manager.py +7 -8
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/react/service.py +18 -18
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/react/tools.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/chunking/recursive/chunker.py +8 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/chunking/token/chunker.py +8 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/config/service/config.py +6 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/config/service/flow.py +6 -2
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/config/service/service.py +9 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/cores/knowledge.py +21 -17
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/cores/service.py +10 -6
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/decoding/mistral_ocr/processor.py +14 -10
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/decoding/pdf/pdf_decoder.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/direct/milvus_doc_embeddings.py +7 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/direct/milvus_graph_embeddings.py +7 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/direct/milvus_object_embeddings.py +7 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/document_embeddings/embeddings.py +7 -3
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/fastembed/processor.py +6 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/graph_embeddings/embeddings.py +7 -3
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/external/wikipedia/service.py +4 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/agent/extract.py +13 -9
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/definitions/extract.py +10 -6
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/relationships/extract.py +10 -6
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/topics/extract.py +7 -3
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/object/row/extract.py +9 -5
- trustgraph_flow-1.2.5/trustgraph/flow_version.py +1 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/config/receiver.py +11 -8
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/core_export.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/core_import.py +6 -2
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/document_embeddings_export.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/document_load.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/entity_contexts_export.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/graph_embeddings_export.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/manager.py +6 -2
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/mux.py +7 -3
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/requestor.py +1 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/text_load.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/triples_export.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/endpoint/constant_endpoint.py +1 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/endpoint/metrics.py +1 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/endpoint/socket.py +6 -6
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/endpoint/stream_endpoint.py +1 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/endpoint/variable_endpoint.py +1 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/service.py +3 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/librarian/blob_store.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/librarian/librarian.py +22 -18
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/librarian/service.py +14 -10
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/metering/counter.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/azure/llm.py +11 -7
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/azure_openai/llm.py +11 -7
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/claude/llm.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/cohere/llm.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/googleaistudio/llm.py +10 -7
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/llamafile/llm.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/lmstudio/llm.py +11 -7
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/mistral/llm.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/ollama/llm.py +7 -3
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/openai/llm.py +9 -5
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/tgi/llm.py +10 -7
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/vllm/llm.py +10 -7
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/processing/processing.py +17 -16
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/prompt/template/service.py +23 -19
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/milvus/service.py +6 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/pinecone/service.py +8 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/qdrant/service.py +6 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/milvus/service.py +7 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/pinecone/service.py +8 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/qdrant/service.py +7 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/cassandra/service.py +6 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/falkordb/service.py +6 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/memgraph/service.py +6 -3
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/neo4j/service.py +6 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/document_rag/document_rag.py +15 -11
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/document_rag/rag.py +8 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/graph_rag/graph_rag.py +19 -15
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/graph_rag/rag.py +8 -4
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/rev_gateway/service.py +7 -7
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/pinecone/write.py +6 -2
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/qdrant/write.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/pinecone/write.py +6 -2
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/qdrant/write.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/rows/cassandra/write.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/cassandra/write.py +5 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/falkordb/write.py +12 -8
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/memgraph/write.py +22 -18
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/neo4j/write.py +20 -16
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/tables/config.py +18 -29
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/tables/knowledge.py +26 -39
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/tables/library.py +38 -53
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/template/prompt_manager.py +7 -3
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph_flow.egg-info/PKG-INFO +1 -1
- trustgraph_flow-1.2.3/trustgraph/flow_version.py +0 -1
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/README.md +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/pyproject.toml +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/setup.cfg +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/mcp_tool/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/mcp_tool/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/agent/react/types.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/cores/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/cores/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/direct/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/external/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/agent/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/agent/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/auth.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/agent.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/config.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/document_rag.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/embeddings.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/flow.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/knowledge.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/librarian.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/prompt.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/sender.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/serialize.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/streamer.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/text_completion.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/triples_import.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/dispatch/triples_query.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/endpoint/manager.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/running.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/unused/dbpedia.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/unused/encyclopedia.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/gateway/unused/internet_search.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/metering/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/metering/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/processing/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/processing/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/prompt/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/prompt/template/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/prompt/template/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/rev_gateway/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/rev_gateway/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/rev_gateway/dispatcher.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/knowledge/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/knowledge/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/knowledge/store.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/tables/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph/template/__init__.py +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph_flow.egg-info/SOURCES.txt +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph_flow.egg-info/entry_points.txt +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/trustgraph_flow.egg-info/requires.txt +0 -0
- {trustgraph_flow-1.2.3 → trustgraph_flow-1.2.5}/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.5
|
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
|
@@ -5,11 +5,15 @@ name + parameters, output is the response, either a string or an object.
|
|
5
5
|
"""
|
6
6
|
|
7
7
|
import json
|
8
|
+
import logging
|
8
9
|
from mcp.client.streamable_http import streamablehttp_client
|
9
10
|
from mcp import ClientSession
|
10
11
|
|
11
12
|
from ... base import ToolService
|
12
13
|
|
14
|
+
# Module logger
|
15
|
+
logger = logging.getLogger(__name__)
|
16
|
+
|
13
17
|
default_ident = "mcp-tool"
|
14
18
|
|
15
19
|
class Service(ToolService):
|
@@ -26,7 +30,7 @@ class Service(ToolService):
|
|
26
30
|
|
27
31
|
async def on_mcp_config(self, config, version):
|
28
32
|
|
29
|
-
|
33
|
+
logger.info(f"Got config version {version}")
|
30
34
|
|
31
35
|
if "mcp" not in config: return
|
32
36
|
|
@@ -52,7 +56,7 @@ class Service(ToolService):
|
|
52
56
|
else:
|
53
57
|
remote_name = name
|
54
58
|
|
55
|
-
|
59
|
+
logger.info(f"Invoking {remote_name} at {url}")
|
56
60
|
|
57
61
|
# Connect to a streamable HTTP server
|
58
62
|
async with streamablehttp_client(url) as (
|
@@ -86,13 +90,13 @@ class Service(ToolService):
|
|
86
90
|
except BaseExceptionGroup as e:
|
87
91
|
|
88
92
|
for child in e.exceptions:
|
89
|
-
|
93
|
+
logger.debug(f"Child: {child}")
|
90
94
|
|
91
95
|
raise e.exceptions[0]
|
92
96
|
|
93
97
|
except Exception as e:
|
94
98
|
|
95
|
-
|
99
|
+
logger.error(f"Error invoking MCP tool: {e}", exc_info=True)
|
96
100
|
raise e
|
97
101
|
|
98
102
|
@staticmethod
|
@@ -164,18 +164,18 @@ class AgentManager:
|
|
164
164
|
|
165
165
|
async def reason(self, question, history, context):
|
166
166
|
|
167
|
-
|
167
|
+
logger.debug(f"calling reason: {question}")
|
168
168
|
|
169
169
|
tools = self.tools
|
170
170
|
|
171
|
-
|
172
|
-
|
171
|
+
logger.debug("in reason")
|
172
|
+
logger.debug(f"tools: {tools}")
|
173
173
|
|
174
174
|
tool_names = ",".join([
|
175
175
|
t for t in self.tools.keys()
|
176
176
|
])
|
177
177
|
|
178
|
-
|
178
|
+
logger.debug(f"Tool names: {tool_names}")
|
179
179
|
|
180
180
|
variables = {
|
181
181
|
"question": question,
|
@@ -208,14 +208,14 @@ class AgentManager:
|
|
208
208
|
]
|
209
209
|
}
|
210
210
|
|
211
|
-
|
211
|
+
logger.debug(f"Variables: {json.dumps(variables, indent=4)}")
|
212
212
|
|
213
213
|
logger.info(f"prompt: {variables}")
|
214
214
|
|
215
215
|
# Get text response from prompt service
|
216
216
|
response_text = await context("prompt-request").agent_react(variables)
|
217
217
|
|
218
|
-
|
218
|
+
logger.debug(f"Response text:\n{response_text}")
|
219
219
|
|
220
220
|
logger.info(f"response: {response_text}")
|
221
221
|
|
@@ -233,7 +233,6 @@ class AgentManager:
|
|
233
233
|
async def react(self, question, history, think, observe, context):
|
234
234
|
|
235
235
|
logger.info(f"question: {question}")
|
236
|
-
print(f"question: {question}", flush=True)
|
237
236
|
|
238
237
|
act = await self.reason(
|
239
238
|
question = question,
|
@@ -256,7 +255,7 @@ class AgentManager:
|
|
256
255
|
else:
|
257
256
|
raise RuntimeError(f"No action for {act.name}!")
|
258
257
|
|
259
|
-
|
258
|
+
logger.debug(f"TOOL>>> {act}")
|
260
259
|
|
261
260
|
resp = await action.implementation(context).invoke(
|
262
261
|
**act.arguments
|
@@ -8,7 +8,7 @@ import sys
|
|
8
8
|
import functools
|
9
9
|
import logging
|
10
10
|
|
11
|
-
|
11
|
+
# Module logger
|
12
12
|
logger = logging.getLogger(__name__)
|
13
13
|
|
14
14
|
from ... base import AgentService, TextCompletionClientSpec, PromptClientSpec
|
@@ -81,7 +81,7 @@ class Processor(AgentService):
|
|
81
81
|
|
82
82
|
async def on_tools_config(self, config, version):
|
83
83
|
|
84
|
-
|
84
|
+
logger.info(f"Loading configuration version {version}")
|
85
85
|
|
86
86
|
try:
|
87
87
|
|
@@ -151,13 +151,13 @@ class Processor(AgentService):
|
|
151
151
|
additional_context=additional
|
152
152
|
)
|
153
153
|
|
154
|
-
|
155
|
-
|
154
|
+
logger.info(f"Loaded {len(tools)} tools")
|
155
|
+
logger.info("Tool configuration reloaded.")
|
156
156
|
|
157
157
|
except Exception as e:
|
158
158
|
|
159
|
-
|
160
|
-
|
159
|
+
logger.error(f"on_tools_config Exception: {e}", exc_info=True)
|
160
|
+
logger.error("Configuration reload failed")
|
161
161
|
|
162
162
|
async def agent_request(self, request, respond, next, flow):
|
163
163
|
|
@@ -176,16 +176,16 @@ class Processor(AgentService):
|
|
176
176
|
else:
|
177
177
|
history = []
|
178
178
|
|
179
|
-
|
179
|
+
logger.info(f"Question: {request.question}")
|
180
180
|
|
181
181
|
if len(history) >= self.max_iterations:
|
182
182
|
raise RuntimeError("Too many agent iterations")
|
183
183
|
|
184
|
-
|
184
|
+
logger.debug(f"History: {history}")
|
185
185
|
|
186
186
|
async def think(x):
|
187
187
|
|
188
|
-
|
188
|
+
logger.debug(f"Think: {x}")
|
189
189
|
|
190
190
|
r = AgentResponse(
|
191
191
|
answer=None,
|
@@ -198,7 +198,7 @@ class Processor(AgentService):
|
|
198
198
|
|
199
199
|
async def observe(x):
|
200
200
|
|
201
|
-
|
201
|
+
logger.debug(f"Observe: {x}")
|
202
202
|
|
203
203
|
r = AgentResponse(
|
204
204
|
answer=None,
|
@@ -209,7 +209,7 @@ class Processor(AgentService):
|
|
209
209
|
|
210
210
|
await respond(r)
|
211
211
|
|
212
|
-
|
212
|
+
logger.debug("Call React")
|
213
213
|
|
214
214
|
act = await self.agent.react(
|
215
215
|
question = request.question,
|
@@ -219,11 +219,11 @@ class Processor(AgentService):
|
|
219
219
|
context = flow,
|
220
220
|
)
|
221
221
|
|
222
|
-
|
222
|
+
logger.debug(f"Action: {act}")
|
223
223
|
|
224
224
|
if isinstance(act, Final):
|
225
225
|
|
226
|
-
|
226
|
+
logger.debug("Send final response...")
|
227
227
|
|
228
228
|
if isinstance(act.final, str):
|
229
229
|
f = act.final
|
@@ -238,11 +238,11 @@ class Processor(AgentService):
|
|
238
238
|
|
239
239
|
await respond(r)
|
240
240
|
|
241
|
-
|
241
|
+
logger.debug("Done.")
|
242
242
|
|
243
243
|
return
|
244
244
|
|
245
|
-
|
245
|
+
logger.debug("Send next...")
|
246
246
|
|
247
247
|
history.append(act)
|
248
248
|
|
@@ -263,15 +263,15 @@ class Processor(AgentService):
|
|
263
263
|
|
264
264
|
await next(r)
|
265
265
|
|
266
|
-
|
266
|
+
logger.debug("React agent processing complete")
|
267
267
|
|
268
268
|
return
|
269
269
|
|
270
270
|
except Exception as e:
|
271
271
|
|
272
|
-
|
272
|
+
logger.error(f"agent_request Exception: {e}", exc_info=True)
|
273
273
|
|
274
|
-
|
274
|
+
logger.debug("Send error response...")
|
275
275
|
|
276
276
|
r = AgentResponse(
|
277
277
|
error=Error(
|
@@ -1,7 +1,11 @@
|
|
1
1
|
|
2
2
|
import json
|
3
|
+
import logging
|
3
4
|
from .types import Argument
|
4
5
|
|
6
|
+
# Module logger
|
7
|
+
logger = logging.getLogger(__name__)
|
8
|
+
|
5
9
|
# This tool implementation knows how to put a question to the graph RAG
|
6
10
|
# service
|
7
11
|
class KnowledgeQueryImpl:
|
@@ -21,7 +25,7 @@ class KnowledgeQueryImpl:
|
|
21
25
|
|
22
26
|
async def invoke(self, **arguments):
|
23
27
|
client = self.context("graph-rag-request")
|
24
|
-
|
28
|
+
logger.debug("Graph RAG question...")
|
25
29
|
return await client.rag(
|
26
30
|
arguments.get("question")
|
27
31
|
)
|
@@ -44,7 +48,7 @@ class TextCompletionImpl:
|
|
44
48
|
|
45
49
|
async def invoke(self, **arguments):
|
46
50
|
client = self.context("prompt-request")
|
47
|
-
|
51
|
+
logger.debug("Prompt question...")
|
48
52
|
return await client.question(
|
49
53
|
arguments.get("question")
|
50
54
|
)
|
@@ -67,13 +71,13 @@ class McpToolImpl:
|
|
67
71
|
|
68
72
|
client = self.context("mcp-tool-request")
|
69
73
|
|
70
|
-
|
74
|
+
logger.debug(f"MCP tool invocation: {self.mcp_tool_id}...")
|
71
75
|
output = await client.invoke(
|
72
76
|
name = self.mcp_tool_id,
|
73
77
|
parameters = arguments, # Pass the actual arguments
|
74
78
|
)
|
75
79
|
|
76
|
-
|
80
|
+
logger.debug(f"MCP tool output: {output}")
|
77
81
|
|
78
82
|
if isinstance(output, str):
|
79
83
|
return output
|
@@ -94,7 +98,7 @@ class PromptImpl:
|
|
94
98
|
|
95
99
|
async def invoke(self, **arguments):
|
96
100
|
client = self.context("prompt-request")
|
97
|
-
|
101
|
+
logger.debug(f"Prompt template invocation: {self.template_id}...")
|
98
102
|
return await client.prompt(
|
99
103
|
id=self.template_id,
|
100
104
|
variables=arguments
|
@@ -4,12 +4,16 @@ Simple decoder, accepts text documents on input, outputs chunks from the
|
|
4
4
|
as text as separate output objects.
|
5
5
|
"""
|
6
6
|
|
7
|
+
import logging
|
7
8
|
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
8
9
|
from prometheus_client import Histogram
|
9
10
|
|
10
11
|
from ... schema import TextDocument, Chunk
|
11
12
|
from ... base import FlowProcessor, ConsumerSpec, ProducerSpec
|
12
13
|
|
14
|
+
# Module logger
|
15
|
+
logger = logging.getLogger(__name__)
|
16
|
+
|
13
17
|
default_ident = "chunker"
|
14
18
|
|
15
19
|
class Processor(FlowProcessor):
|
@@ -54,12 +58,12 @@ class Processor(FlowProcessor):
|
|
54
58
|
)
|
55
59
|
)
|
56
60
|
|
57
|
-
|
61
|
+
logger.info("Recursive chunker initialized")
|
58
62
|
|
59
63
|
async def on_message(self, msg, consumer, flow):
|
60
64
|
|
61
65
|
v = msg.value()
|
62
|
-
|
66
|
+
logger.info(f"Chunking document {v.metadata.id}...")
|
63
67
|
|
64
68
|
texts = self.text_splitter.create_documents(
|
65
69
|
[v.text.decode("utf-8")]
|
@@ -67,7 +71,7 @@ class Processor(FlowProcessor):
|
|
67
71
|
|
68
72
|
for ix, chunk in enumerate(texts):
|
69
73
|
|
70
|
-
|
74
|
+
logger.debug(f"Created chunk of size {len(chunk.page_content)}")
|
71
75
|
|
72
76
|
r = Chunk(
|
73
77
|
metadata=v.metadata,
|
@@ -80,7 +84,7 @@ class Processor(FlowProcessor):
|
|
80
84
|
|
81
85
|
await flow("output").send(r)
|
82
86
|
|
83
|
-
|
87
|
+
logger.debug("Document chunking complete")
|
84
88
|
|
85
89
|
@staticmethod
|
86
90
|
def add_args(parser):
|
@@ -4,12 +4,16 @@ Simple decoder, accepts text documents on input, outputs chunks from the
|
|
4
4
|
as text as separate output objects.
|
5
5
|
"""
|
6
6
|
|
7
|
+
import logging
|
7
8
|
from langchain_text_splitters import TokenTextSplitter
|
8
9
|
from prometheus_client import Histogram
|
9
10
|
|
10
11
|
from ... schema import TextDocument, Chunk
|
11
12
|
from ... base import FlowProcessor
|
12
13
|
|
14
|
+
# Module logger
|
15
|
+
logger = logging.getLogger(__name__)
|
16
|
+
|
13
17
|
default_ident = "chunker"
|
14
18
|
|
15
19
|
class Processor(FlowProcessor):
|
@@ -53,12 +57,12 @@ class Processor(FlowProcessor):
|
|
53
57
|
)
|
54
58
|
)
|
55
59
|
|
56
|
-
|
60
|
+
logger.info("Token chunker initialized")
|
57
61
|
|
58
62
|
async def on_message(self, msg, consumer, flow):
|
59
63
|
|
60
64
|
v = msg.value()
|
61
|
-
|
65
|
+
logger.info(f"Chunking document {v.metadata.id}...")
|
62
66
|
|
63
67
|
texts = self.text_splitter.create_documents(
|
64
68
|
[v.text.decode("utf-8")]
|
@@ -66,7 +70,7 @@ class Processor(FlowProcessor):
|
|
66
70
|
|
67
71
|
for ix, chunk in enumerate(texts):
|
68
72
|
|
69
|
-
|
73
|
+
logger.debug(f"Created chunk of size {len(chunk.page_content)}")
|
70
74
|
|
71
75
|
r = Chunk(
|
72
76
|
metadata=v.metadata,
|
@@ -79,7 +83,7 @@ class Processor(FlowProcessor):
|
|
79
83
|
|
80
84
|
await flow("output").send(r)
|
81
85
|
|
82
|
-
|
86
|
+
logger.debug("Document chunking complete")
|
83
87
|
|
84
88
|
@staticmethod
|
85
89
|
def add_args(parser):
|
@@ -1,9 +1,14 @@
|
|
1
1
|
|
2
|
+
import logging
|
3
|
+
|
2
4
|
from trustgraph.schema import ConfigResponse
|
3
5
|
from trustgraph.schema import ConfigValue, Error
|
4
6
|
|
5
7
|
from ... tables.config import ConfigTableStore
|
6
8
|
|
9
|
+
# Module logger
|
10
|
+
logger = logging.getLogger(__name__)
|
11
|
+
|
7
12
|
class ConfigurationClass:
|
8
13
|
|
9
14
|
async def keys(self):
|
@@ -228,7 +233,7 @@ class Configuration:
|
|
228
233
|
|
229
234
|
async def handle(self, msg):
|
230
235
|
|
231
|
-
|
236
|
+
logger.debug(f"Handling config message: {msg.operation}")
|
232
237
|
|
233
238
|
if msg.operation == "get":
|
234
239
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
|
2
2
|
from trustgraph.schema import FlowResponse, Error
|
3
3
|
import json
|
4
|
+
import logging
|
5
|
+
|
6
|
+
# Module logger
|
7
|
+
logger = logging.getLogger(__name__)
|
4
8
|
|
5
9
|
class FlowConfig:
|
6
10
|
def __init__(self, config):
|
@@ -41,7 +45,7 @@ class FlowConfig:
|
|
41
45
|
|
42
46
|
async def handle_delete_class(self, msg):
|
43
47
|
|
44
|
-
|
48
|
+
logger.debug(f"Flow config message: {msg}")
|
45
49
|
|
46
50
|
await self.config.get("flow-classes").delete(msg.class_name)
|
47
51
|
|
@@ -218,7 +222,7 @@ class FlowConfig:
|
|
218
222
|
|
219
223
|
async def handle(self, msg):
|
220
224
|
|
221
|
-
|
225
|
+
logger.debug(f"Handling flow message: {msg.operation}")
|
222
226
|
|
223
227
|
if msg.operation == "list-classes":
|
224
228
|
resp = await self.handle_list_classes(msg)
|
@@ -3,6 +3,8 @@
|
|
3
3
|
Config service. Manages system global configuration state
|
4
4
|
"""
|
5
5
|
|
6
|
+
import logging
|
7
|
+
|
6
8
|
from trustgraph.schema import Error
|
7
9
|
|
8
10
|
from trustgraph.schema import ConfigRequest, ConfigResponse, ConfigPush
|
@@ -20,6 +22,9 @@ from . flow import FlowConfig
|
|
20
22
|
from ... base import ProcessorMetrics, ConsumerMetrics, ProducerMetrics
|
21
23
|
from ... base import Consumer, Producer
|
22
24
|
|
25
|
+
# Module logger
|
26
|
+
logger = logging.getLogger(__name__)
|
27
|
+
|
23
28
|
# FIXME: How to ensure this doesn't conflict with other usage?
|
24
29
|
keyspace = "config"
|
25
30
|
|
@@ -146,7 +151,7 @@ class Processor(AsyncProcessor):
|
|
146
151
|
|
147
152
|
self.flow = FlowConfig(self.config)
|
148
153
|
|
149
|
-
|
154
|
+
logger.info("Config service initialized")
|
150
155
|
|
151
156
|
async def start(self):
|
152
157
|
|
@@ -172,7 +177,7 @@ class Processor(AsyncProcessor):
|
|
172
177
|
|
173
178
|
# Race condition, should make sure version & config sync
|
174
179
|
|
175
|
-
|
180
|
+
logger.info(f"Pushed configuration version {await self.config.get_version()}")
|
176
181
|
|
177
182
|
async def on_config_request(self, msg, consumer, flow):
|
178
183
|
|
@@ -183,7 +188,7 @@ class Processor(AsyncProcessor):
|
|
183
188
|
# Sender-produced ID
|
184
189
|
id = msg.properties()["id"]
|
185
190
|
|
186
|
-
|
191
|
+
logger.info(f"Handling config request {id}...")
|
187
192
|
|
188
193
|
resp = await self.config.handle(v)
|
189
194
|
|
@@ -214,7 +219,7 @@ class Processor(AsyncProcessor):
|
|
214
219
|
# Sender-produced ID
|
215
220
|
id = msg.properties()["id"]
|
216
221
|
|
217
|
-
|
222
|
+
logger.info(f"Handling flow request {id}...")
|
218
223
|
|
219
224
|
resp = await self.flow.handle(v)
|
220
225
|
|
@@ -8,6 +8,10 @@ from .. base import Publisher
|
|
8
8
|
import base64
|
9
9
|
import asyncio
|
10
10
|
import uuid
|
11
|
+
import logging
|
12
|
+
|
13
|
+
# Module logger
|
14
|
+
logger = logging.getLogger(__name__)
|
11
15
|
|
12
16
|
class KnowledgeManager:
|
13
17
|
|
@@ -26,7 +30,7 @@ class KnowledgeManager:
|
|
26
30
|
|
27
31
|
async def delete_kg_core(self, request, respond):
|
28
32
|
|
29
|
-
|
33
|
+
logger.info("Deleting knowledge core...")
|
30
34
|
|
31
35
|
await self.table_store.delete_kg_core(
|
32
36
|
request.user, request.id
|
@@ -44,7 +48,7 @@ class KnowledgeManager:
|
|
44
48
|
|
45
49
|
async def get_kg_core(self, request, respond):
|
46
50
|
|
47
|
-
|
51
|
+
logger.info("Getting knowledge core...")
|
48
52
|
|
49
53
|
async def publish_triples(t):
|
50
54
|
await respond(
|
@@ -82,7 +86,7 @@ class KnowledgeManager:
|
|
82
86
|
publish_ge,
|
83
87
|
)
|
84
88
|
|
85
|
-
|
89
|
+
logger.debug("Knowledge core retrieval complete")
|
86
90
|
|
87
91
|
await respond(
|
88
92
|
KnowledgeResponse(
|
@@ -158,13 +162,13 @@ class KnowledgeManager:
|
|
158
162
|
|
159
163
|
async def core_loader(self):
|
160
164
|
|
161
|
-
|
165
|
+
logger.info("Knowledge background processor running...")
|
162
166
|
while True:
|
163
167
|
|
164
|
-
|
168
|
+
logger.debug("Waiting for next load...")
|
165
169
|
request, respond = await self.loader_queue.get()
|
166
170
|
|
167
|
-
|
171
|
+
logger.info(f"Loading knowledge: {request.id}")
|
168
172
|
|
169
173
|
try:
|
170
174
|
|
@@ -204,7 +208,7 @@ class KnowledgeManager:
|
|
204
208
|
|
205
209
|
except Exception as e:
|
206
210
|
|
207
|
-
|
211
|
+
logger.error(f"Knowledge exception: {e}", exc_info=True)
|
208
212
|
await respond(
|
209
213
|
KnowledgeResponse(
|
210
214
|
error = Error(
|
@@ -219,15 +223,15 @@ class KnowledgeManager:
|
|
219
223
|
)
|
220
224
|
|
221
225
|
|
222
|
-
|
226
|
+
logger.debug("Starting knowledge loading process...")
|
223
227
|
|
224
228
|
try:
|
225
229
|
|
226
230
|
t_pub = None
|
227
231
|
ge_pub = None
|
228
232
|
|
229
|
-
|
230
|
-
|
233
|
+
logger.debug(f"Triples queue: {t_q}")
|
234
|
+
logger.debug(f"Graph embeddings queue: {ge_q}")
|
231
235
|
|
232
236
|
t_pub = Publisher(
|
233
237
|
self.flow_config.pulsar_client, t_q,
|
@@ -238,7 +242,7 @@ class KnowledgeManager:
|
|
238
242
|
schema=GraphEmbeddings
|
239
243
|
)
|
240
244
|
|
241
|
-
|
245
|
+
logger.debug("Starting publishers...")
|
242
246
|
|
243
247
|
await t_pub.start()
|
244
248
|
await ge_pub.start()
|
@@ -246,7 +250,7 @@ class KnowledgeManager:
|
|
246
250
|
async def publish_triples(t):
|
247
251
|
await t_pub.send(None, t)
|
248
252
|
|
249
|
-
|
253
|
+
logger.debug("Publishing triples...")
|
250
254
|
|
251
255
|
# Remove doc table row
|
252
256
|
await self.table_store.get_triples(
|
@@ -258,7 +262,7 @@ class KnowledgeManager:
|
|
258
262
|
async def publish_ge(g):
|
259
263
|
await ge_pub.send(None, g)
|
260
264
|
|
261
|
-
|
265
|
+
logger.debug("Publishing graph embeddings...")
|
262
266
|
|
263
267
|
# Remove doc table row
|
264
268
|
await self.table_store.get_graph_embeddings(
|
@@ -267,19 +271,19 @@ class KnowledgeManager:
|
|
267
271
|
publish_ge,
|
268
272
|
)
|
269
273
|
|
270
|
-
|
274
|
+
logger.debug("Knowledge loading completed")
|
271
275
|
|
272
276
|
except Exception as e:
|
273
277
|
|
274
|
-
|
278
|
+
logger.error(f"Knowledge exception: {e}", exc_info=True)
|
275
279
|
|
276
280
|
finally:
|
277
281
|
|
278
|
-
|
282
|
+
logger.debug("Stopping publishers...")
|
279
283
|
|
280
284
|
if t_pub: await t_pub.stop()
|
281
285
|
if ge_pub: await ge_pub.stop()
|
282
286
|
|
283
|
-
|
287
|
+
logger.debug("Knowledge processing done")
|
284
288
|
|
285
289
|
continue
|