Spaces:
Sleeping
Sleeping
Update src/api.js
Browse files- src/api.js +2 -5
src/api.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
| 1 |
// src/api.js
|
| 2 |
|
| 3 |
-
// Change this if you put a proxy / gateway in front of the backend
|
| 4 |
-
// export const API_BASE = "https://deepthoughtai-prolog-backend.hf.space";
|
| 5 |
export const API_BASE = "https://deepthoughtai-prolog-gateway.hf.space";
|
| 6 |
|
| 7 |
-
|
| 8 |
export async function sendChat(message, strictMode = true, history = []) {
|
| 9 |
-
const res = await fetch(`${API_BASE}/
|
| 10 |
method: "POST",
|
| 11 |
headers: {
|
| 12 |
"Content-Type": "application/json",
|
|
@@ -28,5 +25,5 @@ export async function sendChat(message, strictMode = true, history = []) {
|
|
| 28 |
throw new Error(json.error || "Chat failed");
|
| 29 |
}
|
| 30 |
|
| 31 |
-
return json;
|
| 32 |
}
|
|
|
|
| 1 |
// src/api.js
|
| 2 |
|
|
|
|
|
|
|
| 3 |
export const API_BASE = "https://deepthoughtai-prolog-gateway.hf.space";
|
| 4 |
|
|
|
|
| 5 |
export async function sendChat(message, strictMode = true, history = []) {
|
| 6 |
+
const res = await fetch(`${API_BASE}/prolog/query`, { // <<< change here
|
| 7 |
method: "POST",
|
| 8 |
headers: {
|
| 9 |
"Content-Type": "application/json",
|
|
|
|
| 25 |
throw new Error(json.error || "Chat failed");
|
| 26 |
}
|
| 27 |
|
| 28 |
+
return json;
|
| 29 |
}
|