add rag-view frontend
This commit is contained in:
54
rag-view/src/features/constants.js
Normal file
54
rag-view/src/features/constants.js
Normal file
@@ -0,0 +1,54 @@
|
||||
export const BASE_URL = `${import.meta.env.VITE_API_BASE_URL}/api/rag`;
|
||||
export const METHOD_POST_QUERY = "POST";
|
||||
export const METHOD_GET_QUERY = "GET";
|
||||
export const METHOD_DELETE_QUERY = "DELETE";
|
||||
export const HEADER_CONTENT_TYPE = "Content-Type";
|
||||
export const JWT_TOKEN = "jwt";
|
||||
export const JWT_REFRESH_TOKEN = "jwt-refresh";
|
||||
export const APPLICATION_JSON = "application/json";
|
||||
export const USER_NAME_UNDEFINED = "userNameUndefined";
|
||||
export const USER_EMAIL_UNDEFINED = "userEmailUndefined";
|
||||
export const GUEST_EMAIL = "guest@gmail.com";
|
||||
export const GUEST_PASSWORD = "Guest123!";
|
||||
export const TOKEN_EXPIRED = "Token expired.";
|
||||
export const ERROR_RESPONSE_NOT_OK = "Response not ok";
|
||||
export const ERROR_NO_RESPONSE = "No response from server";
|
||||
export const PREFIX_AUTH = "/auth";
|
||||
export const PREFIX_USERS = "/users";
|
||||
export const PREFIX_CHAT = "/chat";
|
||||
export const PREFIX_ENTRY = "/entry";
|
||||
export const PREFIX_CREATE_NEW_CHAT = "/new";
|
||||
export const PREFIX_USERINFO = "/userinfo";
|
||||
export const PREFIX_REGISTER = "/register";
|
||||
export const PREFIX_LOGIN = "/login";
|
||||
export const PREFIX_REFRESH_TOKEN = "/refresh/token";
|
||||
export const PREFIX_DOCUMENT = "/documents";
|
||||
export const PREFIX_UPLOAD = "/upload";
|
||||
export const PREFIX_UPLOAD_STREAM = "/upload-stream";
|
||||
export const FORM_DATA_FILES = "files";
|
||||
export const TYPE_WINDOW_UNDEFINED = "undefined";
|
||||
export const TOKEN_UNDEFINED = "undefined";
|
||||
export const MAX_FILE_SIZE_KB = 10;
|
||||
export const MAX_FILES_TO_UPLOAD = 3;
|
||||
export const DEFAULT_ERROR_STATUS = 500;
|
||||
export const FULFILLED_BUT_NOT_SUCCESS_ERROR_STATUS = 999;
|
||||
export const UNKNOWN_ERROR_AFTER_FULFILLED_QUERY =
|
||||
"Unknown error after fulfilled query";
|
||||
export const UNKNOWN_ERROR = "Unknown error";
|
||||
export const STATUS_UNAUTHORIZED = "unauthorized";
|
||||
export const HTTP_STATUS_UNAUTHORIZED_CODE = 401;
|
||||
export const NO_REFRESH_TOKEN = "No refresh token";
|
||||
export const PROGRESS_STATUS_PROCESSING = "processing";
|
||||
export const PROGRESS_STATUS_COMPLETED = "completed";
|
||||
export const PROGRESS_STATUS_ERROR = "error";
|
||||
export const PROGRESS_STATUS_SKIPPED = "skipped";
|
||||
export const IS_SEARCH_RESULT_ONLY_WITH_CONTEXT_DEFAULT = true;
|
||||
export const TOP_P_FAST_VALUE = 0.5;
|
||||
export const TOP_P_DEFAULT_VALUE = 0.6;
|
||||
export const TOP_P_SLOW_VALUE = 0.9;
|
||||
export const NO_ACTIVE_CHAT_ID = 0;
|
||||
export const MAX_TITLE_LENGTH = 30;
|
||||
export const MESSAGE_ROLE = {
|
||||
USER: "user",
|
||||
ASSISTANT: "assistant",
|
||||
};
|
||||
Reference in New Issue
Block a user