mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-21 19:21:03 +02:00
Agent schema
This commit is contained in:
parent
ae8661fe2e
commit
4b102facb1
1 changed files with 35 additions and 0 deletions
35
trustgraph-base/trustgraph/schema/agent.py
Normal file
35
trustgraph-base/trustgraph/schema/agent.py
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
|
||||||
|
from pulsar.schema import Record, Bytes, String, Boolean, Array, Map, Integer
|
||||||
|
|
||||||
|
from . topic import topic
|
||||||
|
from . types import Error, RowSchema
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
# Prompt services, abstract the prompt generation
|
||||||
|
|
||||||
|
class AgentStep(Record):
|
||||||
|
thought = String()
|
||||||
|
action = String()
|
||||||
|
action_input = String()
|
||||||
|
observation = String()
|
||||||
|
|
||||||
|
class AgentRequest(Record):
|
||||||
|
question = String()
|
||||||
|
plan = String()
|
||||||
|
history = Array(AgentStep())
|
||||||
|
|
||||||
|
class AgentResponse(Record):
|
||||||
|
answer = String()
|
||||||
|
error = String()
|
||||||
|
thought = String()
|
||||||
|
|
||||||
|
agent_request_queue = topic(
|
||||||
|
'agent', kind='non-persistent', namespace='request'
|
||||||
|
)
|
||||||
|
agent_response_queue = topic(
|
||||||
|
'agent', kind='non-persistent', namespace='response'
|
||||||
|
)
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue