2023-03-24 02:00:33 +09:00
|
|
|
export const OWNER = "Yidadaa";
|
|
|
|
export const REPO = "ChatGPT-Next-Web";
|
|
|
|
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
|
2023-04-03 14:29:37 +09:00
|
|
|
export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
|
2023-04-06 01:41:44 +09:00
|
|
|
export const UPDATE_URL = `${REPO_URL}#keep-updated`;
|
2023-06-30 01:26:03 +09:00
|
|
|
export const RELEASE_URL = `${REPO_URL}/releases`;
|
2023-03-24 02:00:33 +09:00
|
|
|
export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;
|
2023-03-31 01:46:17 +09:00
|
|
|
export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;
|
2023-04-11 02:21:34 +09:00
|
|
|
export const RUNTIME_CONFIG_DOM = "danger-runtime-config";
|
2023-06-15 02:34:21 +09:00
|
|
|
export const DEFAULT_API_HOST = "https://chatgpt1.nextweb.fun/api/proxy";
|
2023-04-21 02:12:39 +09:00
|
|
|
|
|
|
|
export enum Path {
|
|
|
|
Home = "/",
|
|
|
|
Chat = "/chat",
|
|
|
|
Settings = "/settings",
|
2023-04-24 02:15:44 +09:00
|
|
|
NewChat = "/new-chat",
|
2023-04-25 01:49:27 +09:00
|
|
|
Masks = "/masks",
|
2023-06-07 03:18:24 +09:00
|
|
|
Auth = "/auth",
|
2023-04-24 02:15:44 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum SlotID {
|
|
|
|
AppBody = "app-body",
|
2023-04-21 02:12:39 +09:00
|
|
|
}
|
2023-04-21 03:52:53 +09:00
|
|
|
|
2023-04-27 02:16:21 +09:00
|
|
|
export enum FileName {
|
|
|
|
Masks = "masks.json",
|
|
|
|
Prompts = "prompts.json",
|
|
|
|
}
|
|
|
|
|
2023-04-27 03:00:22 +09: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-28 01:34:01 +09:00
|
|
|
Sync = "sync",
|
2023-04-27 03:00:22 +09:00
|
|
|
}
|
|
|
|
|
2023-04-21 03:52:53 +09:00
|
|
|
export const MAX_SIDEBAR_WIDTH = 500;
|
|
|
|
export const MIN_SIDEBAR_WIDTH = 230;
|
|
|
|
export const NARROW_SIDEBAR_WIDTH = 100;
|
2023-05-04 23:50:07 +09:00
|
|
|
|
2023-08-09 16:27:08 +09:00
|
|
|
export const ACCESS_CODE_PREFIX = "nk-";
|
2023-05-10 00:01:17 +09:00
|
|
|
|
|
|
|
export const LAST_INPUT_KEY = "last-input";
|
2023-09-05 02:54:28 +09:00
|
|
|
export const UNFINISHED_INPUT = (id: string) => "unfinished-input-" + id;
|
2023-05-15 00:00:17 +09:00
|
|
|
|
|
|
|
export const REQUEST_TIMEOUT_MS = 60000;
|
2023-05-25 02:04:37 +09:00
|
|
|
|
|
|
|
export const EXPORT_MESSAGE_CLASS_NAME = "export-markdown";
|
2023-06-13 01:39:29 +09:00
|
|
|
|
|
|
|
export const OpenaiPath = {
|
|
|
|
ChatPath: "v1/chat/completions",
|
|
|
|
UsagePath: "dashboard/billing/usage",
|
|
|
|
SubsPath: "dashboard/billing/subscription",
|
2023-07-05 00:16:24 +09:00
|
|
|
ListModelPath: "v1/models",
|
2023-06-13 01:39:29 +09:00
|
|
|
};
|
2023-06-24 01:07:46 +09:00
|
|
|
|
2023-06-24 17:50:05 +09:00
|
|
|
export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
|
2023-06-26 14:18:59 +09: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-05 00:16:24 +09:00
|
|
|
|
2023-08-28 01:02:52 +09:00
|
|
|
export const SUMMARIZE_MODEL = "gpt-3.5-turbo";
|
|
|
|
|
2023-07-05 00:16:24 +09:00
|
|
|
export const DEFAULT_MODELS = [
|
|
|
|
{
|
|
|
|
name: "gpt-4",
|
2023-07-05 23:41:10 +09:00
|
|
|
available: true,
|
2023-07-05 00:16:24 +09:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-0314",
|
2023-07-05 23:41:10 +09:00
|
|
|
available: true,
|
2023-07-05 00:16:24 +09:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-0613",
|
2023-07-05 23:41:10 +09:00
|
|
|
available: true,
|
2023-07-05 00:16:24 +09:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-32k",
|
2023-07-05 23:41:10 +09:00
|
|
|
available: true,
|
2023-07-05 00:16:24 +09:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-32k-0314",
|
2023-07-05 23:41:10 +09:00
|
|
|
available: true,
|
2023-07-05 00:16:24 +09:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "gpt-4-32k-0613",
|
2023-07-05 23:41:10 +09:00
|
|
|
available: true,
|
2023-07-05 00:16:24 +09: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-04 03:16:44 +09:00
|
|
|
|
2023-08-04 20:24:10 +09:00
|
|
|
export const CHAT_PAGE_SIZE = 15;
|
|
|
|
export const MAX_RENDER_MSG_COUNT = 45;
|