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
1c8038f6
authored
Nov 12, 2020
by
Ravi Teja
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
no issue fixed
parent
11adf58a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
9 deletions
actions/actions.py
actions/actions.py
View file @
1c8038f6
...
...
@@ -60,15 +60,16 @@ class Primary_information(FormAction):
print
(
'intent'
,
intent
)
print
(
'conf'
,
conf
)
#if intent == "affirm" :
if
intent
!=
"deny"
:
print
(
"IN from deny"
)
#tracker.slots["querytext"] = "no"
return
[
"intentname"
,
"confidence"
,
"querytext"
,
"askques"
,
"email"
,
"mobilenumber"
,
"company"
,
"experience"
,
"skills"
,
"availabletime"
]
else
:
print
(
"IN from deny1"
)
tracker
.
slots
[
"querytext"
]
=
"no"
return
[
"availabletime"
]
# if intent == "affirm" and conf>0.4 :
# print("IN from deny")
# #tracker.slots["querytext"] = "no"
return
[
"intentname"
,
"confidence"
,
"querytext"
,
"askques"
,
"email"
,
"mobilenumber"
,
"company"
,
"experience"
,
"skills"
,
"availabletime"
]
# else:
# print("IN from deny1")
# tracker.slots["querytext"] = "no"
# return["availabletime"]
def
validate_querytext
(
self
,
value
:
Text
,
dispatcher
:
CollectingDispatcher
,
tracker
:
Tracker
,
domain
:
Dict
[
Text
,
Any
],)
->
Dict
[
Text
,
Any
]:
print
(
"------------------------"
)
#print(tracker.events)
...
...
@@ -87,6 +88,25 @@ class Primary_information(FormAction):
break
print
(
'44444444'
)
return
{
"querytext"
:
querytext
,
"intentname"
:
intentname
,
"confidence"
:
confidence
}
def
validate_askques
(
self
,
value
:
Text
,
dispatcher
:
CollectingDispatcher
,
tracker
:
Tracker
,
domain
:
Dict
[
Text
,
Any
],)
->
Dict
[
Text
,
Any
]:
slot_to_fill
=
value
.
lower
()
print
(
"AAA"
)
print
(
slot_to_fill
)
if
slot_to_fill
==
"yes"
:
print
(
"-----------YES in kb-----------------"
)
#print(tracker.get_slot('greathelp'))
return
{
"email"
:
None
,
"mobilenumber"
:
None
,
"company"
:
None
,
"experience"
:
None
,
"skills"
:
None
,
"availabletime"
:
None
}
# return {"CREATE_IMPACT":"empty","sysid":"none","kbarticles":"Yes"}
elif
slot_to_fill
==
"no"
:
print
(
"-----------No-----------------"
)
# print(tracker.get_slot('submit_ticket'))
return
{
"email"
:
"none"
,
"mobilenumber"
:
"none"
,
"company"
:
"none"
,
"experience"
:
"none"
,
"skills"
:
"none"
,
"availabletime"
:
None
}
# return {"kbarticles":"No"}
else
:
print
(
"------------None------------"
)
return
{
"hrarticles"
:
None
}
def
slot_mappings
(
self
)
->
Dict
[
Text
,
Union
[
Dict
,
List
[
Dict
]]]:
return
{
...
...
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