webwhiz-ai / webwhiz

WebWhiz allows you to create an AI chatbot that knows everything about your product and can instantly respond to your customer's queries.
https://www.webwhiz.ai/
GNU Affero General Public License v3.0
926 stars 155 forks source link

How to configure widget link #215

Open ConsulIam opened 3 months ago

ConsulIam commented 3 months ago

Hello everyone, I finally managed to run webwhiz. And now I'm having a difficult time.

How do I make the widget code take the URL I have configured? Always is generating the link with the url "https://widget.webwhiz.ai/?kbId=, where should I make this adjustment?

widget

La100 commented 3 months ago

Change it in Frontend/conatiners/EditChatbot

ConsulIam commented 3 months ago

Hey @La100, thanks by your reply. I changed the widget url into the webwhiz/frontend/src/containers/EditChatbot/EditChatbot.tsx file.

Now when I generate the chatbot the URL is correct but the URL link don't show the chatbot. I'm reviewing the logs and I perceived the following:

?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:1 Uncaught TypeError: Cannot read properties of undefined (reading 'register')
    at HTMLDivElement.onreset (?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:1:56)
onreset @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:1Understand this error
pirsch.js:1 

       GET https://api.pirsch.io/hit?nc=1722117577576&code=VEW6587Xat8LXjE7ejokwXUked6s7udc&url=http%3A%2F%2Fwidget.chatautonomo.com%3A3031%2F%3FkbId%3D66a569cedb70a497e1f1b4f7%26embed%3Dtrue%26hide-chat-actions%3Dtrue&t=WebWhiz%20Live%20Chat&ref=&w=1920&h=1080 400 (Bad Request)
R @ pirsch.js:1
g @ pirsch.js:1
v @ pirsch.js:1
(anonymous) @ pirsch.js:1
(anonymous) @ pirsch.js:1
(anonymous) @ pirsch.js:1Understand this error
?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160 

       GET https://api.webwhiz.ai/knowledgebase/66a569cedb70a497e1f1b4f7/chat_widget_data 404 (Not Found)
B @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:218
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:249Understand this error
?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160 error
?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:218 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'chatWidgeData')
    at ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:218:1494
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:218
await in (anonymous) (async)
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:249Understand this error
?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160 

       GET https://api.webwhiz.ai/chatbot/session//messages 404 (Not Found)
M @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160
setTimeout (async)
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160Understand this error
?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160 Failed to fetch messages: Status 404
M @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160
await in M (async)
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160
setTimeout (async)
(anonymous) @ ?kbId=66a569cedb70a497e1f1b4f7&embed=true&hide-chat-actions=true:160Understand this error
widget.chatautonomo.com/:1 Unchecked runtime.lastError: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

Here is possible to see the chatbot is working chat_working_try_chatbot

Here is possible to see the error returned. error_chatbot

I really appreciate the support

runephilosof-abtion commented 2 months ago

pirsch.io is analytics. I have requested to have it turned off for self hosting https://github.com/webwhiz-ai/webwhiz/issues/220

runephilosof-abtion commented 2 months ago

It is not finding the robot in the url https://api.webwhiz.ai/knowledgebase

If you are self hosting, it should not be using api.webwhiz.ai. You have it misconfigured.

runephilosof-abtion commented 2 months ago

You have it misconfigured.

My bad. It cannot be configured as far as I can tell.

As a workaround you can add &baseUrl=https://api.yourdomain to your widget url.

hrithikt commented 2 months ago