merge main

This commit is contained in:
lloydzhou
2024-07-25 19:18:45 +08:00
35 changed files with 1707 additions and 142 deletions

View File

@@ -8,7 +8,8 @@ export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/c
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 PREVIEW_URL = "https://app.nextchat.dev";
export const STABILITY_BASE_URL = "https://api.stability.ai";
export const DEFAULT_API_HOST = "https://api.nextchat.dev";
export const OPENAI_BASE_URL = "https://api.openai.com";
export const ANTHROPIC_BASE_URL = "https://api.anthropic.com";
@@ -32,6 +33,8 @@ export enum Path {
NewChat = "/new-chat",
Masks = "/masks",
Auth = "/auth",
Sd = "/sd",
SdNew = "/sd-new",
Artifact = "/artifact",
}
@@ -44,6 +47,7 @@ export enum ApiPath {
Baidu = "/api/baidu",
ByteDance = "/api/bytedance",
Alibaba = "/api/alibaba",
Stability = "/api/stability",
Artifact = "/api/artifact",
}
@@ -69,6 +73,7 @@ export enum StoreKey {
Prompt = "prompt-store",
Update = "chat-update",
Sync = "sync",
SdList = "sd-list",
}
export const DEFAULT_SIDEBAR_WIDTH = 300;
@@ -95,6 +100,7 @@ export enum ServiceProvider {
Baidu = "Baidu",
ByteDance = "ByteDance",
Alibaba = "Alibaba",
Stability = "Stability",
}
// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings
@@ -107,6 +113,7 @@ export enum GoogleSafetySettingsThreshold {
}
export enum ModelProvider {
Stability = "Stability",
GPT = "GPT",
GeminiPro = "GeminiPro",
Claude = "Claude",
@@ -115,6 +122,11 @@ export enum ModelProvider {
Qwen = "Qwen",
}
export const Stability = {
GeneratePath: "v2beta/stable-image/generate",
ExampleEndpoint: "https://api.stability.ai",
};
export const Anthropic = {
ChatPath: "v1/messages",
ChatPath1: "v1/complete",
@@ -358,3 +370,5 @@ export const internalAllowedWebDavEndpoints = [
"https://webdav.yandex.com",
"https://app.koofr.net/dav/Koofr",
];
export const PLUGINS = [{ name: "Stable Diffusion", path: Path.Sd }];