mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
Schema structure refactor (#451)
* Write schema refactor spec * Implemented schema refactor spec
This commit is contained in:
parent
f4733021c5
commit
5de56c5dbc
27 changed files with 370 additions and 223 deletions
30
trustgraph-base/trustgraph/schema/services/agent.py
Normal file
30
trustgraph-base/trustgraph/schema/services/agent.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
from pulsar.schema import Record, String, Array, Map
|
||||
|
||||
from ..core.topic import topic
|
||||
from ..core.primitives import Error
|
||||
|
||||
############################################################################
|
||||
|
||||
# Prompt services, abstract the prompt generation
|
||||
|
||||
class AgentStep(Record):
|
||||
thought = String()
|
||||
action = String()
|
||||
arguments = Map(String())
|
||||
observation = String()
|
||||
|
||||
class AgentRequest(Record):
|
||||
question = String()
|
||||
plan = String()
|
||||
state = String()
|
||||
history = Array(AgentStep())
|
||||
|
||||
class AgentResponse(Record):
|
||||
answer = String()
|
||||
error = Error()
|
||||
thought = String()
|
||||
observation = String()
|
||||
|
||||
############################################################################
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue