ilhooq commited on
Commit
31e289c
1 Parent(s): 2955caf

Change API endpoint

Browse files
Files changed (1) hide show
  1. public/assets/js/app.js +2 -2
public/assets/js/app.js CHANGED
@@ -18,11 +18,11 @@ new ClipboardJS('.hljs-copy-button', {
18
  async function getApiUrl() {
19
  if (getApiUrl.url) return getApiUrl.url;
20
  try {
21
- const response = await fetch("/v1/chat/completions", {
22
  method: "OPTIONS",
23
  });
24
  if (response.status !== 200) throw new Error();
25
- getApiUrl.url = "/v1/chat/completions";
26
  const corsHeaders = (
27
  response.headers.get("Access-Control-Allow-Headers") || ""
28
  ).toLowerCase();
 
18
  async function getApiUrl() {
19
  if (getApiUrl.url) return getApiUrl.url;
20
  try {
21
+ const response = await fetch("/chat/completions", {
22
  method: "OPTIONS",
23
  });
24
  if (response.status !== 200) throw new Error();
25
+ getApiUrl.url = "/chat/completions";
26
  const corsHeaders = (
27
  response.headers.get("Access-Control-Allow-Headers") || ""
28
  ).toLowerCase();