2023-03-23 17:00:33 +00:00
|
|
|
export const OWNER = "Yidadaa";
|
|
|
|
export const REPO = "ChatGPT-Next-Web";
|
|
|
|
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
|
2023-04-03 05:29:37 +00:00
|
|
|
export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
|
2023-04-05 16:41:44 +00:00
|
|
|
export const UPDATE_URL = `${REPO_URL}#keep-updated`;
|
2023-06-29 16:26:03 +00:00
|
|
|
export const RELEASE_URL = `${REPO_URL}/releases`;
|
2023-03-23 17:00:33 +00:00
|
|
|
export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;
|
2023-03-30 16:46:17 +00:00
|
|
|
export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;
|
2023-04-10 17:21:34 +00:00
|
|
|
export const RUNTIME_CONFIG_DOM = "danger-runtime-config";
|
2023-09-12 18:51:02 +00:00
|
|
|
|
|
|
|
export const DEFAULT_CORS_HOST = "https://chatgpt2.nextweb.fun";
|
|
|
|
export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`;
|
2023-04-20 17:12:39 +00:00
|
|
|
|
|
|
|
export enum Path {
|
|
|
|
Home = "/",
|
|
|
|
Chat = "/chat",
|
|
|
|
Settings = "/settings",
|
2023-04-23 17:15:44 +00:00
|
|
|
NewChat = "/new-chat",
|
2023-04-24 16:49:27 +00:00
|
|
|
Masks = "/masks",
|
2023-06-06 18:18:24 +00:00
|
|
|
Auth = "/auth",
|
2023-04-23 17:15:44 +00:00
|
|
|
}
|
|
|
|
|
2023-09-12 18:51:02 +00:00
|
|
|
export enum ApiPath {
|
|
|
|
Cors = "/api/cors",
|
|
|
|
}
|
|
|
|
|
2023-04-23 17:15:44 +00:00
|
|
|
export enum SlotID {
|
|
|
|
AppBody = "app-body",
|
2023-04-20 17:12:39 +00:00
|
|
|
}
|
2023-04-20 18:52:53 +00:00
|
|
|
|
2023-04-26 17:16:21 +00:00
|
|
|
export enum FileName {
|
|
|
|
Masks = "masks.json",
|
|
|
|
Prompts = "prompts.json",
|
|
|
|
}
|
|
|
|
|
2023-04-26 18:00:22 +00:00
|
|
|
export enum StoreKey {
|
|
|
|
Chat = "chat-next-web-store",
|
|
|
|
Access = "access-control",
|
|
|
|
Config = "app-config",
|
|
|
|
Mask = "mask-store",
|
|
|
|
Prompt = "prompt-store",
|
|
|
|
Update = "chat-update",
|
2023-06-27 16:34:01 +00:00
|
|
|
Sync = "sync",
|
2023-04-26 18:00:22 +00:00
|
|
|
}
|
|
|
|
|
2023-09-18 17:47:15 +00:00
|
|
|
export const DEFAULT_SIDEBAR_WIDTH = 300;
|
2023-04-20 18:52:53 +00:00
|
|
|
export const MAX_SIDEBAR_WIDTH = 500;
|
|
|
|
export const MIN_SIDEBAR_WIDTH = 230;
|
|
|
|
export const NARROW_SIDEBAR_WIDTH = 100;
|
2023-05-04 14:50:07 +00:00
|
|
|
|
2023-08-09 07:27:08 +00:00
|
|
|
export const ACCESS_CODE_PREFIX = "nk-";
|
2023-05-09 15:01:17 +00:00
|
|
|
|
|
|
|
export const LAST_INPUT_KEY = "last-input";
|
2023-09-04 17:54:28 +00:00
|
|
|
export const UNFINISHED_INPUT = (id: string) => "unfinished-input-" + id;
|
2023-05-14 15:00:17 +00:00
|
|
|
|
2023-09-12 18:51:02 +00:00
|
|
|
export const STORAGE_KEY = "chatgpt-next-web";
|
|
|
|
|
2023-05-14 15:00:17 +00:00
|
|
|
export const REQUEST_TIMEOUT_MS = 60000;
|
2023-05-24 17:04:37 +00:00
|
|
|
|
|
|
|
export const EXPORT_MESSAGE_CLASS_NAME = "export-markdown";
|
2023-06-12 16:39:29 +00:00
|
|
|
|
|
|
|
export const OpenaiPath = {
|
|
|
|
ChatPath: "v1/chat/completions",
|
|
|
|
UsagePath: "dashboard/billing/usage",
|
|
|
|
SubsPath: "dashboard/billing/subscription",
|
2023-07-04 15:16:24 +00:00
|
|
|
ListModelPath: "v1/models",
|
2023-06-12 16:39:29 +00:00
|
|
|
};
|
2023-06-23 16:07:46 +00:00
|
|
|
|
2023-06-24 08:50:05 +00:00
|
|
|
export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
|
2023-06-26 05:18:59 +00:00
|
|
|
export const DEFAULT_SYSTEM_TEMPLATE = `
|
|
|
|
You are ChatGPT, a large language model trained by OpenAI.
|
|
|
|
Knowledge cutoff: 2021-09
|
|
|
|
Current model: {{model}}
|
|
|
|
Current time: {{time}}`;
|
2023-07-04 15:16:24 +00:00
|
|
|
|
2023-08-27 16:02:52 +00:00
|
|
|
export const SUMMARIZE_MODEL = "gpt-3.5-turbo";
|
|
|
|
|
2023-07-04 15:16:24 +00:00
|
|
|
export const DEFAULT_MODELS = [
|
|
|
|
{
|
|
|
|
name: "gpt-4",
|
2023-07-05 14:41:10 +00:00
|
|
|
available: true,
|
2023-07-04 15:16:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-0314",
|
2023-07-05 14:41:10 +00:00
|
|
|
available: true,
|
2023-07-04 15:16:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-0613",
|
2023-07-05 14:41:10 +00:00
|
|
|
available: true,
|
2023-07-04 15:16:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-32k",
|
2023-07-05 14:41:10 +00:00
|
|
|
available: true,
|
2023-07-04 15:16:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-32k-0314",
|
2023-07-05 14:41:10 +00:00
|
|
|
available: true,
|
2023-07-04 15:16:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-32k-0613",
|
2023-07-05 14:41:10 +00:00
|
|
|
available: true,
|
2023-07-04 15:16:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-3.5-turbo",
|
|
|
|
available: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-3.5-turbo-0301",
|
|
|
|
available: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-3.5-turbo-0613",
|
|
|
|
available: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-3.5-turbo-16k",
|
|
|
|
available: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-3.5-turbo-16k-0613",
|
|
|
|
available: true,
|
|
|
|
},
|
|
|
|
] as const;
|
2023-08-03 18:16:44 +00:00
|
|
|
|
2023-08-04 11:24:10 +00:00
|
|
|
export const CHAT_PAGE_SIZE = 15;
|
|
|
|
export const MAX_RENDER_MSG_COUNT = 45;
|