feat(zero-core): add non-persona system dialogue runtime
This commit is contained in:
parent
1edff8a72f
commit
9a7b454e89
13 changed files with 380 additions and 4 deletions
|
|
@ -12,6 +12,7 @@ import hashlib
|
|||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
REPO = Path(__file__).resolve().parents[2]
|
||||
|
|
@ -167,7 +168,8 @@ def main() -> int:
|
|||
else:
|
||||
if not args.event:
|
||||
raise SystemExit("--event is required for perceive")
|
||||
value = body.perceive(json.loads(Path(args.event).read_text(encoding="utf-8")))
|
||||
event = json.load(sys.stdin) if args.event == "-" else json.loads(Path(args.event).read_text(encoding="utf-8"))
|
||||
value = body.perceive(event)
|
||||
print(json.dumps(value, ensure_ascii=False, indent=2))
|
||||
return 0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue