Spaces:
Sleeping
Sleeping
Change API endpoint
Browse files- 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("/
|
22 |
method: "OPTIONS",
|
23 |
});
|
24 |
if (response.status !== 200) throw new Error();
|
25 |
-
getApiUrl.url = "/
|
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();
|