mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix: require memory schema fields by action
This commit is contained in:
parent
ae1f058b3c
commit
5b24c0fa85
2 changed files with 62 additions and 0 deletions
|
|
@ -560,6 +560,29 @@ MEMORY_SCHEMA = {
|
|||
},
|
||||
},
|
||||
"required": ["action", "target"],
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {"action": {"const": "add"}},
|
||||
"required": ["action"],
|
||||
},
|
||||
"then": {"required": ["content"]},
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {"action": {"const": "replace"}},
|
||||
"required": ["action"],
|
||||
},
|
||||
"then": {"required": ["old_text", "content"]},
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {"action": {"const": "remove"}},
|
||||
"required": ["action"],
|
||||
},
|
||||
"then": {"required": ["old_text"]},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue