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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
actions/actions.py
actions/actions.py
View file @
1c8038f6
...
@@ -60,14 +60,15 @@ class Primary_information(FormAction):
...
@@ -60,14 +60,15 @@ class Primary_information(FormAction):
print
(
'intent'
,
intent
)
print
(
'intent'
,
intent
)
print
(
'conf'
,
conf
)
print
(
'conf'
,
conf
)
#if intent == "affirm" :
#if intent == "affirm" :
if
intent
!=
"deny"
:
# if intent == "affirm" and conf>0.4
:
print
(
"IN from deny"
)
#
print("IN from deny")
#tracker.slots["querytext"] = "no"
#
#tracker.slots["querytext"] = "no"
return
[
"intentname"
,
"confidence"
,
"querytext"
,
"askques"
,
"email"
,
"mobilenumber"
,
"company"
,
"experience"
,
"skills"
,
"availabletime"
]
return
[
"intentname"
,
"confidence"
,
"querytext"
,
"askques"
,
"email"
,
"mobilenumber"
,
"company"
,
"experience"
,
"skills"
,
"availabletime"
]
else
:
# else:
print
(
"IN from deny1"
)
# print("IN from deny1")
tracker
.
slots
[
"querytext"
]
=
"no"
# tracker.slots["querytext"] = "no"
return
[
"availabletime"
]
# return["availabletime"]
def
validate_querytext
(
self
,
value
:
Text
,
dispatcher
:
CollectingDispatcher
,
tracker
:
Tracker
,
domain
:
Dict
[
Text
,
Any
],)
->
Dict
[
Text
,
Any
]:
def
validate_querytext
(
self
,
value
:
Text
,
dispatcher
:
CollectingDispatcher
,
tracker
:
Tracker
,
domain
:
Dict
[
Text
,
Any
],)
->
Dict
[
Text
,
Any
]:
print
(
"------------------------"
)
print
(
"------------------------"
)
...
@@ -88,6 +89,25 @@ class Primary_information(FormAction):
...
@@ -88,6 +89,25 @@ class Primary_information(FormAction):
print
(
'44444444'
)
print
(
'44444444'
)
return
{
"querytext"
:
querytext
,
"intentname"
:
intentname
,
"confidence"
:
confidence
}
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
]]]:
def
slot_mappings
(
self
)
->
Dict
[
Text
,
Union
[
Dict
,
List
[
Dict
]]]:
return
{
return
{
"askques"
:
self
.
from_text
(),
"askques"
:
self
.
from_text
(),
...
...
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