Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Surya Narayana
/
ai-workforce-rasa
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
4f78bb67
authored
Feb 17, 2021
by
Sai Komuravelli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
parse issue in action
parent
e5d94077
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
actions/actions.py
actions/actions.py
View file @
4f78bb67
...
...
@@ -102,18 +102,21 @@ class greet_primary_information(FormAction):
def
validate_askques
(
self
,
value
:
Text
,
dispatcher
:
CollectingDispatcher
,
tracker
:
Tracker
,
domain
:
Dict
[
Text
,
Any
],)
->
Dict
[
Text
,
Any
]:
print
(
'in validate askques'
)
intentname
=
tracker
.
events
[
-
1
][
'parse_data'
][
'intent'
][
'name'
]
confidence
=
tracker
.
events
[
-
1
][
'parse_data'
][
'intent'
][
'confidence'
]
print
(
tracker
.
events
)
#intentname=tracker.events[-1]['parse_data']['intent']['name']
intentname
=
"greet"
#confidence=tracker.events[-1]['parse_data']['intent']['confidence']
confidence
=
0.8
slot_to_fill
=
value
.
lower
()
print
(
"askques"
)
print
(
slot_to_fill
)
print
(
value
)
if
slot_to_fill
==
"yes"
:
print
(
'in yes askq'
)
return
{
"askques"
:
"yes"
,
'skills'
:
None
,
"intentname"
:
intentname
,
"confidence"
:
confidence
,
"refferals"
:
"empty"
,
"mobilenumber"
:
"None"
,
"email"
:
"None"
}
elif
slot_to_fill
==
"no"
:
return
{
"askques"
:
"yes"
,
'skills'
:
None
,
"intentname"
:
"affirm"
,
"confidence"
:
0.8
,
"refferals"
:
"empty"
,
"mobilenumber"
:
"None"
,
"email"
:
"None"
}
elif
slot_to_fill
==
"no"
:
print
(
'askques-no'
)
return
{
"askques"
:
"no"
,
"refferals"
:
None
,
"intentname"
:
intentname
,
"confidence"
:
confidence
}
return
{
"askques"
:
"no"
,
"refferals"
:
None
,
"intentname"
:
"deny"
,
"confidence"
:
0.8
}
else
:
print
(
"------------None------------"
)
return
{
"askques"
:
None
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment