mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 03:31:02 +02:00
API linkage complete
This commit is contained in:
parent
dbd20ea901
commit
86d2ce2f34
2 changed files with 18 additions and 4 deletions
|
|
@ -95,6 +95,16 @@ class Processor(ConsumerProducer):
|
|||
answer=None,
|
||||
error=None,
|
||||
thought=thought,
|
||||
observation=None,
|
||||
)
|
||||
|
||||
self.producer.send(r, properties={"id": id})
|
||||
|
||||
r = AgentResponse(
|
||||
answer=None,
|
||||
error=None,
|
||||
thought=None,
|
||||
observation="I have imagined myself",
|
||||
)
|
||||
|
||||
self.producer.send(r, properties={"id": id})
|
||||
|
|
@ -118,10 +128,14 @@ class Processor(ConsumerProducer):
|
|||
|
||||
self.recursive_input.send(r, properties={"id": id})
|
||||
|
||||
print("Done.", flush=True)
|
||||
|
||||
return
|
||||
|
||||
else:
|
||||
|
||||
print("Send response...", flush=True)
|
||||
|
||||
r = AgentResponse(
|
||||
answer="Here is the answer",
|
||||
error=None,
|
||||
|
|
@ -130,6 +144,8 @@ class Processor(ConsumerProducer):
|
|||
|
||||
self.producer.send(r, properties={"id": id})
|
||||
|
||||
print("Done.", flush=True)
|
||||
|
||||
return
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue