mirror of
https://github.com/run-llama/chat-llamaindex.git
synced 2026-07-01 21:04:08 -04:00
113 lines
2.6 KiB
TypeScript
113 lines
2.6 KiB
TypeScript
export const OWNER = "marcusschiesser";
|
|
export const REPO = "unc";
|
|
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
|
|
export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
|
|
export const UPDATE_URL = `${REPO_URL}#keep-updated`;
|
|
export const RELEASE_URL = `${REPO_URL}/releases`;
|
|
export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;
|
|
export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;
|
|
export const RUNTIME_CONFIG_DOM = "danger-runtime-config";
|
|
export const DEFAULT_API_HOST = "https://api.openai.com";
|
|
export const LINKEDIN_URL = "https://www.linkedin.com/in/marcusschiesser";
|
|
|
|
export enum Path {
|
|
Home = "/",
|
|
Chat = "/",
|
|
Settings = "/settings",
|
|
NewChat = "/new-chat",
|
|
Bots = "/",
|
|
Auth = "/auth",
|
|
}
|
|
|
|
export enum SlotID {
|
|
AppBody = "app-body",
|
|
}
|
|
|
|
export enum FileName {
|
|
Bots = "bots.json",
|
|
Prompts = "prompts.json",
|
|
}
|
|
|
|
export enum StoreKey {
|
|
Chat = "chat-next-web-store",
|
|
Access = "access-control",
|
|
Config = "app-config",
|
|
Bot = "bot-store",
|
|
Prompt = "prompt-store",
|
|
Update = "chat-update",
|
|
Sync = "sync",
|
|
}
|
|
|
|
export const LAST_INPUT_KEY = "last-input";
|
|
|
|
export const REQUEST_TIMEOUT_MS = 60000;
|
|
|
|
export const EXPORT_MESSAGE_CLASS_NAME = "export-markdown";
|
|
|
|
export const OpenaiPath = {
|
|
ChatPath: "v1/chat/completions",
|
|
};
|
|
|
|
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: 2021-09
|
|
Current model: {{model}}
|
|
Current time: {{time}}`;
|
|
|
|
export const PDF_TO_TEXT_API_ROUTE = "/api/pdf2text";
|
|
export const FETCH_SITE_CONTENT_URL = "/api/fetch";
|
|
|
|
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-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;
|
|
|
|
export const CHAT_PAGE_SIZE = 15;
|
|
export const MAX_RENDER_MSG_COUNT = 45;
|
|
|
|
export const ALLOWED_DOCUMENT_EXTENSIONS = ["pdf", "txt"];
|
|
export const DOCUMENT_FILE_SIZE_LIMIT = 1024 * 1024 * 10; // 10 MB
|