Cache Mode
{
"type": "automata",
"id": "chat_demo",
"initial": "chat_page_state",
"properties": {
"cache": true
},
"states": {
"chat_page_state": {
"inputs": {
"user_message": {
"type": "IM",
"user_input": true
}
},
"tasks": [
{
"name": "generate_reply",
"module_type": "AnyWidgetModule",
"module_config": {
"widget_id": "1744214024104448000", // GPT 3.5
"system_prompt": "You are a teacher teaching Pro Config.",
"user_prompt": "{{user_message}}",
"output_name": "reply",
"cache": true
}
},
{
"name": "generate_voice",
"module_type": "AnyWidgetModule",
"module_config": {
"widget_id": "1743159010695057408", // TTS widget (Samantha)
"content": "{{reply}}",
"output_name": "reply_voice",
"cache": true
}
}
],
"render": {
"text": "{{reply}}",
"audio": "{{reply_voice}}"
},
"transitions": {
"CHAT": "chat_page_state"
}
}
}
}

Last updated