@chatbase Error with not handled function in node mode
I am trying to connect my bot with chatbase.
For that I have generated the API key and connected it with after that I have set my intent with function sendChatbaseHandledMessage
and sendChatbaseNotHandledMessage
.
While I use sendChatbaseNotHandledMessage
it gives this error:
The message cannot be set as not_handled and not be of type user.
at MessageStateWrapper.exportCreatePayload (/home/runner/node_modules/@google/chatbase/lib/MessageSink.js:426:14)
at Promise (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:145:29)
at new Promise (<anonymous>)
at MessageStateWrapper.send (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:141:12)
at sendChatbaseNotHandledMessage (evalmachine.<anonymous>:36:143)
at evalmachine.<anonymous>:39:3
at Script.runInContext (vm.js:74:29)
at Object.runInContext (vm.js:182:6)
at evaluate (/run_dir/repl.js:133:14)
at ReadStream.<anonymous> (/run_dir/repl.js:116:5)
As I can understand, the issue is with the chatbase node_modules with some library.
Can I get some solution for it?
chatbase
add a comment |
I am trying to connect my bot with chatbase.
For that I have generated the API key and connected it with after that I have set my intent with function sendChatbaseHandledMessage
and sendChatbaseNotHandledMessage
.
While I use sendChatbaseNotHandledMessage
it gives this error:
The message cannot be set as not_handled and not be of type user.
at MessageStateWrapper.exportCreatePayload (/home/runner/node_modules/@google/chatbase/lib/MessageSink.js:426:14)
at Promise (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:145:29)
at new Promise (<anonymous>)
at MessageStateWrapper.send (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:141:12)
at sendChatbaseNotHandledMessage (evalmachine.<anonymous>:36:143)
at evalmachine.<anonymous>:39:3
at Script.runInContext (vm.js:74:29)
at Object.runInContext (vm.js:182:6)
at evaluate (/run_dir/repl.js:133:14)
at ReadStream.<anonymous> (/run_dir/repl.js:116:5)
As I can understand, the issue is with the chatbase node_modules with some library.
Can I get some solution for it?
chatbase
add a comment |
I am trying to connect my bot with chatbase.
For that I have generated the API key and connected it with after that I have set my intent with function sendChatbaseHandledMessage
and sendChatbaseNotHandledMessage
.
While I use sendChatbaseNotHandledMessage
it gives this error:
The message cannot be set as not_handled and not be of type user.
at MessageStateWrapper.exportCreatePayload (/home/runner/node_modules/@google/chatbase/lib/MessageSink.js:426:14)
at Promise (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:145:29)
at new Promise (<anonymous>)
at MessageStateWrapper.send (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:141:12)
at sendChatbaseNotHandledMessage (evalmachine.<anonymous>:36:143)
at evalmachine.<anonymous>:39:3
at Script.runInContext (vm.js:74:29)
at Object.runInContext (vm.js:182:6)
at evaluate (/run_dir/repl.js:133:14)
at ReadStream.<anonymous> (/run_dir/repl.js:116:5)
As I can understand, the issue is with the chatbase node_modules with some library.
Can I get some solution for it?
chatbase
I am trying to connect my bot with chatbase.
For that I have generated the API key and connected it with after that I have set my intent with function sendChatbaseHandledMessage
and sendChatbaseNotHandledMessage
.
While I use sendChatbaseNotHandledMessage
it gives this error:
The message cannot be set as not_handled and not be of type user.
at MessageStateWrapper.exportCreatePayload (/home/runner/node_modules/@google/chatbase/lib/MessageSink.js:426:14)
at Promise (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:145:29)
at new Promise (<anonymous>)
at MessageStateWrapper.send (/home/runner/node_modules/@google/chatbase/lib/MessageStateWrapper.js:141:12)
at sendChatbaseNotHandledMessage (evalmachine.<anonymous>:36:143)
at evalmachine.<anonymous>:39:3
at Script.runInContext (vm.js:74:29)
at Object.runInContext (vm.js:182:6)
at evaluate (/run_dir/repl.js:133:14)
at ReadStream.<anonymous> (/run_dir/repl.js:116:5)
As I can understand, the issue is with the chatbase node_modules with some library.
Can I get some solution for it?
chatbase
chatbase
edited Nov 15 '18 at 15:34
Adrian W
1,94251522
1,94251522
asked Nov 15 '18 at 12:07
S.SrivastavaS.Srivastava
62
62
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Reposting the response from our engineer to the internal thread for reference.
It looks like the error is:
message cannot be set as not_handled and not be of type user
Not handled messages in the chatbase API can only by of type user so one would need to say:
var msg = chatbase.newMessage('my-api-key', 'my-user-id')
msg.setAsTypeUser().setAsNotHandled().send()...
In the chatbase API one cannot set agent messages as not handled, so the following is not allowed:
msg.setAsTypeAgent().setAsNotHandled()
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53319170%2fchatbase-error-with-not-handled-function-in-node-mode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Reposting the response from our engineer to the internal thread for reference.
It looks like the error is:
message cannot be set as not_handled and not be of type user
Not handled messages in the chatbase API can only by of type user so one would need to say:
var msg = chatbase.newMessage('my-api-key', 'my-user-id')
msg.setAsTypeUser().setAsNotHandled().send()...
In the chatbase API one cannot set agent messages as not handled, so the following is not allowed:
msg.setAsTypeAgent().setAsNotHandled()
add a comment |
Reposting the response from our engineer to the internal thread for reference.
It looks like the error is:
message cannot be set as not_handled and not be of type user
Not handled messages in the chatbase API can only by of type user so one would need to say:
var msg = chatbase.newMessage('my-api-key', 'my-user-id')
msg.setAsTypeUser().setAsNotHandled().send()...
In the chatbase API one cannot set agent messages as not handled, so the following is not allowed:
msg.setAsTypeAgent().setAsNotHandled()
add a comment |
Reposting the response from our engineer to the internal thread for reference.
It looks like the error is:
message cannot be set as not_handled and not be of type user
Not handled messages in the chatbase API can only by of type user so one would need to say:
var msg = chatbase.newMessage('my-api-key', 'my-user-id')
msg.setAsTypeUser().setAsNotHandled().send()...
In the chatbase API one cannot set agent messages as not handled, so the following is not allowed:
msg.setAsTypeAgent().setAsNotHandled()
Reposting the response from our engineer to the internal thread for reference.
It looks like the error is:
message cannot be set as not_handled and not be of type user
Not handled messages in the chatbase API can only by of type user so one would need to say:
var msg = chatbase.newMessage('my-api-key', 'my-user-id')
msg.setAsTypeUser().setAsNotHandled().send()...
In the chatbase API one cannot set agent messages as not handled, so the following is not allowed:
msg.setAsTypeAgent().setAsNotHandled()
answered Nov 19 '18 at 20:32
Sean PearsonSean Pearson
23615
23615
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53319170%2fchatbase-error-with-not-handled-function-in-node-mode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown