123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- export const OWNER = "tuonq";
- export const REPO = "ChatAI";
- export const REPO_URL = `https://git.tonyandmoney.cn/${OWNER}/${REPO}`;
- export const ISSUE_URL = `https://git.tonyandmoney.cn/${OWNER}/${REPO}/issues`;
- export const UPDATE_URL = `${REPO_URL}#keep-updated`;
- export const RELEASE_URL = `${REPO_URL}/releases`;
- export const FETCH_COMMIT_URL = `https://git.tonyandmoney.cn/repos/${OWNER}/${REPO}/commits?per_page=1`;
- export const FETCH_TAG_URL = `https://git.tonyandmoney.cn/repos/${OWNER}/${REPO}/tags?per_page=1`;
- export const RUNTIME_CONFIG_DOM = "danger-runtime-config";
- export const DEFAULT_CORS_HOST = "https://www.tonyandmoney.cn";
- export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`;
- export const OPENAI_BASE_URL = "https://api.openai.com";
- export enum Path {
- Home = "/",
- Chat = "/chat",
- Settings = "/settings",
- NewChat = "/new-chat",
- Masks = "/masks",
- Auth = "/auth",
- }
- export enum ApiPath {
- Cors = "/api/cors",
- OpenAI = "/api/openai",
- }
- export enum SlotID {
- AppBody = "app-body",
- CustomModel = "custom-model",
- }
- export enum FileName {
- Masks = "masks.json",
- Prompts = "prompts.json",
- }
- export enum StoreKey {
- Chat = "chat-next-web-store",
- Access = "access-control",
- Config = "app-config",
- Mask = "mask-store",
- Prompt = "prompt-store",
- Update = "chat-update",
- Sync = "sync",
- }
- export const DEFAULT_SIDEBAR_WIDTH = 300;
- export const MAX_SIDEBAR_WIDTH = 500;
- export const MIN_SIDEBAR_WIDTH = 230;
- export const NARROW_SIDEBAR_WIDTH = 100;
- export const ACCESS_CODE_PREFIX = "nk-";
- export const LAST_INPUT_KEY = "last-input";
- export const UNFINISHED_INPUT = (id: string) => "unfinished-input-" + id;
- export const STORAGE_KEY = "chatgpt-next-web";
- export const REQUEST_TIMEOUT_MS = 60000;
- export const EXPORT_MESSAGE_CLASS_NAME = "export-markdown";
- export enum ServiceProvider {
- OpenAI = "OpenAI",
- Azure = "Azure",
- Oauth = "Oauth",
- }
- export const OpenaiPath = {
- ChatPath: "v1/chat/completions",
- UsagePath: "dashboard/billing/usage",
- SubsPath: "dashboard/billing/subscription",
- ListModelPath: "v1/models",
- };
- export const Azure = {
- ExampleEndpoint: "https://{resource-url}/openai/deployments/{deploy-id}",
- };
- export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
- export const DEFAULT_SYSTEM_TEMPLATE = `
- You are ChatGPT, a large language model trained by OpenAI.
- Knowledge cutoff: {{cutoff}}
- Current model: {{model}}
- Current time: {{time}}
- Latex inline: $x^2$
- Latex block: $$e=mc^2$$
- `;
- export const SUMMARIZE_MODEL = "gpt-3.5-turbo";
- export const KnowledgeCutOffDate: Record<string, string> = {
- default: "2021-09",
- "gpt-4-1106-preview": "2023-04",
- "gpt-4-vision-preview": "2023-04",
- };
- export const DEFAULT_MODELS = [
- {
- name: "gpt-4",
- available: true,
- },
- {
- name: "gpt-4-0314",
- available: true,
- },
- {
- name: "gpt-4-0613",
- available: true,
- },
- {
- name: "gpt-4-32k",
- available: true,
- },
- {
- name: "gpt-4-32k-0314",
- available: true,
- },
- {
- name: "gpt-4-32k-0613",
- available: true,
- },
- {
- name: "gpt-4-1106-preview",
- available: true,
- },
- {
- name: "gpt-4-vision-preview",
- available: true,
- },
- {
- 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-1106",
- available: true,
- },
- {
- name: "gpt-3.5-turbo-16k",
- available: true,
- },
- {
- name: "gpt-3.5-turbo-16k-0613",
- available: true,
- },
- ] as const;
- export const CHAT_PAGE_SIZE = 15;
- export const MAX_RENDER_MSG_COUNT = 45;
|