Commit a5e92513 by Полина Бел

правки по отчету

1 parent b091df8d
...@@ -47,6 +47,9 @@ digression repeat ...@@ -47,6 +47,9 @@ digression repeat
do do
{ {
$cjm.push("repeat_dig"); $cjm.push("repeat_dig");
if(digression.repeat.counter == 1){
set $conversation_result = "автоответчик";
}
if (digression.repeat.counter == digression.repeat.retriesLimit) if (digression.repeat.counter == digression.repeat.retriesLimit)
{ {
goto hangup; goto hangup;
...@@ -68,7 +71,7 @@ digression repeat ...@@ -68,7 +71,7 @@ digression repeat
} }
} }
digression ping /*digression ping
{ {
conditions { on #messageHasAnyIntent(digression.ping.triggers) and !#messageHasIntent("greeting") priority -100; } conditions { on #messageHasAnyIntent(digression.ping.triggers) and !#messageHasIntent("greeting") priority -100; }
var retriesLimit = 2; var retriesLimit = 2;
...@@ -96,7 +99,7 @@ digression ping ...@@ -96,7 +99,7 @@ digression ping
{ {
hangup: goto repeat_or_ping_hangup; hangup: goto repeat_or_ping_hangup;
} }
} }*/
node repeat_or_ping_hangup node repeat_or_ping_hangup
{ {
......
...@@ -15,6 +15,7 @@ context { ...@@ -15,6 +15,7 @@ context {
// Сохраняемая информация по клиенту // Сохраняемая информация по клиенту
output client_agreed: boolean = false; output client_agreed: boolean = false;
output been_presentation: boolean = false;
} }
external function numbers_from_text(text: string): string; external function numbers_from_text(text: string): string;
...@@ -68,6 +69,7 @@ node caller_id ...@@ -68,6 +69,7 @@ node caller_id
// Запоминаем временной штамп перед самой первой репликой // Запоминаем временной штамп перед самой первой репликой
set $conversation_begin = #getCurrentTime(); set $conversation_begin = #getCurrentTime();
digression disable forhowlong;
if(#say("first_hello", interruptible:true, options: if(#say("first_hello", interruptible:true, options:
{ {
interruptConditions:["robot_marker", "answering_machine"] interruptConditions:["robot_marker", "answering_machine"]
...@@ -124,15 +126,17 @@ node presentation ...@@ -124,15 +126,17 @@ node presentation
do do
{ {
$cjm.push("presentation"); $cjm.push("presentation");
set $been_presentation = true;
if (#say("presentation", interruptible: true, options: {repeatMode: "short"})) #say("presentation");
digression enable forhowlong;
var result = blockcall SkipMessagesBlock(); var result = blockcall SkipMessagesBlock();
wait *; wait *;
} }
transitions transitions
{ {
call_later: goto call_later on #messageHasAnyIntent(["cant_talk_rn", "call_later"]) && !#messageHasAnyIntent(["accept", "agree", "not_interested", "decline"]);
positive: goto last_word on #messageHasAnyIntent(["accept", "agree"]) || #messageHasSentiment("positive"); positive: goto last_word on #messageHasAnyIntent(["accept", "agree"]) || #messageHasSentiment("positive");
negative: goto yandex_guaranteed on #messageHasIntent("decline") || #messageHasSentiment("negative"); negative: goto yandex_guaranteed on #messageHasAnyIntent(["not_interested", "decline"]) || #messageHasSentiment("negative");
} }
onexit onexit
{ {
...@@ -156,7 +160,7 @@ node letme_40sec ...@@ -156,7 +160,7 @@ node letme_40sec
} }
transitions transitions
{ {
positive: goto presentation on #messageHasAnyIntent(["accept", "agree"]) || #messageHasSentiment("positive"); positive: goto presentation on #messageHasAnyIntent(["accept", "agree", "what_question"]) || #messageHasSentiment("positive");
negative: goto call_later on #messageHasAnyIntent(["decline", "not_interested"]) || #messageHasSentiment("negative"); negative: goto call_later on #messageHasAnyIntent(["decline", "not_interested"]) || #messageHasSentiment("negative");
} }
onexit onexit
...@@ -434,7 +438,7 @@ digression what_price ...@@ -434,7 +438,7 @@ digression what_price
digression send_on_mail digression send_on_mail
{ {
conditions { on #messageHasIntent("send_on_mail"); } conditions { on #messageHasAnyIntent(["send_on_mail", "send_me"]); }
do do
{ {
...@@ -446,6 +450,7 @@ digression send_on_mail ...@@ -446,6 +450,7 @@ digression send_on_mail
} }
transitions transitions
{ {
call_later: goto call_later on #messageHasAnyIntent(["cant_talk_rn", "call_later"]) && !#messageHasAnyIntent(["accept", "agree", "not_interested", "decline"]);
positive: goto last_word on #messageHasAnyIntent(["accept", "agree"]); positive: goto last_word on #messageHasAnyIntent(["accept", "agree"]);
negative: goto yandex_guaranteed on #messageHasAnyIntent(["not_interested", "decline"]); negative: goto yandex_guaranteed on #messageHasAnyIntent(["not_interested", "decline"]);
} }
...@@ -732,3 +737,59 @@ digression not_lpr ...@@ -732,3 +737,59 @@ digression not_lpr
onexit onexit
{} {}
} }
digression forhowlong
{
conditions { on #messageHasIntent("forhowlong"); }
do
{
$cjm.push("forhowlong_dig");
digression disable { forhowlong };
#say("forhowlong", repeatMode: "ignore");
var result = blockcall SkipMessagesBlock();
wait*;
}
transitions
{
what_question: goto presentation on #messageHasIntent("what_question");
positive: goto last_word on true && !#messageHasAnyIntent(["not_interested", "decline"]);
negative: goto yandex_guaranteed on #messageHasAnyIntent(["not_interested", "decline"]);
}
onexit
{
positive: do {
set $conversation_result = "согласие";
}
}
}
digression when_call
{
conditions { on #messageHasIntent("when_call"); }
do
{
$cjm.push("when_call_dig");
digression disable { when_call };
#say("when_call", repeatMode: "ignore");
var result = blockcall SkipMessagesBlock();
wait*;
}
transitions
{
what_question: goto presentation on #messageHasIntent("what_question");
positive: goto last_word on true && !#messageHasAnyIntent(["not_interested", "decline"]);
negative: goto yandex_guaranteed on #messageHasAnyIntent(["not_interested", "decline"]);
}
onexit
{
positive: do {
set $conversation_result = "согласие";
}
}
}
\ No newline at end of file
...@@ -215,6 +215,16 @@ ...@@ -215,6 +215,16 @@
{ {
"text": "Да, я робот. Надеюсь это не повлияет на наш дальнейший диалог" "text": "Да, я робот. Надеюсь это не повлияет на наш дальнейший диалог"
} }
],
"forhowlong": [
{
"text": "диалог с коллегой минут 10-15 займет, когда ему лучше всего вам набрать?"
}
],
"when_call": [
{
"text": "менеджер перезвонит в ближайшее время, назовите, когда лучше всего набрать ему?"
}
] ]
}, },
"types": {}, "types": {},
...@@ -250,7 +260,9 @@ ...@@ -250,7 +260,9 @@
"dont_understand_question": {}, "dont_understand_question": {},
"i_can_hear_you": {}, "i_can_hear_you": {},
"i_said": {}, "i_said": {},
"yes_i_am_a_robot": {} "yes_i_am_a_robot": {},
"forhowlong": {},
"when_call": {}
} }
} }
} }
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!