Learn how to embed the copilot in your app
http://localhost:8888/pilot.js
for local setup).
initAiCoPilot
function and passing the required options.
Option | Description | type |
---|---|---|
initialMessage | The message that will be first present when the copilot is initialized | string |
token | Your copilot token | string |
triggerSelector | The selector of the element that will trigger the copilot when clicked | string |
apiUrl | the url of the copilot api. | string |
headers | An object of headers that will be sent with every request (can be used to authenticate your api requests) | Record<string,string> |
containerProps | An object of props that will be passed to the container div | Record<string,string> |
socketUrl | The url of the socket url that will be used to send and receive messages | string |
The copilot widget is not showing up
triggerSelector
is correct and the element exists in
the dom,instead you can set defaultOpen
to true
to make the copilot open by default.
if that did not work, please open an issue on our GitHub repoThe copilot widget is so small
containerProps
option and setting the width to whatever you want.