trustgraph-base 2.2.7__tar.gz → 2.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/PKG-INFO +1 -1
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/socket_client.py +0 -17
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/agent_client.py +1 -2
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/agent_service.py +0 -3
- trustgraph_base-2.2.9/trustgraph/base_version.py +1 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/agent.py +25 -24
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/document_loading.py +25 -3
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/agent.py +25 -4
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph_base.egg-info/PKG-INFO +1 -1
- trustgraph_base-2.2.7/trustgraph/base_version.py +0 -1
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/README.md +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/pyproject.toml +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/setup.cfg +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/api.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/async_bulk_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/async_flow.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/async_metrics.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/async_socket_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/bulk_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/collection.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/config.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/exceptions.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/explainability.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/flow.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/knowledge.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/library.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/metrics.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/api/types.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/async_processor.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/backend.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/cassandra_config.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/chunking_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/collection_config_handler.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/consumer.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/consumer_spec.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/document_embeddings_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/document_embeddings_query_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/document_embeddings_store_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/dynamic_tool_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/embeddings_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/embeddings_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/flow.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/flow_processor.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/graph_embeddings_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/graph_embeddings_query_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/graph_embeddings_store_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/graph_rag_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/llm_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/logging.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/metrics.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/parameter_spec.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/producer.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/producer_spec.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/prompt_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/publisher.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/pubsub.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/pulsar_backend.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/request_response_spec.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/row_embeddings_query_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/spec.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/structured_query_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/subscriber.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/subscriber_spec.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/text_completion_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/tool_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/tool_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/tool_service_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/triples_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/triples_query_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/triples_store_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/agent_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/base.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/config_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/document_embeddings_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/document_rag_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/embeddings_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/graph_embeddings_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/graph_rag_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/llm_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/prompt_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/row_embeddings_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/triples_query_client.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/exceptions.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/knowledge/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/knowledge/defs.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/knowledge/document.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/knowledge/organization.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/knowledge/publication.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/log_level.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/registry.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/base.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/collection.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/config.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/diagnosis.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/embeddings.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/embeddings_query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/flow.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/knowledge.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/library.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/metadata.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/nlp_query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/primitives.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/prompt.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/retrieval.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/rows_query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/structured_query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/text_completion.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/tool.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/triples.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/objects/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/objects/field.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/objects/object.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/provenance/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/provenance/agent.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/provenance/namespaces.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/provenance/triples.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/provenance/uris.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/provenance/vocabulary.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/rdf.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/core/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/core/metadata.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/core/primitives.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/core/topic.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/document.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/embeddings.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/graph.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/knowledge.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/nlp.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/object.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/rows.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/knowledge/structured.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/__init__.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/collection.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/config.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/diagnosis.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/flow.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/library.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/llm.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/lookup.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/nlp_query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/prompt.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/retrieval.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/rows_query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/storage.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/structured_query.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/tool_service.py +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph_base.egg-info/SOURCES.txt +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/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.9
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -402,23 +402,6 @@ class SocketClient:
|
|
|
402
402
|
content=resp.get("content", ""),
|
|
403
403
|
end_of_message=resp.get("end_of_message", False)
|
|
404
404
|
)
|
|
405
|
-
# Non-streaming agent format: chunk_type is empty but has thought/observation/answer fields
|
|
406
|
-
elif resp.get("thought"):
|
|
407
|
-
return AgentThought(
|
|
408
|
-
content=resp.get("thought", ""),
|
|
409
|
-
end_of_message=resp.get("end_of_message", False)
|
|
410
|
-
)
|
|
411
|
-
elif resp.get("observation"):
|
|
412
|
-
return AgentObservation(
|
|
413
|
-
content=resp.get("observation", ""),
|
|
414
|
-
end_of_message=resp.get("end_of_message", False)
|
|
415
|
-
)
|
|
416
|
-
elif resp.get("answer"):
|
|
417
|
-
return AgentAnswer(
|
|
418
|
-
content=resp.get("answer", ""),
|
|
419
|
-
end_of_message=resp.get("end_of_message", False),
|
|
420
|
-
end_of_dialog=resp.get("end_of_dialog", False)
|
|
421
|
-
)
|
|
422
405
|
else:
|
|
423
406
|
content = resp.get("response", resp.get("chunk", resp.get("text", "")))
|
|
424
407
|
return RAGChunk(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.9"
|
|
@@ -16,6 +16,14 @@ class AgentRequestTranslator(MessageTranslator):
|
|
|
16
16
|
collection=data.get("collection", "default"),
|
|
17
17
|
streaming=data.get("streaming", False),
|
|
18
18
|
session_id=data.get("session_id", ""),
|
|
19
|
+
conversation_id=data.get("conversation_id", ""),
|
|
20
|
+
pattern=data.get("pattern", ""),
|
|
21
|
+
task_type=data.get("task_type", ""),
|
|
22
|
+
framing=data.get("framing", ""),
|
|
23
|
+
correlation_id=data.get("correlation_id", ""),
|
|
24
|
+
parent_session_id=data.get("parent_session_id", ""),
|
|
25
|
+
subagent_goal=data.get("subagent_goal", ""),
|
|
26
|
+
expected_siblings=data.get("expected_siblings", 0),
|
|
19
27
|
)
|
|
20
28
|
|
|
21
29
|
def from_pulsar(self, obj: AgentRequest) -> Dict[str, Any]:
|
|
@@ -28,6 +36,14 @@ class AgentRequestTranslator(MessageTranslator):
|
|
|
28
36
|
"collection": getattr(obj, "collection", "default"),
|
|
29
37
|
"streaming": getattr(obj, "streaming", False),
|
|
30
38
|
"session_id": getattr(obj, "session_id", ""),
|
|
39
|
+
"conversation_id": getattr(obj, "conversation_id", ""),
|
|
40
|
+
"pattern": getattr(obj, "pattern", ""),
|
|
41
|
+
"task_type": getattr(obj, "task_type", ""),
|
|
42
|
+
"framing": getattr(obj, "framing", ""),
|
|
43
|
+
"correlation_id": getattr(obj, "correlation_id", ""),
|
|
44
|
+
"parent_session_id": getattr(obj, "parent_session_id", ""),
|
|
45
|
+
"subagent_goal": getattr(obj, "subagent_goal", ""),
|
|
46
|
+
"expected_siblings": getattr(obj, "expected_siblings", 0),
|
|
31
47
|
}
|
|
32
48
|
|
|
33
49
|
|
|
@@ -40,24 +56,15 @@ class AgentResponseTranslator(MessageTranslator):
|
|
|
40
56
|
def from_pulsar(self, obj: AgentResponse) -> Dict[str, Any]:
|
|
41
57
|
result = {}
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
if hasattr(obj, 'chunk_type') and obj.chunk_type:
|
|
59
|
+
if obj.chunk_type:
|
|
45
60
|
result["chunk_type"] = obj.chunk_type
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
result["answer"] = obj.answer
|
|
54
|
-
if obj.thought:
|
|
55
|
-
result["thought"] = obj.thought
|
|
56
|
-
if obj.observation:
|
|
57
|
-
result["observation"] = obj.observation
|
|
58
|
-
# Include completion flags for legacy format too
|
|
59
|
-
result["end_of_message"] = getattr(obj, "end_of_message", False)
|
|
60
|
-
result["end_of_dialog"] = getattr(obj, "end_of_dialog", False)
|
|
61
|
+
if obj.content:
|
|
62
|
+
result["content"] = obj.content
|
|
63
|
+
result["end_of_message"] = getattr(obj, "end_of_message", False)
|
|
64
|
+
result["end_of_dialog"] = getattr(obj, "end_of_dialog", False)
|
|
65
|
+
|
|
66
|
+
if getattr(obj, "message_id", ""):
|
|
67
|
+
result["message_id"] = obj.message_id
|
|
61
68
|
|
|
62
69
|
# Include explainability fields if present
|
|
63
70
|
explain_id = getattr(obj, "explain_id", None)
|
|
@@ -76,11 +83,5 @@ class AgentResponseTranslator(MessageTranslator):
|
|
|
76
83
|
|
|
77
84
|
def from_response_with_completion(self, obj: AgentResponse) -> Tuple[Dict[str, Any], bool]:
|
|
78
85
|
"""Returns (response_dict, is_final)"""
|
|
79
|
-
|
|
80
|
-
if hasattr(obj, 'chunk_type') and obj.chunk_type:
|
|
81
|
-
is_final = getattr(obj, 'end_of_dialog', False)
|
|
82
|
-
else:
|
|
83
|
-
# For legacy responses, check if answer is present
|
|
84
|
-
is_final = (obj.answer is not None)
|
|
85
|
-
|
|
86
|
+
is_final = getattr(obj, 'end_of_dialog', False)
|
|
86
87
|
return self.from_pulsar(obj), is_final
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/document_loading.py
RENAMED
|
@@ -4,6 +4,29 @@ from ...schema import Document, TextDocument, Chunk, DocumentEmbeddings, ChunkEm
|
|
|
4
4
|
from .base import SendTranslator
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
def _decode_text_payload(payload: str | bytes, charset: str) -> str:
|
|
8
|
+
"""
|
|
9
|
+
Decode text-load payloads.
|
|
10
|
+
|
|
11
|
+
Historical clients send base64-encoded text, but direct REST callers may
|
|
12
|
+
send raw UTF-8 text. Support both so Unicode text-load requests do not fail
|
|
13
|
+
at the gateway translation layer.
|
|
14
|
+
"""
|
|
15
|
+
if isinstance(payload, bytes):
|
|
16
|
+
if not payload.isascii():
|
|
17
|
+
return payload.decode(charset)
|
|
18
|
+
candidate = payload.decode("ascii")
|
|
19
|
+
else:
|
|
20
|
+
if not payload.isascii():
|
|
21
|
+
return payload
|
|
22
|
+
candidate = payload
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
return base64.b64decode(candidate, validate=True).decode(charset)
|
|
26
|
+
except (ValueError, UnicodeDecodeError):
|
|
27
|
+
return candidate
|
|
28
|
+
|
|
29
|
+
|
|
7
30
|
class DocumentTranslator(SendTranslator):
|
|
8
31
|
"""Translator for Document schema objects (PDF docs etc.)"""
|
|
9
32
|
|
|
@@ -49,8 +72,7 @@ class TextDocumentTranslator(SendTranslator):
|
|
|
49
72
|
def to_pulsar(self, data: Dict[str, Any]) -> TextDocument:
|
|
50
73
|
charset = data.get("charset", "utf-8")
|
|
51
74
|
|
|
52
|
-
|
|
53
|
-
text = base64.b64decode(data["text"]).decode(charset)
|
|
75
|
+
text = _decode_text_payload(data["text"], charset)
|
|
54
76
|
|
|
55
77
|
from ...schema import Metadata
|
|
56
78
|
return TextDocument(
|
|
@@ -169,4 +191,4 @@ class DocumentEmbeddingsTranslator(SendTranslator):
|
|
|
169
191
|
|
|
170
192
|
result["metadata"] = metadata_dict
|
|
171
193
|
|
|
172
|
-
return result
|
|
194
|
+
return result
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
from dataclasses import dataclass, field
|
|
3
|
+
from typing import Optional
|
|
3
4
|
|
|
4
5
|
from ..core.topic import topic
|
|
5
6
|
from ..core.primitives import Error
|
|
@@ -8,6 +9,14 @@ from ..core.primitives import Error
|
|
|
8
9
|
|
|
9
10
|
# Prompt services, abstract the prompt generation
|
|
10
11
|
|
|
12
|
+
@dataclass
|
|
13
|
+
class PlanStep:
|
|
14
|
+
goal: str = ""
|
|
15
|
+
tool_hint: str = "" # Suggested tool for this step
|
|
16
|
+
depends_on: list[int] = field(default_factory=list) # Indices of prerequisite steps
|
|
17
|
+
status: str = "pending" # pending, running, completed, failed
|
|
18
|
+
result: str = "" # Result of step execution
|
|
19
|
+
|
|
11
20
|
@dataclass
|
|
12
21
|
class AgentStep:
|
|
13
22
|
thought: str = ""
|
|
@@ -15,6 +24,9 @@ class AgentStep:
|
|
|
15
24
|
arguments: dict[str, str] = field(default_factory=dict)
|
|
16
25
|
observation: str = ""
|
|
17
26
|
user: str = "" # User context for the step
|
|
27
|
+
step_type: str = "" # "react", "plan", "execute", "decompose", "synthesise"
|
|
28
|
+
plan: list[PlanStep] = field(default_factory=list) # Plan steps (for plan-then-execute)
|
|
29
|
+
subagent_results: dict[str, str] = field(default_factory=dict) # Subagent results keyed by goal
|
|
18
30
|
|
|
19
31
|
@dataclass
|
|
20
32
|
class AgentRequest:
|
|
@@ -27,6 +39,16 @@ class AgentRequest:
|
|
|
27
39
|
streaming: bool = False # Enable streaming response delivery (default false)
|
|
28
40
|
session_id: str = "" # For provenance tracking across iterations
|
|
29
41
|
|
|
42
|
+
# Orchestration fields
|
|
43
|
+
conversation_id: str = "" # Groups related requests into a conversation
|
|
44
|
+
pattern: str = "" # Selected pattern: "react", "plan-then-execute", "supervisor"
|
|
45
|
+
task_type: str = "" # Task type from config: "general", "research", etc.
|
|
46
|
+
framing: str = "" # Domain framing text injected into prompts
|
|
47
|
+
correlation_id: str = "" # Links fan-out subagents to parent for fan-in
|
|
48
|
+
parent_session_id: str = "" # Session ID of the supervisor that spawned this subagent
|
|
49
|
+
subagent_goal: str = "" # Specific goal for a subagent (set by supervisor)
|
|
50
|
+
expected_siblings: int = 0 # Number of sibling subagents in this fan-out
|
|
51
|
+
|
|
30
52
|
@dataclass
|
|
31
53
|
class AgentResponse:
|
|
32
54
|
# Streaming-first design
|
|
@@ -39,11 +61,10 @@ class AgentResponse:
|
|
|
39
61
|
explain_id: str | None = None # Provenance URI (announced as created)
|
|
40
62
|
explain_graph: str | None = None # Named graph where explain was stored
|
|
41
63
|
|
|
42
|
-
#
|
|
43
|
-
|
|
64
|
+
# Orchestration fields
|
|
65
|
+
message_id: str = "" # Unique ID for this response message
|
|
66
|
+
|
|
44
67
|
error: Error | None = None
|
|
45
|
-
thought: str = ""
|
|
46
|
-
observation: str = ""
|
|
47
68
|
|
|
48
69
|
############################################################################
|
|
49
70
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-base
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.9
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.7"
|
|
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.7 → trustgraph_base-2.2.9}/trustgraph/base/collection_config_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/document_embeddings_client.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/document_embeddings_query_service.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/document_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
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/graph_embeddings_query_service.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/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
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/base/row_embeddings_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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/document_embeddings_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/clients/graph_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
|
|
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.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/collection.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/diagnosis.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/embeddings.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/embeddings_query.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/knowledge.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/metadata.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/nlp_query.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/primitives.py
RENAMED
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/retrieval.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/rows_query.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/structured_query.py
RENAMED
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/messaging/translators/text_completion.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph/schema/services/structured_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_base-2.2.7 → trustgraph_base-2.2.9}/trustgraph_base.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|