mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 03:31:02 +02:00
Fixing service wiring
This commit is contained in:
parent
942f7854f7
commit
3d61ecd060
2 changed files with 12 additions and 2 deletions
|
|
@ -251,8 +251,17 @@ class ToolServiceImpl:
|
|||
from trustgraph.schema import ToolServiceRequest, ToolServiceResponse
|
||||
import uuid
|
||||
|
||||
request_topic = f"{self.service_topic}-request"
|
||||
response_topic = f"{self.service_topic}-response"
|
||||
# Construct full topic paths using non-persistent topics
|
||||
# If topic already contains "://", assume it's a full Pulsar URI
|
||||
# Otherwise, construct default path
|
||||
if '://' in self.service_topic:
|
||||
# Full Pulsar URI provided
|
||||
request_topic = f"{self.service_topic}-request"
|
||||
response_topic = f"{self.service_topic}-response"
|
||||
else:
|
||||
# Construct default path matching DynamicToolService pattern
|
||||
request_topic = f"non-persistent://tg/request/{self.service_topic}-request"
|
||||
response_topic = f"non-persistent://tg/response/{self.service_topic}-response"
|
||||
|
||||
request_metrics = ProducerMetrics(
|
||||
processor=self.processor.id,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ from ... base import DynamicToolService
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
default_ident = "joke-service"
|
||||
default_topic = "joke"
|
||||
|
||||
# Joke database organized by topic and style
|
||||
JOKES = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue