Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Xander Fox
/
yandex-business-work
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a5e92513
authored
Aug 08, 2023
by
Полина Бел
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
правки по отчету
1 parent
b091df8d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
8 deletions
app/commonReactions/repeatAndPing.dsl
app/intents.json
app/main.dsl
app/phrasemap.json
app/commonReactions/repeatAndPing.dsl
View file @
a5e9251
...
...
@@ -47,6 +47,9 @@ digression repeat
do
{
$cjm.push("repeat_dig");
if(digression.repeat.counter == 1){
set $conversation_result = "автоответчик";
}
if (digression.repeat.counter == digression.repeat.retriesLimit)
{
goto hangup;
...
...
@@ -68,7 +71,7 @@ digression repeat
}
}
digression ping
/*
digression ping
{
conditions { on #messageHasAnyIntent(digression.ping.triggers) and !#messageHasIntent("greeting") priority -100; }
var retriesLimit = 2;
...
...
@@ -96,7 +99,7 @@ digression ping
{
hangup: goto repeat_or_ping_hangup;
}
}
}
*/
node repeat_or_ping_hangup
{
...
...
app/intents.json
View file @
a5e9251
This diff is collapsed.
Click to expand it.
app/main.dsl
View file @
a5e9251
...
...
@@ -15,6 +15,7 @@ context {
// Сохраняемая информация по клиенту
output client_agreed: boolean = false;
output been_presentation: boolean = false;
}
external function numbers_from_text(text: string): string;
...
...
@@ -68,6 +69,7 @@ node caller_id
// Запоминаем временной штамп перед самой первой репликой
set $conversation_begin = #getCurrentTime();
digression disable forhowlong;
if(#say("first_hello", interruptible:true, options:
{
interruptConditions:["robot_marker", "answering_machine"]
...
...
@@ -124,15 +126,17 @@ node presentation
do
{
$cjm.push("presentation");
if (#say("presentation", interruptible: true, options: {repeatMode: "short"}))
set $been_presentation = true;
#say("presentation");
digression enable forhowlong;
var result = blockcall SkipMessagesBlock();
wait *;
}
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");
negative: goto yandex_guaranteed on #messageHas
Intent("decline"
) || #messageHasSentiment("negative");
negative: goto yandex_guaranteed on #messageHas
AnyIntent(["not_interested", "decline"]
) || #messageHasSentiment("negative");
}
onexit
{
...
...
@@ -156,7 +160,7 @@ node letme_40sec
}
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");
}
onexit
...
...
@@ -434,7 +438,7 @@ digression what_price
digression send_on_mail
{
conditions { on #messageHas
Intent("send_on_mail"
); }
conditions { on #messageHas
AnyIntent(["send_on_mail", "send_me"]
); }
do
{
...
...
@@ -446,6 +450,7 @@ digression send_on_mail
}
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"]);
negative: goto yandex_guaranteed on #messageHasAnyIntent(["not_interested", "decline"]);
}
...
...
@@ -732,3 +737,59 @@ digression not_lpr
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
app/phrasemap.json
View file @
a5e9251
...
...
@@ -215,6 +215,16 @@
{
"text"
:
"Да, я робот. Надеюсь это не повлияет на наш дальнейший диалог"
}
],
"forhowlong"
:
[
{
"text"
:
"диалог с коллегой минут 10-15 займет, когда ему лучше всего вам набрать?"
}
],
"when_call"
:
[
{
"text"
:
"менеджер перезвонит в ближайшее время, назовите, когда лучше всего набрать ему?"
}
]
},
"types"
:
{},
...
...
@@ -250,7 +260,9 @@
"dont_understand_question"
:
{},
"i_can_hear_you"
:
{},
"i_said"
:
{},
"yes_i_am_a_robot"
:
{}
"yes_i_am_a_robot"
:
{},
"forhowlong"
:
{},
"when_call"
:
{}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment