copilot icon indicating copy to clipboard operation
copilot copied to clipboard

CoPilot widget not showing up.

Open venani2023 opened this issue 1 year ago • 2 comments

Hi,

I am just trying to test out the above widget using a simple HTML page. I have provided the personal token and added a button with the Id of the triggerElement. Is there something else I have to do like, providing an input window, taking the contents of it, and sending it to copilot and vice-versa?

On the loading of the page I have initialized the copilot. (initAiCoPilot(options))

The options that I have filled out is as follows: const options = { apiUrl: "https://api.opencopilot.so/backend", socketUrl: "https://api.opencopilot.so" , initialMessage: "Hey! happy to help.", token: "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", triggerSelector: "#triggerSelector", headers: { Authorization: "Bearer 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", AnyKey: "AnyValue" }, containerProps: { style: { position: "fixed", height: "100%", bottom: "0", right: "0", width: "400px", }, }

}

Thanks, With best regards, Venkatesh Prasad

venani2023 avatar Feb 08 '24 06:02 venani2023

Hey,

the token option token is not meant for authorization, it's meant for the copilot token (identifier), you can get it from the dashboard:

Screenshot 2024-02-08 at 12 48 41 AM

also, to double-check, are you using the cloud or the open-source version?

gharbat avatar Feb 08 '24 08:02 gharbat

Hi, Thanks, your suggestion worked. Can you point me to the dashboard from where got the value of the token. The pilot.js comes from the cloud as indicated by the contents of the first script statement. I didn't know there was the open source option. I guess, if I were using the open source version, I would download the pilot.js locally and use it from there, correct?

venani2023 avatar Feb 09 '24 13:02 venani2023