trustgraph-base 2.2.22__tar.gz → 2.2.24__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_base-2.2.22 → trustgraph_base-2.2.24}/PKG-INFO +1 -1
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/backend.py +7 -3
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/consumer.py +2 -5
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_rag_client.py +2 -2
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/librarian_client.py +0 -1
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/pulsar_backend.py +14 -9
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/rabbitmq_backend.py +11 -18
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/subscriber.py +0 -1
- trustgraph_base-2.2.24/trustgraph/base_version.py +1 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/base.py +0 -1
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/document_rag_client.py +2 -2
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/graph_rag_client.py +2 -2
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/triples.py +10 -3
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/topic.py +6 -6
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/config.py +1 -1
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/PKG-INFO +1 -1
- trustgraph_base-2.2.22/trustgraph/base_version.py +0 -1
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/README.md +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/pyproject.toml +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/setup.cfg +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/api.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_bulk_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_flow.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_metrics.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_socket_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/bulk_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/collection.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/config.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/exceptions.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/explainability.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/flow.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/knowledge.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/library.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/metrics.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/socket_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/types.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/agent_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/agent_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/async_processor.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/cassandra_config.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/chunking_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/collection_config_handler.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/consumer_spec.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/document_embeddings_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/document_embeddings_query_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/document_embeddings_store_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/dynamic_tool_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/embeddings_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/embeddings_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/flow.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/flow_processor.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_query_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_store_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/llm_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/logging.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/metrics.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/parameter_spec.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/producer.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/producer_spec.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/prompt_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/publisher.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/pubsub.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/request_response_spec.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/row_embeddings_query_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/serialization.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/spec.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/structured_query_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/subscriber_spec.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/text_completion_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/tool_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/tool_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/tool_service_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/triples_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/triples_query_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/triples_store_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/agent_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/config_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/document_embeddings_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/embeddings_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/graph_embeddings_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/llm_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/prompt_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/row_embeddings_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/triples_query_client.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/exceptions.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/defs.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/document.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/organization.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/publication.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/log_level.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/registry.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/agent.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/base.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/collection.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/config.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/diagnosis.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/document_loading.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/embeddings.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/embeddings_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/flow.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/knowledge.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/library.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/metadata.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/nlp_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/primitives.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/prompt.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/retrieval.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/rows_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/sparql_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/structured_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/text_completion.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/tool.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/triples.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/objects/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/objects/field.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/objects/object.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/agent.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/namespaces.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/uris.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/vocabulary.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/rdf.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/metadata.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/primitives.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/document.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/embeddings.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/graph.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/knowledge.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/nlp.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/object.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/rows.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/structured.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/__init__.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/agent.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/collection.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/diagnosis.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/flow.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/library.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/llm.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/lookup.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/nlp_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/prompt.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/retrieval.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/rows_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/sparql_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/storage.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/structured_query.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/tool_service.py +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/SOURCES.txt +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-base
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.24
|
|
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
|
|
@@ -124,18 +124,22 @@ class PubSubBackend(Protocol):
|
|
|
124
124
|
subscription: str,
|
|
125
125
|
schema: type,
|
|
126
126
|
initial_position: str = 'latest',
|
|
127
|
-
consumer_type: str = 'shared',
|
|
128
127
|
**options
|
|
129
128
|
) -> BackendConsumer:
|
|
130
129
|
"""
|
|
131
130
|
Create a consumer for a topic.
|
|
132
131
|
|
|
132
|
+
Consumer behaviour is determined by the topic's class prefix:
|
|
133
|
+
- flow: shared competing consumers, durable named queue
|
|
134
|
+
- request: shared competing consumers, non-durable named queue
|
|
135
|
+
- response: exclusive per-subscriber, anonymous auto-delete queue
|
|
136
|
+
- notify: exclusive per-subscriber, anonymous auto-delete queue
|
|
137
|
+
|
|
133
138
|
Args:
|
|
134
|
-
topic:
|
|
139
|
+
topic: Queue identifier in class:topicspace:topic format
|
|
135
140
|
subscription: Subscription/consumer group name
|
|
136
141
|
schema: Dataclass type for messages
|
|
137
142
|
initial_position: 'earliest' or 'latest' (some backends may ignore)
|
|
138
|
-
consumer_type: 'shared', 'exclusive', 'failover' (some backends may ignore)
|
|
139
143
|
**options: Backend-specific options
|
|
140
144
|
|
|
141
145
|
Returns:
|
|
@@ -33,19 +33,17 @@ class Consumer:
|
|
|
33
33
|
rate_limit_retry_time = 10, rate_limit_timeout = 7200,
|
|
34
34
|
reconnect_time = 5,
|
|
35
35
|
concurrency = 1, # Number of concurrent requests to handle
|
|
36
|
-
|
|
36
|
+
**kwargs,
|
|
37
37
|
):
|
|
38
38
|
|
|
39
39
|
self.taskgroup = taskgroup
|
|
40
40
|
self.flow = flow
|
|
41
|
-
self.backend = backend
|
|
41
|
+
self.backend = backend
|
|
42
42
|
self.topic = topic
|
|
43
43
|
self.subscriber = subscriber
|
|
44
44
|
self.schema = schema
|
|
45
45
|
self.handler = handler
|
|
46
46
|
|
|
47
|
-
self.consumer_type = consumer_type
|
|
48
|
-
|
|
49
47
|
self.rate_limit_retry_time = rate_limit_retry_time
|
|
50
48
|
self.rate_limit_timeout = rate_limit_timeout
|
|
51
49
|
|
|
@@ -129,7 +127,6 @@ class Consumer:
|
|
|
129
127
|
subscription = self.subscriber,
|
|
130
128
|
schema = self.schema,
|
|
131
129
|
initial_position = initial_pos,
|
|
132
|
-
consumer_type = self.consumer_type,
|
|
133
130
|
),
|
|
134
131
|
)
|
|
135
132
|
consumers.append(c)
|
|
@@ -15,7 +15,7 @@ class GraphRagClient(RequestResponse):
|
|
|
15
15
|
user: User identifier
|
|
16
16
|
collection: Collection identifier
|
|
17
17
|
chunk_callback: Optional async callback(text, end_of_stream) for text chunks
|
|
18
|
-
explain_callback: Optional async callback(explain_id, explain_graph) for explain notifications
|
|
18
|
+
explain_callback: Optional async callback(explain_id, explain_graph, explain_triples) for explain notifications
|
|
19
19
|
timeout: Request timeout in seconds
|
|
20
20
|
|
|
21
21
|
Returns:
|
|
@@ -30,7 +30,7 @@ class GraphRagClient(RequestResponse):
|
|
|
30
30
|
# Handle explain notifications
|
|
31
31
|
if resp.message_type == 'explain':
|
|
32
32
|
if explain_callback and resp.explain_id:
|
|
33
|
-
await explain_callback(resp.explain_id, resp.explain_graph)
|
|
33
|
+
await explain_callback(resp.explain_id, resp.explain_graph, resp.explain_triples)
|
|
34
34
|
return False # Continue receiving
|
|
35
35
|
|
|
36
36
|
# Handle text chunks
|
|
@@ -159,14 +159,16 @@ class PulsarBackend:
|
|
|
159
159
|
cls, topicspace, topic = parts
|
|
160
160
|
|
|
161
161
|
# Map class to Pulsar persistence and namespace
|
|
162
|
-
if cls
|
|
162
|
+
if cls == 'flow':
|
|
163
163
|
persistence = 'persistent'
|
|
164
164
|
elif cls in ('request', 'response'):
|
|
165
165
|
persistence = 'non-persistent'
|
|
166
|
+
elif cls == 'notify':
|
|
167
|
+
persistence = 'non-persistent'
|
|
166
168
|
else:
|
|
167
169
|
raise ValueError(
|
|
168
170
|
f"Invalid queue class: {cls}, "
|
|
169
|
-
f"expected flow, request, response, or
|
|
171
|
+
f"expected flow, request, response, or notify"
|
|
170
172
|
)
|
|
171
173
|
|
|
172
174
|
return f"{persistence}://{topicspace}/{cls}/{topic}"
|
|
@@ -205,18 +207,20 @@ class PulsarBackend:
|
|
|
205
207
|
subscription: str,
|
|
206
208
|
schema: type,
|
|
207
209
|
initial_position: str = 'latest',
|
|
208
|
-
consumer_type: str = 'shared',
|
|
209
210
|
**options
|
|
210
211
|
) -> BackendConsumer:
|
|
211
212
|
"""
|
|
212
213
|
Create a Pulsar consumer.
|
|
213
214
|
|
|
215
|
+
Consumer type is derived from the topic's class prefix:
|
|
216
|
+
- flow/request: Shared (competing consumers)
|
|
217
|
+
- response/notify: Exclusive (per-subscriber)
|
|
218
|
+
|
|
214
219
|
Args:
|
|
215
|
-
topic:
|
|
220
|
+
topic: Queue identifier in class:topicspace:topic format
|
|
216
221
|
subscription: Subscription name
|
|
217
222
|
schema: Dataclass type for messages
|
|
218
223
|
initial_position: 'earliest' or 'latest'
|
|
219
|
-
consumer_type: 'shared', 'exclusive', or 'failover'
|
|
220
224
|
**options: Backend-specific options
|
|
221
225
|
|
|
222
226
|
Returns:
|
|
@@ -224,17 +228,18 @@ class PulsarBackend:
|
|
|
224
228
|
"""
|
|
225
229
|
pulsar_topic = self.map_topic(topic)
|
|
226
230
|
|
|
231
|
+
# Extract class from topic for consumer type mapping
|
|
232
|
+
cls = topic.split(':', 1)[0] if ':' in topic else 'flow'
|
|
233
|
+
|
|
227
234
|
# Map initial position
|
|
228
235
|
if initial_position == 'earliest':
|
|
229
236
|
pos = pulsar.InitialPosition.Earliest
|
|
230
237
|
else:
|
|
231
238
|
pos = pulsar.InitialPosition.Latest
|
|
232
239
|
|
|
233
|
-
# Map consumer type
|
|
234
|
-
if
|
|
240
|
+
# Map consumer type from class
|
|
241
|
+
if cls in ('response', 'notify'):
|
|
235
242
|
ctype = pulsar.ConsumerType.Exclusive
|
|
236
|
-
elif consumer_type == 'failover':
|
|
237
|
-
ctype = pulsar.ConsumerType.Failover
|
|
238
243
|
else:
|
|
239
244
|
ctype = pulsar.ConsumerType.Shared
|
|
240
245
|
|
|
@@ -311,14 +311,14 @@ class RabbitMQBackend:
|
|
|
311
311
|
|
|
312
312
|
cls, topicspace, topic = parts
|
|
313
313
|
|
|
314
|
-
if cls
|
|
314
|
+
if cls == 'flow':
|
|
315
315
|
durable = True
|
|
316
|
-
elif cls in ('request', 'response'):
|
|
316
|
+
elif cls in ('request', 'response', 'notify'):
|
|
317
317
|
durable = False
|
|
318
318
|
else:
|
|
319
319
|
raise ValueError(
|
|
320
320
|
f"Invalid queue class: {cls}, "
|
|
321
|
-
f"expected flow, request, response, or
|
|
321
|
+
f"expected flow, request, response, or notify"
|
|
322
322
|
)
|
|
323
323
|
|
|
324
324
|
# Exchange per topicspace, routing key includes class
|
|
@@ -345,26 +345,19 @@ class RabbitMQBackend:
|
|
|
345
345
|
|
|
346
346
|
def create_consumer(self, topic: str, subscription: str, schema: type,
|
|
347
347
|
initial_position: str = 'latest',
|
|
348
|
-
consumer_type: str = 'shared',
|
|
349
348
|
**options) -> BackendConsumer:
|
|
350
349
|
"""Create a consumer with a queue bound to the topic exchange.
|
|
351
350
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
351
|
+
Behaviour is determined by the topic's class prefix:
|
|
352
|
+
- flow: named durable queue, competing consumers (round-robin)
|
|
353
|
+
- request: named non-durable queue, competing consumers
|
|
354
|
+
- response: anonymous ephemeral queue, per-subscriber (auto-delete)
|
|
355
|
+
- notify: anonymous ephemeral queue, per-subscriber (auto-delete)
|
|
356
356
|
"""
|
|
357
357
|
exchange, routing_key, cls, durable = self._parse_queue_id(topic)
|
|
358
358
|
|
|
359
|
-
if
|
|
360
|
-
#
|
|
361
|
-
# Retains messages so late-starting processors see current state.
|
|
362
|
-
queue_name = f"{exchange}.{routing_key}.{subscription}"
|
|
363
|
-
queue_durable = True
|
|
364
|
-
exclusive = False
|
|
365
|
-
auto_delete = False
|
|
366
|
-
elif consumer_type == 'exclusive':
|
|
367
|
-
# Broadcast: anonymous queue, auto-deleted on disconnect
|
|
359
|
+
if cls in ('response', 'notify'):
|
|
360
|
+
# Per-subscriber: anonymous queue, auto-deleted on disconnect
|
|
368
361
|
queue_name = ''
|
|
369
362
|
queue_durable = False
|
|
370
363
|
exclusive = True
|
|
@@ -379,7 +372,7 @@ class RabbitMQBackend:
|
|
|
379
372
|
logger.debug(
|
|
380
373
|
f"Creating consumer: exchange={exchange}, "
|
|
381
374
|
f"routing_key={routing_key}, queue={queue_name or '(anonymous)'}, "
|
|
382
|
-
f"
|
|
375
|
+
f"cls={cls}"
|
|
383
376
|
)
|
|
384
377
|
|
|
385
378
|
return RabbitMQBackendConsumer(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.24"
|
|
@@ -43,7 +43,7 @@ class DocumentRagClient(BaseClient):
|
|
|
43
43
|
user: User identifier
|
|
44
44
|
collection: Collection identifier
|
|
45
45
|
chunk_callback: Optional callback(text, end_of_stream) for text chunks
|
|
46
|
-
explain_callback: Optional callback(explain_id, explain_graph) for explain notifications
|
|
46
|
+
explain_callback: Optional callback(explain_id, explain_graph, explain_triples) for explain notifications
|
|
47
47
|
timeout: Request timeout in seconds
|
|
48
48
|
|
|
49
49
|
Returns:
|
|
@@ -55,7 +55,7 @@ class DocumentRagClient(BaseClient):
|
|
|
55
55
|
# Handle explain notifications (response is None/empty, explain_id present)
|
|
56
56
|
if x.explain_id and not x.response:
|
|
57
57
|
if explain_callback:
|
|
58
|
-
explain_callback(x.explain_id, x.explain_graph)
|
|
58
|
+
explain_callback(x.explain_id, x.explain_graph, x.explain_triples)
|
|
59
59
|
return False # Continue receiving
|
|
60
60
|
|
|
61
61
|
# Handle text chunks
|
|
@@ -47,7 +47,7 @@ class GraphRagClient(BaseClient):
|
|
|
47
47
|
user: User identifier
|
|
48
48
|
collection: Collection identifier
|
|
49
49
|
chunk_callback: Optional callback(text, end_of_stream) for text chunks
|
|
50
|
-
explain_callback: Optional callback(explain_id, explain_graph) for explain notifications
|
|
50
|
+
explain_callback: Optional callback(explain_id, explain_graph, explain_triples) for explain notifications
|
|
51
51
|
timeout: Request timeout in seconds
|
|
52
52
|
|
|
53
53
|
Returns:
|
|
@@ -59,7 +59,7 @@ class GraphRagClient(BaseClient):
|
|
|
59
59
|
# Handle explain notifications
|
|
60
60
|
if x.message_type == 'explain':
|
|
61
61
|
if explain_callback and x.explain_id:
|
|
62
|
-
explain_callback(x.explain_id, x.explain_graph)
|
|
62
|
+
explain_callback(x.explain_id, x.explain_graph, x.explain_triples)
|
|
63
63
|
return False # Continue receiving
|
|
64
64
|
|
|
65
65
|
# Handle text chunks
|
|
@@ -465,11 +465,18 @@ def exploration_triples(
|
|
|
465
465
|
return triples
|
|
466
466
|
|
|
467
467
|
|
|
468
|
-
def _quoted_triple(s
|
|
469
|
-
"""Create a quoted triple term (RDF-star)
|
|
468
|
+
def _quoted_triple(s, p, o) -> Term:
|
|
469
|
+
"""Create a quoted triple term (RDF-star).
|
|
470
|
+
|
|
471
|
+
Accepts either Term objects (preserving original types) or plain
|
|
472
|
+
strings (treated as IRIs for backward compatibility).
|
|
473
|
+
"""
|
|
474
|
+
s_term = s if isinstance(s, Term) else _iri(s)
|
|
475
|
+
p_term = p if isinstance(p, Term) else _iri(p)
|
|
476
|
+
o_term = o if isinstance(o, Term) else _iri(o)
|
|
470
477
|
return Term(
|
|
471
478
|
type=TRIPLE,
|
|
472
|
-
triple=Triple(s=
|
|
479
|
+
triple=Triple(s=s_term, p=p_term, o=o_term)
|
|
473
480
|
)
|
|
474
481
|
|
|
475
482
|
|
|
@@ -6,10 +6,10 @@ def queue(topic, cls='flow', topicspace='tg'):
|
|
|
6
6
|
Args:
|
|
7
7
|
topic: The logical queue name (e.g. 'config', 'librarian')
|
|
8
8
|
cls: Queue class determining operational characteristics:
|
|
9
|
-
- 'flow' = persistent
|
|
10
|
-
- 'request' = non-persistent
|
|
11
|
-
- 'response' = non-persistent
|
|
12
|
-
- '
|
|
9
|
+
- 'flow' = persistent shared work queue (competing consumers)
|
|
10
|
+
- 'request' = non-persistent RPC request queue (shared)
|
|
11
|
+
- 'response' = non-persistent RPC response queue (per-subscriber)
|
|
12
|
+
- 'notify' = ephemeral broadcast (per-subscriber, auto-delete)
|
|
13
13
|
topicspace: Deployment isolation prefix (default: 'tg')
|
|
14
14
|
|
|
15
15
|
Returns:
|
|
@@ -20,7 +20,7 @@ def queue(topic, cls='flow', topicspace='tg'):
|
|
|
20
20
|
# flow:tg:text-completion-request
|
|
21
21
|
queue('config', cls='request')
|
|
22
22
|
# request:tg:config
|
|
23
|
-
queue('config', cls='
|
|
24
|
-
#
|
|
23
|
+
queue('config', cls='notify')
|
|
24
|
+
# notify:tg:config
|
|
25
25
|
"""
|
|
26
26
|
return f"{cls}:{topicspace}:{topic}"
|
|
@@ -62,7 +62,7 @@ class ConfigPush:
|
|
|
62
62
|
|
|
63
63
|
config_request_queue = queue('config', cls='request')
|
|
64
64
|
config_response_queue = queue('config', cls='response')
|
|
65
|
-
config_push_queue = queue('config', cls='
|
|
65
|
+
config_push_queue = queue('config', cls='notify')
|
|
66
66
|
|
|
67
67
|
############################################################################
|
|
68
68
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-base
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.24
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.22"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/collection_config_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/document_embeddings_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_client.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_query_service.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_store_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/row_embeddings_query_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/structured_query_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/document_embeddings_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/graph_embeddings_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/row_embeddings_client.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/triples_query_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/collection.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/config.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/diagnosis.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/embeddings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/knowledge.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/library.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/metadata.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/nlp_query.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/primitives.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/prompt.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/retrieval.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/rows_query.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/sparql_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/triples.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/sparql_query.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/structured_query.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/tool_service.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|