Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoPilot widget not showing up. #615

Open
venani2023 opened this issue Feb 8, 2024 · 2 comments
Open

CoPilot widget not showing up. #615

venani2023 opened this issue Feb 8, 2024 · 2 comments

Comments

@venani2023
Copy link

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

@gharbat
Copy link
Contributor

gharbat commented Feb 8, 2024

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?

@venani2023
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants