mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-20 04:30:17 +09:00
Merge pull request #6016 from bestsanmao/add_deepseek
fix issue #6009 add setting items for deepseek
This commit is contained in:
commit
defefba925
@ -91,7 +91,7 @@ async function request(req: NextRequest) {
|
|||||||
isModelNotavailableInServer(
|
isModelNotavailableInServer(
|
||||||
serverConfig.customModels,
|
serverConfig.customModels,
|
||||||
jsonBody?.model as string,
|
jsonBody?.model as string,
|
||||||
ServiceProvider.Moonshot as string,
|
ServiceProvider.DeepSeek as string,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
|
@ -73,6 +73,7 @@ import {
|
|||||||
Iflytek,
|
Iflytek,
|
||||||
SAAS_CHAT_URL,
|
SAAS_CHAT_URL,
|
||||||
ChatGLM,
|
ChatGLM,
|
||||||
|
DeepSeek,
|
||||||
} from "../constant";
|
} from "../constant";
|
||||||
import { Prompt, SearchService, usePromptStore } from "../store/prompt";
|
import { Prompt, SearchService, usePromptStore } from "../store/prompt";
|
||||||
import { ErrorBoundary } from "./error";
|
import { ErrorBoundary } from "./error";
|
||||||
@ -1197,6 +1198,47 @@ export function Settings() {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const deepseekConfigComponent = accessStore.provider ===
|
||||||
|
ServiceProvider.DeepSeek && (
|
||||||
|
<>
|
||||||
|
<ListItem
|
||||||
|
title={Locale.Settings.Access.DeepSeek.Endpoint.Title}
|
||||||
|
subTitle={
|
||||||
|
Locale.Settings.Access.DeepSeek.Endpoint.SubTitle +
|
||||||
|
DeepSeek.ExampleEndpoint
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
aria-label={Locale.Settings.Access.DeepSeek.Endpoint.Title}
|
||||||
|
type="text"
|
||||||
|
value={accessStore.deepseekUrl}
|
||||||
|
placeholder={DeepSeek.ExampleEndpoint}
|
||||||
|
onChange={(e) =>
|
||||||
|
accessStore.update(
|
||||||
|
(access) => (access.deepseekUrl = e.currentTarget.value),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
></input>
|
||||||
|
</ListItem>
|
||||||
|
<ListItem
|
||||||
|
title={Locale.Settings.Access.DeepSeek.ApiKey.Title}
|
||||||
|
subTitle={Locale.Settings.Access.DeepSeek.ApiKey.SubTitle}
|
||||||
|
>
|
||||||
|
<PasswordInput
|
||||||
|
aria-label={Locale.Settings.Access.DeepSeek.ApiKey.Title}
|
||||||
|
value={accessStore.deepseekApiKey}
|
||||||
|
type="text"
|
||||||
|
placeholder={Locale.Settings.Access.DeepSeek.ApiKey.Placeholder}
|
||||||
|
onChange={(e) => {
|
||||||
|
accessStore.update(
|
||||||
|
(access) => (access.deepseekApiKey = e.currentTarget.value),
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
const XAIConfigComponent = accessStore.provider === ServiceProvider.XAI && (
|
const XAIConfigComponent = accessStore.provider === ServiceProvider.XAI && (
|
||||||
<>
|
<>
|
||||||
<ListItem
|
<ListItem
|
||||||
@ -1733,6 +1775,7 @@ export function Settings() {
|
|||||||
{alibabaConfigComponent}
|
{alibabaConfigComponent}
|
||||||
{tencentConfigComponent}
|
{tencentConfigComponent}
|
||||||
{moonshotConfigComponent}
|
{moonshotConfigComponent}
|
||||||
|
{deepseekConfigComponent}
|
||||||
{stabilityConfigComponent}
|
{stabilityConfigComponent}
|
||||||
{lflytekConfigComponent}
|
{lflytekConfigComponent}
|
||||||
{XAIConfigComponent}
|
{XAIConfigComponent}
|
||||||
|
@ -462,6 +462,17 @@ const cn = {
|
|||||||
SubTitle: "样例:",
|
SubTitle: "样例:",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
DeepSeek: {
|
||||||
|
ApiKey: {
|
||||||
|
Title: "接口密钥",
|
||||||
|
SubTitle: "使用自定义DeepSeek API Key",
|
||||||
|
Placeholder: "DeepSeek API Key",
|
||||||
|
},
|
||||||
|
Endpoint: {
|
||||||
|
Title: "接口地址",
|
||||||
|
SubTitle: "样例:",
|
||||||
|
},
|
||||||
|
},
|
||||||
XAI: {
|
XAI: {
|
||||||
ApiKey: {
|
ApiKey: {
|
||||||
Title: "接口密钥",
|
Title: "接口密钥",
|
||||||
|
@ -446,6 +446,17 @@ const en: LocaleType = {
|
|||||||
SubTitle: "Example: ",
|
SubTitle: "Example: ",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
DeepSeek: {
|
||||||
|
ApiKey: {
|
||||||
|
Title: "DeepSeek API Key",
|
||||||
|
SubTitle: "Use a custom DeepSeek API Key",
|
||||||
|
Placeholder: "DeepSeek API Key",
|
||||||
|
},
|
||||||
|
Endpoint: {
|
||||||
|
Title: "Endpoint Address",
|
||||||
|
SubTitle: "Example: ",
|
||||||
|
},
|
||||||
|
},
|
||||||
XAI: {
|
XAI: {
|
||||||
ApiKey: {
|
ApiKey: {
|
||||||
Title: "XAI API Key",
|
Title: "XAI API Key",
|
||||||
|
Loading…
Reference in New Issue
Block a user