Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
widget
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CUI
MILBOT
widget
Commits
6149c407
Commit
6149c407
authored
1 year ago
by
Ashley Caselli
Browse files
Options
Downloads
Patches
Plain Diff
fix(js): update the custom action request
parent
6bb64082
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/static/js/components/chat.js
+3
-15
3 additions, 15 deletions
src/static/js/components/chat.js
with
3 additions
and
15 deletions
src/static/js/components/chat.js
+
3
−
15
View file @
6149c407
...
...
@@ -354,21 +354,13 @@ function actionTrigger() {
// eslint-disable-next-line no-unused-vars
function
customActionTrigger
()
{
$
.
ajax
({
url
:
config
.
action_
server
()
+
"
/webhook
"
,
url
:
config
.
server
_url
()
+
"
/
webhooks/rest/
webhook
"
,
type
:
"
POST
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
({
next_action
:
config
.
action_name
(),
tracker
:
{
sender_id
:
config
.
sender_id
(),
},
}),
data
:
JSON
.
stringify
({
message
:
"
/bonjour
"
,
sender
:
config
.
sender_id
()}),
success
(
botResponse
,
status
)
{
console
.
debug
(
"
Response from Rasa:
"
,
botResponse
,
"
\n
Status:
"
,
status
);
if
(
Object
.
hasOwnProperty
.
call
(
botResponse
,
"
responses
"
))
{
setBotResponse
(
botResponse
.
responses
);
}
setBotResponse
(
botResponse
);
$
(
"
#userInput
"
).
prop
(
"
disabled
"
,
false
);
},
error
(
xhr
,
textStatus
)
{
...
...
@@ -380,10 +372,6 @@ function customActionTrigger() {
});
}
function
customActionTrigger2
()
{
send
(
"
/actus
"
);
}
/**
* clears the conversation from the chat screen
* & sends the `/resart` event to the Rasa server
...
...
This diff is collapsed.
Click to expand it.
Ghost User
@ghost
mentioned in commit
bb05c032
·
1 year ago
mentioned in commit
bb05c032
mentioned in commit bb05c032271b09b264a55c3001b8e6e1379d229a
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment