openchatai / OpenCopilot

🤖 🔥 Language-to-actions engine

Home Page:https://opencopilot.so

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CoPilot widget not showing up.

venani2023 opened this issue · 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

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?

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?