mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 19:51:02 +02:00
MCP client working
This commit is contained in:
parent
e7224e2b14
commit
9b952bae10
2 changed files with 9 additions and 2 deletions
|
|
@ -81,7 +81,7 @@ class ToolService(FlowProcessor):
|
|||
)
|
||||
|
||||
__class__.tool_invocation_metric.labels(
|
||||
id = self.id, flow = self.flow, name = request.name,
|
||||
id = self.id, flow = flow.name, name = request.name,
|
||||
).inc()
|
||||
|
||||
except TooManyRequests as e:
|
||||
|
|
|
|||
|
|
@ -44,10 +44,17 @@ class Service(ToolService):
|
|||
)
|
||||
|
||||
print(result)
|
||||
|
||||
if result.structuredContent:
|
||||
return result.structuredContent
|
||||
elif hasattr(result, "content"):
|
||||
return "".join([
|
||||
x.text
|
||||
for x in result.content
|
||||
])
|
||||
else:
|
||||
return result.unstructuredContent
|
||||
return "No content"
|
||||
|
||||
except BaseExceptionGroup as e:
|
||||
|
||||
for child in e.exceptions:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue