constant.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. export const OWNER = "Yidadaa";
  2. export const REPO = "ChatGPT-Next-Web";
  3. export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
  4. export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
  5. export const UPDATE_URL = `${REPO_URL}#keep-updated`;
  6. export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;
  7. export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;
  8. export const RUNTIME_CONFIG_DOM = "danger-runtime-config";
  9. export const DEFAULT_API_HOST = "https://chatgpt1.nextweb.fun/api/proxy";
  10. export enum Path {
  11. Home = "/",
  12. Chat = "/chat",
  13. Settings = "/settings",
  14. NewChat = "/new-chat",
  15. Masks = "/masks",
  16. Auth = "/auth",
  17. }
  18. export enum SlotID {
  19. AppBody = "app-body",
  20. }
  21. export enum FileName {
  22. Masks = "masks.json",
  23. Prompts = "prompts.json",
  24. }
  25. export enum StoreKey {
  26. Chat = "chat-next-web-store",
  27. Access = "access-control",
  28. Config = "app-config",
  29. Mask = "mask-store",
  30. Prompt = "prompt-store",
  31. Update = "chat-update",
  32. Sync = "sync",
  33. }
  34. export const MAX_SIDEBAR_WIDTH = 500;
  35. export const MIN_SIDEBAR_WIDTH = 230;
  36. export const NARROW_SIDEBAR_WIDTH = 100;
  37. export const ACCESS_CODE_PREFIX = "ak-";
  38. export const LAST_INPUT_KEY = "last-input";
  39. export const REQUEST_TIMEOUT_MS = 60000;
  40. export const EXPORT_MESSAGE_CLASS_NAME = "export-markdown";
  41. export const OpenaiPath = {
  42. ChatPath: "v1/chat/completions",
  43. UsagePath: "dashboard/billing/usage",
  44. SubsPath: "dashboard/billing/subscription",
  45. };
  46. export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
  47. export const DEFAULT_SYSTEM_TEMPLATE = `
  48. You are ChatGPT, a large language model trained by OpenAI.
  49. Knowledge cutoff: 2021-09
  50. Current model: {{model}}
  51. Current time: {{time}}`;