Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request #368 from openchatai/remove-extra-url-prefix
Browse files Browse the repository at this point in the history
Remove the extra https from the url
  • Loading branch information
gharbat authored Dec 6, 2023
2 parents b7a3ef3 + d349a4b commit 9a70641
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dashboard/app/(copilot)/copilot/[copilot_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Widget = dynamic(() => import("./CopilotWidget"));

function InstallationSection() {
const { token: CopilotToken } = useCopilot();
const baseUrl = "https://cloud.opencopilot.so/backend"
const baseUrl = "http://localhost:8888/backend" // @todo read from the env
return (
<section className="rounded-lg border bg-white shadow-sm">
<AccordionItem value="installation">
Expand All @@ -46,10 +46,10 @@ function InstallationSection() {
</p>
<CodeBlock
code={`
<script src="http://${baseUrl}/pilot.js"></script>
<script src="${baseUrl}/pilot.js"></script>
<script> // be aware to call this function when the document/window is ready.
const options = {
apiUrl: "http://${baseUrl}/backend", // your base url where your are hosting OpenCopilot at (the API), usually it's http://localhost:5000/api
apiUrl: "${baseUrl}/backend", // your base url where your are hosting OpenCopilot at (the API), usually it's http://localhost:5000/api
initialMessages: ["How are the things"], // optional: you can pass an array of messages that will be sent to the copilot when it's initialized
token: "${CopilotToken}", // you can get your token from the dashboard
triggerSelector: "#triggerSelector", // the selector of the element that will trigger the copilot when clicked
Expand Down

0 comments on commit 9a70641

Please sign in to comment.