feat: plan deterministic generated conversations
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
[gd_resource type="Resource" script_class="ConversationIntentCatalog" load_steps=18 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://simulation/dialogue/ConversationIntentCatalog.gd" id="1_catalog"]
|
||||
[ext_resource type="Script" path="res://simulation/dialogue/ConversationIntentDefinition.gd" id="2_intent"]
|
||||
|
||||
[sub_resource type="Resource" id="Intent_greet"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"greet"
|
||||
response_intent_ids = Array[StringName]([&"ask_work", &"ask_wellbeing", &"ask_what_happened", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_ask_work"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"ask_work"
|
||||
response_intent_ids = Array[StringName]([&"describe_need", &"report_progress", &"share_fact", &"ask_who_else", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_ask_wellbeing"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"ask_wellbeing"
|
||||
response_intent_ids = Array[StringName]([&"describe_need", &"share_fact", &"offer_help", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_ask_what_happened"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"ask_what_happened"
|
||||
response_intent_ids = Array[StringName]([&"share_fact", &"ask_who_else", &"offer_help", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_share_fact"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"share_fact"
|
||||
response_intent_ids = Array[StringName]([&"ask_what_happened", &"ask_who_else", &"acknowledge_supersession", &"thank", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_describe_need"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"describe_need"
|
||||
response_intent_ids = Array[StringName]([&"offer_help", &"decline", &"ask_who_else", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_ask_who_else"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"ask_who_else"
|
||||
response_intent_ids = Array[StringName]([&"share_fact", &"offer_help", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_offer_help"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"offer_help"
|
||||
response_intent_ids = Array[StringName]([&"accept", &"decline", &"renegotiate"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_accept"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"accept"
|
||||
response_intent_ids = Array[StringName]([&"thank", &"report_progress", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_decline"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"decline"
|
||||
response_intent_ids = Array[StringName]([&"reproach", &"renegotiate", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_report_progress"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"report_progress"
|
||||
response_intent_ids = Array[StringName]([&"thank", &"renegotiate", &"acknowledge_supersession", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_renegotiate"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"renegotiate"
|
||||
response_intent_ids = Array[StringName]([&"accept", &"decline", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_thank"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"thank"
|
||||
response_intent_ids = Array[StringName]([&"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_reproach"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"reproach"
|
||||
response_intent_ids = Array[StringName]([&"acknowledge_supersession", &"renegotiate", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_acknowledge_supersession"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"acknowledge_supersession"
|
||||
response_intent_ids = Array[StringName]([&"thank", &"goodbye"])
|
||||
|
||||
[sub_resource type="Resource" id="Intent_goodbye"]
|
||||
script = ExtResource("2_intent")
|
||||
intent_id = &"goodbye"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_catalog")
|
||||
intents = Array[ExtResource("2_intent")]([SubResource("Intent_greet"), SubResource("Intent_ask_work"), SubResource("Intent_ask_wellbeing"), SubResource("Intent_ask_what_happened"), SubResource("Intent_share_fact"), SubResource("Intent_describe_need"), SubResource("Intent_ask_who_else"), SubResource("Intent_offer_help"), SubResource("Intent_accept"), SubResource("Intent_decline"), SubResource("Intent_report_progress"), SubResource("Intent_renegotiate"), SubResource("Intent_thank"), SubResource("Intent_reproach"), SubResource("Intent_acknowledge_supersession"), SubResource("Intent_goodbye")])
|
||||
@@ -0,0 +1,42 @@
|
||||
[gd_resource type="Resource" script_class="ConversationTemplateCatalog" load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://simulation/dialogue/ConversationTemplateCatalog.gd" id="1_catalog"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_catalog")
|
||||
line_templates = {
|
||||
"accept": ["That works for me.", "Yes, let us do that."],
|
||||
"acknowledge_supersession": ["Things have changed since then; I understand.", "That news has overtaken our earlier plan."],
|
||||
"ask_wellbeing": ["How have you been, {listener}?", "Are you keeping well, {listener}?"],
|
||||
"ask_what_happened": ["What happened with {topic}?", "Tell me what happened around {topic}."],
|
||||
"ask_who_else": ["Who else knows about {topic}?", "Who else should hear about {topic}?"],
|
||||
"ask_work": ["What work is keeping you busy?", "What are you working on today?"],
|
||||
"decline": ["I cannot agree to that.", "No, I cannot take that on."],
|
||||
"describe_need": ["We need help with {topic}.", "The pressing need is {topic}."],
|
||||
"goodbye": ["Until next time.", "Farewell for now."],
|
||||
"greet": ["Good to see you, {listener}.", "Peace to you, {listener}."],
|
||||
"offer_help": ["I can help with {topic}.", "Let me lend a hand with {topic}."],
|
||||
"renegotiate": ["We should revise the plan for {topic}.", "Can we find another way to handle {topic}?"],
|
||||
"report_progress": ["There has been progress on {topic}.", "The work on {topic} is moving forward."],
|
||||
"reproach": ["You left {topic} unresolved.", "I expected better over {topic}."],
|
||||
"share_fact": ["I learned something about {topic}.", "There is news concerning {topic}."],
|
||||
"thank": ["Thank you for your help.", "You have my thanks."]
|
||||
}
|
||||
option_templates = {
|
||||
"accept": ["Accept.", "Agree to the plan."],
|
||||
"acknowledge_supersession": ["Acknowledge that events changed."],
|
||||
"ask_wellbeing": ["Ask how they are."],
|
||||
"ask_what_happened": ["Ask what happened."],
|
||||
"ask_who_else": ["Ask who else knows."],
|
||||
"ask_work": ["Ask about their work."],
|
||||
"decline": ["Decline.", "Say you cannot help."],
|
||||
"describe_need": ["Describe the need."],
|
||||
"goodbye": ["Say goodbye."],
|
||||
"greet": ["Greet them."],
|
||||
"offer_help": ["Offer help with {topic}."],
|
||||
"renegotiate": ["Propose a different plan."],
|
||||
"report_progress": ["Report progress."],
|
||||
"reproach": ["Reproach them."],
|
||||
"share_fact": ["Share what you know."],
|
||||
"thank": ["Thank them."]
|
||||
}
|
||||
Reference in New Issue
Block a user