mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-10-04 01:40:12 +02:00
parent
dfd03e332c
commit
4af9b9d5cc
@ -1,4 +1,4 @@
|
|||||||
import { API_BASE, AUTH_TIMESTAMP } from "@/utils/constants";
|
import { API_BASE, AUTH_TIMESTAMP, fullApiUrl } from "@/utils/constants";
|
||||||
import { baseHeaders } from "@/utils/request";
|
import { baseHeaders } from "@/utils/request";
|
||||||
import DataConnector from "./dataConnector";
|
import DataConnector from "./dataConnector";
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ const System = {
|
|||||||
.catch(() => false);
|
.catch(() => false);
|
||||||
},
|
},
|
||||||
totalIndexes: async function (slug = null) {
|
totalIndexes: async function (slug = null) {
|
||||||
const url = new URL(`${API_BASE}/system/system-vectors`);
|
const url = new URL(`${fullApiUrl()}/system/system-vectors`);
|
||||||
if (!!slug) url.searchParams.append("slug", encodeURIComponent(slug));
|
if (!!slug) url.searchParams.append("slug", encodeURIComponent(slug));
|
||||||
return await fetch(url.toString(), {
|
return await fetch(url.toString(), {
|
||||||
headers: baseHeaders(),
|
headers: baseHeaders(),
|
||||||
|
@ -7,3 +7,8 @@ export const COMPLETE_QUESTIONNAIRE = "anythingllm_completed_questionnaire";
|
|||||||
|
|
||||||
export const USER_BACKGROUND_COLOR = "bg-historical-msg-user";
|
export const USER_BACKGROUND_COLOR = "bg-historical-msg-user";
|
||||||
export const AI_BACKGROUND_COLOR = "bg-historical-msg-system";
|
export const AI_BACKGROUND_COLOR = "bg-historical-msg-system";
|
||||||
|
|
||||||
|
export function fullApiUrl() {
|
||||||
|
if (API_BASE !== "/api") return API_BASE;
|
||||||
|
return `${window.location.origin}/api`;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user