trustgraph-flow 2.2.26__tar.gz → 2.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/PKG-INFO +2 -2
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/pyproject.toml +1 -1
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/meta_router.py +14 -9
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/pattern_base.py +121 -29
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/plan_pattern.py +29 -11
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/react_pattern.py +25 -4
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/service.py +28 -13
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/supervisor_pattern.py +21 -7
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/react/agent_manager.py +65 -17
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/react/service.py +13 -13
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/react/tools.py +5 -3
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/react/types.py +11 -1
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/definitions/extract.py +2 -1
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/extract.py +2 -1
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/relationships/extract.py +2 -1
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/rows/processor.py +3 -2
- trustgraph_flow-2.3.1/trustgraph/flow_version.py +1 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/prompt/template/service.py +22 -22
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/document_rag/document_rag.py +48 -10
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/document_rag/rag.py +14 -7
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/graph_rag/graph_rag.py +93 -60
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/graph_rag/rag.py +12 -5
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph_flow.egg-info/requires.txt +1 -1
- trustgraph_flow-2.2.26/trustgraph/flow_version.py +0 -1
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/README.md +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/setup.cfg +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/mcp_tool/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/mcp_tool/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/mcp_tool/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/aggregator.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/react/streaming_parser.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/tool_filter.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/config/service/config.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/config/service/flow.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/config/service/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/cores/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/cores/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/cores/knowledge.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/cores/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/direct/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/direct/cassandra_kg.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/row_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/row_embeddings/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/embeddings/row_embeddings/embeddings.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/external/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/agent/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/agent/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/agent/extract.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/entity_normalizer.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/ontology_embedder.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/ontology_loader.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/ontology_selector.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/run.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/simplified_parser.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/text_processor.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/triple_converter.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/ontology/vector_store.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/rows/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/rows/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/auth.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/config/receiver.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/agent.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/collection_management.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/config.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/core_export.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/core_import.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/document_embeddings_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/document_load.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/document_rag.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/document_stream.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/embeddings.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/flow.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/knowledge.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/librarian.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/manager.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/mux.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/nlp_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/prompt.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/requestor.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/row_embeddings_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/rows_import.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/rows_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/sender.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/serialize.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/sparql_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/streamer.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/structured_diag.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/structured_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/text_completion.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/text_load.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/triples_export.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/triples_import.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/dispatch/triples_query.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/endpoint/manager.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/endpoint/metrics.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/endpoint/socket.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/running.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/unused/dbpedia.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/unused/encyclopedia.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/gateway/unused/internet_search.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/librarian/collection_manager.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/librarian/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/metering/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/metering/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/metering/counter.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/tgi/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/model/text_completion/vllm/llm.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/processing/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/processing/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/processing/processing.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/prompt/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/prompt/template/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/prompt/template/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graphql/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graphql/filters.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graphql/schema.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/graphql/types.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/answer_generator.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/backend_router.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/cache.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/cypher_executor.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/cypher_generator.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/error_handling.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/monitoring.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/multi_language.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/ontology_matcher.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/query_explanation.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/query_optimizer.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/query_service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/question_analyzer.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/sparql_cassandra.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/ontology/sparql_generator.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/row_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/row_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/row_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/row_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/rows/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/rows/cassandra/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/rows/cassandra/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/rows/cassandra/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/sparql/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/sparql/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/sparql/algebra.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/sparql/expressions.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/sparql/parser.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/sparql/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/sparql/solutions.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/nlp_query/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/nlp_query/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/nlp_query/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/structured_diag/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/structured_diag/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/structured_diag/type_detector.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/structured_query/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/structured_query/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/retrieval/structured_query/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/rev_gateway/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/rev_gateway/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/rev_gateway/dispatcher.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/rev_gateway/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/knowledge/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/knowledge/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/knowledge/store.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/row_embeddings/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/row_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/row_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/row_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/cassandra/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/tables/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/tables/config.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/tables/knowledge.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/tables/library.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/template/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/template/prompt_manager.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/tool_service/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/tool_service/joke/__init__.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/tool_service/joke/service.py +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph_flow.egg-info/SOURCES.txt +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph_flow.egg-info/entry_points.txt +0 -0
- {trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/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: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -8,7 +8,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
8
8
|
Classifier: Operating System :: OS Independent
|
|
9
9
|
Requires-Python: >=3.8
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
|
-
Requires-Dist: trustgraph-base<2.
|
|
11
|
+
Requires-Dist: trustgraph-base<2.4,>=2.3
|
|
12
12
|
Requires-Dist: aiohttp
|
|
13
13
|
Requires-Dist: anthropic
|
|
14
14
|
Requires-Dist: scylla-driver
|
|
@@ -10,7 +10,7 @@ description = "TrustGraph provides a means to run a pipeline of flexible AI proc
|
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"trustgraph-base>=2.
|
|
13
|
+
"trustgraph-base>=2.3,<2.4",
|
|
14
14
|
"aiohttp",
|
|
15
15
|
"anthropic",
|
|
16
16
|
"scylla-driver",
|
{trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/meta_router.py
RENAMED
|
@@ -53,7 +53,7 @@ class MetaRouter:
|
|
|
53
53
|
"general": {"name": "general", "description": "General queries", "valid_patterns": ["react"], "framing": ""},
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
async def identify_task_type(self, question, context):
|
|
56
|
+
async def identify_task_type(self, question, context, usage=None):
|
|
57
57
|
"""
|
|
58
58
|
Use the LLM to classify the question into one of the known task types.
|
|
59
59
|
|
|
@@ -71,7 +71,7 @@ class MetaRouter:
|
|
|
71
71
|
|
|
72
72
|
try:
|
|
73
73
|
client = context("prompt-request")
|
|
74
|
-
|
|
74
|
+
result = await client.prompt(
|
|
75
75
|
id="task-type-classify",
|
|
76
76
|
variables={
|
|
77
77
|
"question": question,
|
|
@@ -81,7 +81,9 @@ class MetaRouter:
|
|
|
81
81
|
],
|
|
82
82
|
},
|
|
83
83
|
)
|
|
84
|
-
|
|
84
|
+
if usage:
|
|
85
|
+
usage.track(result)
|
|
86
|
+
selected = result.text.strip().lower().replace('"', '').replace("'", "")
|
|
85
87
|
|
|
86
88
|
if selected in self.task_types:
|
|
87
89
|
framing = self.task_types[selected].get("framing", DEFAULT_FRAMING)
|
|
@@ -100,7 +102,7 @@ class MetaRouter:
|
|
|
100
102
|
)
|
|
101
103
|
return DEFAULT_TASK_TYPE, framing
|
|
102
104
|
|
|
103
|
-
async def select_pattern(self, question, task_type, context):
|
|
105
|
+
async def select_pattern(self, question, task_type, context, usage=None):
|
|
104
106
|
"""
|
|
105
107
|
Use the LLM to select the best execution pattern for this task type.
|
|
106
108
|
|
|
@@ -120,7 +122,7 @@ class MetaRouter:
|
|
|
120
122
|
|
|
121
123
|
try:
|
|
122
124
|
client = context("prompt-request")
|
|
123
|
-
|
|
125
|
+
result = await client.prompt(
|
|
124
126
|
id="pattern-select",
|
|
125
127
|
variables={
|
|
126
128
|
"question": question,
|
|
@@ -133,7 +135,9 @@ class MetaRouter:
|
|
|
133
135
|
],
|
|
134
136
|
},
|
|
135
137
|
)
|
|
136
|
-
|
|
138
|
+
if usage:
|
|
139
|
+
usage.track(result)
|
|
140
|
+
selected = result.text.strip().lower().replace('"', '').replace("'", "")
|
|
137
141
|
|
|
138
142
|
if selected in valid_patterns:
|
|
139
143
|
logger.info(f"MetaRouter: selected pattern '{selected}'")
|
|
@@ -148,19 +152,20 @@ class MetaRouter:
|
|
|
148
152
|
logger.warning(f"MetaRouter: pattern selection failed: {e}")
|
|
149
153
|
return valid_patterns[0] if valid_patterns else DEFAULT_PATTERN
|
|
150
154
|
|
|
151
|
-
async def route(self, question, context):
|
|
155
|
+
async def route(self, question, context, usage=None):
|
|
152
156
|
"""
|
|
153
157
|
Full routing pipeline: identify task type, then select pattern.
|
|
154
158
|
|
|
155
159
|
Args:
|
|
156
160
|
question: The user's query.
|
|
157
161
|
context: UserAwareContext (flow wrapper).
|
|
162
|
+
usage: Optional UsageTracker for token counting.
|
|
158
163
|
|
|
159
164
|
Returns:
|
|
160
165
|
(pattern, task_type, framing) tuple.
|
|
161
166
|
"""
|
|
162
|
-
task_type, framing = await self.identify_task_type(question, context)
|
|
163
|
-
pattern = await self.select_pattern(question, task_type, context)
|
|
167
|
+
task_type, framing = await self.identify_task_type(question, context, usage=usage)
|
|
168
|
+
pattern = await self.select_pattern(question, task_type, context, usage=usage)
|
|
164
169
|
logger.info(
|
|
165
170
|
f"MetaRouter: route result — "
|
|
166
171
|
f"pattern={pattern}, task_type={task_type}, framing={framing!r}"
|
{trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/pattern_base.py
RENAMED
|
@@ -25,6 +25,7 @@ from trustgraph.provenance import (
|
|
|
25
25
|
agent_plan_uri,
|
|
26
26
|
agent_step_result_uri,
|
|
27
27
|
agent_synthesis_uri,
|
|
28
|
+
agent_pattern_decision_uri,
|
|
28
29
|
agent_session_triples,
|
|
29
30
|
agent_iteration_triples,
|
|
30
31
|
agent_observation_triples,
|
|
@@ -34,6 +35,7 @@ from trustgraph.provenance import (
|
|
|
34
35
|
agent_plan_triples,
|
|
35
36
|
agent_step_result_triples,
|
|
36
37
|
agent_synthesis_triples,
|
|
38
|
+
agent_pattern_decision_triples,
|
|
37
39
|
set_graph,
|
|
38
40
|
GRAPH_RETRIEVAL,
|
|
39
41
|
)
|
|
@@ -65,6 +67,37 @@ class UserAwareContext:
|
|
|
65
67
|
return client
|
|
66
68
|
|
|
67
69
|
|
|
70
|
+
class UsageTracker:
|
|
71
|
+
"""Accumulates token usage across multiple prompt calls."""
|
|
72
|
+
|
|
73
|
+
def __init__(self):
|
|
74
|
+
self.total_in = 0
|
|
75
|
+
self.total_out = 0
|
|
76
|
+
self.last_model = None
|
|
77
|
+
|
|
78
|
+
def track(self, result):
|
|
79
|
+
"""Track usage from a PromptResult."""
|
|
80
|
+
if result is not None:
|
|
81
|
+
if getattr(result, "in_token", None) is not None:
|
|
82
|
+
self.total_in += result.in_token
|
|
83
|
+
if getattr(result, "out_token", None) is not None:
|
|
84
|
+
self.total_out += result.out_token
|
|
85
|
+
if getattr(result, "model", None) is not None:
|
|
86
|
+
self.last_model = result.model
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def in_token(self):
|
|
90
|
+
return self.total_in if self.total_in > 0 else None
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def out_token(self):
|
|
94
|
+
return self.total_out if self.total_out > 0 else None
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def model(self):
|
|
98
|
+
return self.last_model
|
|
99
|
+
|
|
100
|
+
|
|
68
101
|
class PatternBase:
|
|
69
102
|
"""
|
|
70
103
|
Shared infrastructure for all agent patterns.
|
|
@@ -151,7 +184,7 @@ class PatternBase:
|
|
|
151
184
|
logger.debug(f"Think: {x} (is_final={is_final})")
|
|
152
185
|
if streaming:
|
|
153
186
|
r = AgentResponse(
|
|
154
|
-
|
|
187
|
+
message_type="thought",
|
|
155
188
|
content=x,
|
|
156
189
|
end_of_message=is_final,
|
|
157
190
|
end_of_dialog=False,
|
|
@@ -159,7 +192,7 @@ class PatternBase:
|
|
|
159
192
|
)
|
|
160
193
|
else:
|
|
161
194
|
r = AgentResponse(
|
|
162
|
-
|
|
195
|
+
message_type="thought",
|
|
163
196
|
content=x,
|
|
164
197
|
end_of_message=True,
|
|
165
198
|
end_of_dialog=False,
|
|
@@ -174,7 +207,7 @@ class PatternBase:
|
|
|
174
207
|
logger.debug(f"Observe: {x} (is_final={is_final})")
|
|
175
208
|
if streaming:
|
|
176
209
|
r = AgentResponse(
|
|
177
|
-
|
|
210
|
+
message_type="observation",
|
|
178
211
|
content=x,
|
|
179
212
|
end_of_message=is_final,
|
|
180
213
|
end_of_dialog=False,
|
|
@@ -182,7 +215,7 @@ class PatternBase:
|
|
|
182
215
|
)
|
|
183
216
|
else:
|
|
184
217
|
r = AgentResponse(
|
|
185
|
-
|
|
218
|
+
message_type="observation",
|
|
186
219
|
content=x,
|
|
187
220
|
end_of_message=True,
|
|
188
221
|
end_of_dialog=False,
|
|
@@ -197,7 +230,7 @@ class PatternBase:
|
|
|
197
230
|
logger.debug(f"Answer: {x}")
|
|
198
231
|
if streaming:
|
|
199
232
|
r = AgentResponse(
|
|
200
|
-
|
|
233
|
+
message_type="answer",
|
|
201
234
|
content=x,
|
|
202
235
|
end_of_message=False,
|
|
203
236
|
end_of_dialog=False,
|
|
@@ -205,7 +238,7 @@ class PatternBase:
|
|
|
205
238
|
)
|
|
206
239
|
else:
|
|
207
240
|
r = AgentResponse(
|
|
208
|
-
|
|
241
|
+
message_type="answer",
|
|
209
242
|
content=x,
|
|
210
243
|
end_of_message=True,
|
|
211
244
|
end_of_dialog=False,
|
|
@@ -239,16 +272,43 @@ class PatternBase:
|
|
|
239
272
|
logger.debug(f"Emitted session triples for {session_uri}")
|
|
240
273
|
|
|
241
274
|
await respond(AgentResponse(
|
|
242
|
-
|
|
275
|
+
message_type="explain",
|
|
243
276
|
content="",
|
|
244
277
|
explain_id=session_uri,
|
|
245
278
|
explain_graph=GRAPH_RETRIEVAL,
|
|
246
279
|
explain_triples=triples,
|
|
247
280
|
))
|
|
248
281
|
|
|
282
|
+
async def emit_pattern_decision_triples(
|
|
283
|
+
self, flow, session_id, session_uri, pattern, task_type,
|
|
284
|
+
user, collection, respond,
|
|
285
|
+
):
|
|
286
|
+
"""Emit provenance triples for a meta-router pattern decision."""
|
|
287
|
+
uri = agent_pattern_decision_uri(session_id)
|
|
288
|
+
triples = set_graph(
|
|
289
|
+
agent_pattern_decision_triples(
|
|
290
|
+
uri, session_uri, pattern, task_type,
|
|
291
|
+
),
|
|
292
|
+
GRAPH_RETRIEVAL,
|
|
293
|
+
)
|
|
294
|
+
await flow("explainability").send(Triples(
|
|
295
|
+
metadata=Metadata(id=uri, user=user, collection=collection),
|
|
296
|
+
triples=triples,
|
|
297
|
+
))
|
|
298
|
+
await respond(AgentResponse(
|
|
299
|
+
message_type="explain", content="",
|
|
300
|
+
explain_id=uri, explain_graph=GRAPH_RETRIEVAL,
|
|
301
|
+
explain_triples=triples,
|
|
302
|
+
))
|
|
303
|
+
return uri
|
|
304
|
+
|
|
249
305
|
async def emit_iteration_triples(self, flow, session_id, iteration_num,
|
|
250
306
|
session_uri, act, request, respond,
|
|
251
|
-
streaming
|
|
307
|
+
streaming, tool_candidates=None,
|
|
308
|
+
step_number=None,
|
|
309
|
+
llm_duration_ms=None,
|
|
310
|
+
in_token=None, out_token=None,
|
|
311
|
+
model=None):
|
|
252
312
|
"""Emit provenance triples for an iteration (Analysis+ToolUse)."""
|
|
253
313
|
iteration_uri = agent_iteration_uri(session_id, iteration_num)
|
|
254
314
|
|
|
@@ -288,6 +348,12 @@ class PatternBase:
|
|
|
288
348
|
arguments=act.arguments,
|
|
289
349
|
thought_uri=thought_entity_uri if thought_doc_id else None,
|
|
290
350
|
thought_document_id=thought_doc_id,
|
|
351
|
+
tool_candidates=tool_candidates,
|
|
352
|
+
step_number=step_number,
|
|
353
|
+
llm_duration_ms=llm_duration_ms,
|
|
354
|
+
in_token=in_token,
|
|
355
|
+
out_token=out_token,
|
|
356
|
+
model=model,
|
|
291
357
|
),
|
|
292
358
|
GRAPH_RETRIEVAL,
|
|
293
359
|
)
|
|
@@ -302,7 +368,7 @@ class PatternBase:
|
|
|
302
368
|
logger.debug(f"Emitted iteration triples for {iteration_uri}")
|
|
303
369
|
|
|
304
370
|
await respond(AgentResponse(
|
|
305
|
-
|
|
371
|
+
message_type="explain",
|
|
306
372
|
content="",
|
|
307
373
|
explain_id=iteration_uri,
|
|
308
374
|
explain_graph=GRAPH_RETRIEVAL,
|
|
@@ -311,7 +377,9 @@ class PatternBase:
|
|
|
311
377
|
|
|
312
378
|
async def emit_observation_triples(self, flow, session_id, iteration_num,
|
|
313
379
|
observation_text, request, respond,
|
|
314
|
-
context=None
|
|
380
|
+
context=None,
|
|
381
|
+
tool_duration_ms=None,
|
|
382
|
+
tool_error=None):
|
|
315
383
|
"""Emit provenance triples for a standalone Observation entity."""
|
|
316
384
|
iteration_uri = agent_iteration_uri(session_id, iteration_num)
|
|
317
385
|
observation_entity_uri = agent_observation_uri(session_id, iteration_num)
|
|
@@ -344,6 +412,8 @@ class PatternBase:
|
|
|
344
412
|
observation_entity_uri,
|
|
345
413
|
parent_uri,
|
|
346
414
|
document_id=observation_doc_id,
|
|
415
|
+
tool_duration_ms=tool_duration_ms,
|
|
416
|
+
tool_error=tool_error,
|
|
347
417
|
),
|
|
348
418
|
GRAPH_RETRIEVAL,
|
|
349
419
|
)
|
|
@@ -358,7 +428,7 @@ class PatternBase:
|
|
|
358
428
|
logger.debug(f"Emitted observation triples for {observation_entity_uri}")
|
|
359
429
|
|
|
360
430
|
await respond(AgentResponse(
|
|
361
|
-
|
|
431
|
+
message_type="explain",
|
|
362
432
|
content="",
|
|
363
433
|
explain_id=observation_entity_uri,
|
|
364
434
|
explain_graph=GRAPH_RETRIEVAL,
|
|
@@ -367,7 +437,7 @@ class PatternBase:
|
|
|
367
437
|
|
|
368
438
|
async def emit_final_triples(self, flow, session_id, iteration_num,
|
|
369
439
|
session_uri, answer_text, request, respond,
|
|
370
|
-
streaming):
|
|
440
|
+
streaming, termination_reason=None):
|
|
371
441
|
"""Emit provenance triples for the final answer and save to librarian."""
|
|
372
442
|
final_uri = agent_final_uri(session_id)
|
|
373
443
|
|
|
@@ -401,6 +471,7 @@ class PatternBase:
|
|
|
401
471
|
question_uri=final_question_uri,
|
|
402
472
|
previous_uri=final_previous_uri,
|
|
403
473
|
document_id=answer_doc_id,
|
|
474
|
+
termination_reason=termination_reason,
|
|
404
475
|
),
|
|
405
476
|
GRAPH_RETRIEVAL,
|
|
406
477
|
)
|
|
@@ -415,7 +486,7 @@ class PatternBase:
|
|
|
415
486
|
logger.debug(f"Emitted final triples for {final_uri}")
|
|
416
487
|
|
|
417
488
|
await respond(AgentResponse(
|
|
418
|
-
|
|
489
|
+
message_type="explain",
|
|
419
490
|
content="",
|
|
420
491
|
explain_id=final_uri,
|
|
421
492
|
explain_graph=GRAPH_RETRIEVAL,
|
|
@@ -439,7 +510,7 @@ class PatternBase:
|
|
|
439
510
|
triples=triples,
|
|
440
511
|
))
|
|
441
512
|
await respond(AgentResponse(
|
|
442
|
-
|
|
513
|
+
message_type="explain", content="",
|
|
443
514
|
explain_id=uri, explain_graph=GRAPH_RETRIEVAL,
|
|
444
515
|
explain_triples=triples,
|
|
445
516
|
))
|
|
@@ -478,7 +549,7 @@ class PatternBase:
|
|
|
478
549
|
triples=triples,
|
|
479
550
|
))
|
|
480
551
|
await respond(AgentResponse(
|
|
481
|
-
|
|
552
|
+
message_type="explain", content="",
|
|
482
553
|
explain_id=uri, explain_graph=GRAPH_RETRIEVAL,
|
|
483
554
|
explain_triples=triples,
|
|
484
555
|
))
|
|
@@ -498,7 +569,7 @@ class PatternBase:
|
|
|
498
569
|
triples=triples,
|
|
499
570
|
))
|
|
500
571
|
await respond(AgentResponse(
|
|
501
|
-
|
|
572
|
+
message_type="explain", content="",
|
|
502
573
|
explain_id=uri, explain_graph=GRAPH_RETRIEVAL,
|
|
503
574
|
explain_triples=triples,
|
|
504
575
|
))
|
|
@@ -531,14 +602,14 @@ class PatternBase:
|
|
|
531
602
|
triples=triples,
|
|
532
603
|
))
|
|
533
604
|
await respond(AgentResponse(
|
|
534
|
-
|
|
605
|
+
message_type="explain", content="",
|
|
535
606
|
explain_id=uri, explain_graph=GRAPH_RETRIEVAL,
|
|
536
607
|
explain_triples=triples,
|
|
537
608
|
))
|
|
538
609
|
|
|
539
610
|
async def emit_synthesis_triples(
|
|
540
611
|
self, flow, session_id, previous_uris, answer_text, user, collection,
|
|
541
|
-
respond, streaming,
|
|
612
|
+
respond, streaming, termination_reason=None,
|
|
542
613
|
):
|
|
543
614
|
"""Emit provenance for a synthesis answer."""
|
|
544
615
|
uri = agent_synthesis_uri(session_id)
|
|
@@ -555,7 +626,10 @@ class PatternBase:
|
|
|
555
626
|
doc_id = None
|
|
556
627
|
|
|
557
628
|
triples = set_graph(
|
|
558
|
-
agent_synthesis_triples(
|
|
629
|
+
agent_synthesis_triples(
|
|
630
|
+
uri, previous_uris, doc_id,
|
|
631
|
+
termination_reason=termination_reason,
|
|
632
|
+
),
|
|
559
633
|
GRAPH_RETRIEVAL,
|
|
560
634
|
)
|
|
561
635
|
await flow("explainability").send(Triples(
|
|
@@ -563,7 +637,7 @@ class PatternBase:
|
|
|
563
637
|
triples=triples,
|
|
564
638
|
))
|
|
565
639
|
await respond(AgentResponse(
|
|
566
|
-
|
|
640
|
+
message_type="explain", content="",
|
|
567
641
|
explain_id=uri, explain_graph=GRAPH_RETRIEVAL,
|
|
568
642
|
explain_triples=triples,
|
|
569
643
|
))
|
|
@@ -571,7 +645,8 @@ class PatternBase:
|
|
|
571
645
|
# ---- Response helpers ---------------------------------------------------
|
|
572
646
|
|
|
573
647
|
async def prompt_as_answer(self, client, prompt_id, variables,
|
|
574
|
-
respond, streaming, message_id=""
|
|
648
|
+
respond, streaming, message_id="",
|
|
649
|
+
usage=None):
|
|
575
650
|
"""Call a prompt template, forwarding chunks as answer
|
|
576
651
|
AgentResponse messages when streaming is enabled.
|
|
577
652
|
|
|
@@ -584,29 +659,35 @@ class PatternBase:
|
|
|
584
659
|
if text:
|
|
585
660
|
accumulated.append(text)
|
|
586
661
|
await respond(AgentResponse(
|
|
587
|
-
|
|
662
|
+
message_type="answer",
|
|
588
663
|
content=text,
|
|
589
664
|
end_of_message=False,
|
|
590
665
|
end_of_dialog=False,
|
|
591
666
|
message_id=message_id,
|
|
592
667
|
))
|
|
593
668
|
|
|
594
|
-
await client.prompt(
|
|
669
|
+
result = await client.prompt(
|
|
595
670
|
id=prompt_id,
|
|
596
671
|
variables=variables,
|
|
597
672
|
streaming=True,
|
|
598
673
|
chunk_callback=on_chunk,
|
|
599
674
|
)
|
|
675
|
+
if usage:
|
|
676
|
+
usage.track(result)
|
|
600
677
|
|
|
601
678
|
return "".join(accumulated)
|
|
602
679
|
else:
|
|
603
|
-
|
|
680
|
+
result = await client.prompt(
|
|
604
681
|
id=prompt_id,
|
|
605
682
|
variables=variables,
|
|
606
683
|
)
|
|
684
|
+
if usage:
|
|
685
|
+
usage.track(result)
|
|
686
|
+
return result.text
|
|
607
687
|
|
|
608
688
|
async def send_final_response(self, respond, streaming, answer_text,
|
|
609
|
-
already_streamed=False, message_id=""
|
|
689
|
+
already_streamed=False, message_id="",
|
|
690
|
+
usage=None):
|
|
610
691
|
"""Send the answer content and end-of-dialog marker.
|
|
611
692
|
|
|
612
693
|
Args:
|
|
@@ -614,33 +695,44 @@ class PatternBase:
|
|
|
614
695
|
via streaming callbacks (e.g. ReactPattern). Only the
|
|
615
696
|
end-of-dialog marker is emitted.
|
|
616
697
|
message_id: Provenance URI for the answer entity.
|
|
698
|
+
usage: UsageTracker with accumulated token counts.
|
|
617
699
|
"""
|
|
700
|
+
usage_kwargs = {}
|
|
701
|
+
if usage:
|
|
702
|
+
usage_kwargs = {
|
|
703
|
+
"in_token": usage.in_token,
|
|
704
|
+
"out_token": usage.out_token,
|
|
705
|
+
"model": usage.model,
|
|
706
|
+
}
|
|
707
|
+
|
|
618
708
|
if streaming and not already_streamed:
|
|
619
709
|
# Answer wasn't streamed yet — send it as a chunk first
|
|
620
710
|
if answer_text:
|
|
621
711
|
await respond(AgentResponse(
|
|
622
|
-
|
|
712
|
+
message_type="answer",
|
|
623
713
|
content=answer_text,
|
|
624
714
|
end_of_message=False,
|
|
625
715
|
end_of_dialog=False,
|
|
626
716
|
message_id=message_id,
|
|
627
717
|
))
|
|
628
718
|
if streaming:
|
|
629
|
-
# End-of-dialog marker
|
|
719
|
+
# End-of-dialog marker with usage
|
|
630
720
|
await respond(AgentResponse(
|
|
631
|
-
|
|
721
|
+
message_type="answer",
|
|
632
722
|
content="",
|
|
633
723
|
end_of_message=True,
|
|
634
724
|
end_of_dialog=True,
|
|
635
725
|
message_id=message_id,
|
|
726
|
+
**usage_kwargs,
|
|
636
727
|
))
|
|
637
728
|
else:
|
|
638
729
|
await respond(AgentResponse(
|
|
639
|
-
|
|
730
|
+
message_type="answer",
|
|
640
731
|
content=answer_text,
|
|
641
732
|
end_of_message=True,
|
|
642
733
|
end_of_dialog=True,
|
|
643
734
|
message_id=message_id,
|
|
735
|
+
**usage_kwargs,
|
|
644
736
|
))
|
|
645
737
|
|
|
646
738
|
def build_next_request(self, request, history, session_id, collection,
|
{trustgraph_flow-2.2.26 → trustgraph_flow-2.3.1}/trustgraph/agent/orchestrator/plan_pattern.py
RENAMED
|
@@ -18,7 +18,7 @@ from trustgraph.provenance import (
|
|
|
18
18
|
agent_synthesis_uri,
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
from . pattern_base import PatternBase
|
|
21
|
+
from . pattern_base import PatternBase, UsageTracker
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
@@ -35,7 +35,11 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
35
35
|
Subsequent calls execute the next pending plan step via ReACT.
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
|
-
async def iterate(self, request, respond, next, flow
|
|
38
|
+
async def iterate(self, request, respond, next, flow, usage=None,
|
|
39
|
+
pattern_decision_uri=None):
|
|
40
|
+
|
|
41
|
+
if usage is None:
|
|
42
|
+
usage = UsageTracker()
|
|
39
43
|
|
|
40
44
|
streaming = getattr(request, 'streaming', False)
|
|
41
45
|
session_id = getattr(request, 'session_id', '') or str(uuid.uuid4())
|
|
@@ -63,17 +67,19 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
63
67
|
# Determine current phase by checking history for a plan step
|
|
64
68
|
plan = self._extract_plan(request.history)
|
|
65
69
|
|
|
70
|
+
derive_from_uri = pattern_decision_uri or session_uri
|
|
71
|
+
|
|
66
72
|
if plan is None:
|
|
67
73
|
await self._planning_iteration(
|
|
68
74
|
request, respond, next, flow,
|
|
69
|
-
session_id, collection, streaming,
|
|
70
|
-
iteration_num,
|
|
75
|
+
session_id, collection, streaming, derive_from_uri,
|
|
76
|
+
iteration_num, usage=usage,
|
|
71
77
|
)
|
|
72
78
|
else:
|
|
73
79
|
await self._execution_iteration(
|
|
74
80
|
request, respond, next, flow,
|
|
75
|
-
session_id, collection, streaming,
|
|
76
|
-
iteration_num, plan,
|
|
81
|
+
session_id, collection, streaming, derive_from_uri,
|
|
82
|
+
iteration_num, plan, usage=usage,
|
|
77
83
|
)
|
|
78
84
|
|
|
79
85
|
def _extract_plan(self, history):
|
|
@@ -98,7 +104,7 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
98
104
|
|
|
99
105
|
async def _planning_iteration(self, request, respond, next, flow,
|
|
100
106
|
session_id, collection, streaming,
|
|
101
|
-
session_uri, iteration_num):
|
|
107
|
+
session_uri, iteration_num, usage=None):
|
|
102
108
|
"""Ask the LLM to produce a structured plan."""
|
|
103
109
|
|
|
104
110
|
think = self.make_think_callback(respond, streaming)
|
|
@@ -113,7 +119,7 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
113
119
|
client = context("prompt-request")
|
|
114
120
|
|
|
115
121
|
# Use the plan-create prompt template
|
|
116
|
-
|
|
122
|
+
result = await client.prompt(
|
|
117
123
|
id="plan-create",
|
|
118
124
|
variables={
|
|
119
125
|
"question": request.question,
|
|
@@ -124,7 +130,10 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
124
130
|
],
|
|
125
131
|
},
|
|
126
132
|
)
|
|
133
|
+
if usage:
|
|
134
|
+
usage.track(result)
|
|
127
135
|
|
|
136
|
+
plan_steps = result.objects
|
|
128
137
|
# Validate we got a list
|
|
129
138
|
if not isinstance(plan_steps, list) or not plan_steps:
|
|
130
139
|
logger.warning("plan-create returned invalid result, falling back to single step")
|
|
@@ -187,7 +196,8 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
187
196
|
|
|
188
197
|
async def _execution_iteration(self, request, respond, next, flow,
|
|
189
198
|
session_id, collection, streaming,
|
|
190
|
-
session_uri, iteration_num, plan
|
|
199
|
+
session_uri, iteration_num, plan,
|
|
200
|
+
usage=None):
|
|
191
201
|
"""Execute the next pending plan step via single-shot tool call."""
|
|
192
202
|
|
|
193
203
|
pending_idx = self._find_next_pending_step(plan)
|
|
@@ -198,6 +208,7 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
198
208
|
request, respond, next, flow,
|
|
199
209
|
session_id, collection, streaming,
|
|
200
210
|
session_uri, iteration_num, plan,
|
|
211
|
+
usage=usage,
|
|
201
212
|
)
|
|
202
213
|
return
|
|
203
214
|
|
|
@@ -240,7 +251,7 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
240
251
|
client = context("prompt-request")
|
|
241
252
|
|
|
242
253
|
# Single-shot: ask LLM which tool + arguments to use for this goal
|
|
243
|
-
|
|
254
|
+
result = await client.prompt(
|
|
244
255
|
id="plan-step-execute",
|
|
245
256
|
variables={
|
|
246
257
|
"goal": goal,
|
|
@@ -258,7 +269,10 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
258
269
|
],
|
|
259
270
|
},
|
|
260
271
|
)
|
|
272
|
+
if usage:
|
|
273
|
+
usage.track(result)
|
|
261
274
|
|
|
275
|
+
tool_call = result.object
|
|
262
276
|
tool_name = tool_call.get("tool", "")
|
|
263
277
|
tool_arguments = tool_call.get("arguments", {})
|
|
264
278
|
|
|
@@ -330,7 +344,8 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
330
344
|
|
|
331
345
|
async def _synthesise(self, request, respond, next, flow,
|
|
332
346
|
session_id, collection, streaming,
|
|
333
|
-
session_uri, iteration_num, plan
|
|
347
|
+
session_uri, iteration_num, plan,
|
|
348
|
+
usage=None):
|
|
334
349
|
"""Synthesise a final answer from all completed plan step results."""
|
|
335
350
|
|
|
336
351
|
think = self.make_think_callback(respond, streaming)
|
|
@@ -365,6 +380,7 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
365
380
|
respond=respond,
|
|
366
381
|
streaming=streaming,
|
|
367
382
|
message_id=synthesis_msg_id,
|
|
383
|
+
usage=usage,
|
|
368
384
|
)
|
|
369
385
|
|
|
370
386
|
# Emit synthesis provenance (links back to last step result)
|
|
@@ -372,6 +388,7 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
372
388
|
await self.emit_synthesis_triples(
|
|
373
389
|
flow, session_id, last_step_uri,
|
|
374
390
|
response_text, request.user, collection, respond, streaming,
|
|
391
|
+
termination_reason="plan-complete",
|
|
375
392
|
)
|
|
376
393
|
|
|
377
394
|
if self.is_subagent(request):
|
|
@@ -380,4 +397,5 @@ class PlanThenExecutePattern(PatternBase):
|
|
|
380
397
|
await self.send_final_response(
|
|
381
398
|
respond, streaming, response_text, already_streamed=streaming,
|
|
382
399
|
message_id=synthesis_msg_id,
|
|
400
|
+
usage=usage,
|
|
383
401
|
)
|