File size: 355 Bytes
e9da344 3fbe4b5 e9da344 6560afd e9da344 6560afd e9da344 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import json
from dialogue_engine import DialogueEngine
with open("persona_keisuke.json", "r", encoding="utf-8") as f:
persona = json.load(f)
with open("keisuke_response_template.json", "r", encoding="utf-8") as f:
templates = json.load(f)
engine = DialogueEngine(persona, templates)
def chat(user_input):
return engine.respond(user_input)
|