mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 05:34:01 +08:00
Merge branch 'main' into main
This commit is contained in:
@@ -53,6 +53,9 @@ import Link from "next/link";
|
||||
import {
|
||||
Anthropic,
|
||||
Azure,
|
||||
Baidu,
|
||||
ByteDance,
|
||||
Alibaba,
|
||||
Google,
|
||||
GoogleSafetySettingsThreshold,
|
||||
OPENAI_BASE_URL,
|
||||
@@ -1217,6 +1220,155 @@ export function Settings() {
|
||||
</ListItem>
|
||||
</>
|
||||
)}
|
||||
{accessStore.provider === ServiceProvider.Baidu && (
|
||||
<>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.Baidu.Endpoint.Title}
|
||||
subTitle={
|
||||
Locale.Settings.Access.Baidu.Endpoint.SubTitle
|
||||
}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
value={accessStore.baiduUrl}
|
||||
placeholder={Baidu.ExampleEndpoint}
|
||||
onChange={(e) =>
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.baiduUrl = e.currentTarget.value),
|
||||
)
|
||||
}
|
||||
></input>
|
||||
</ListItem>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.Baidu.ApiKey.Title}
|
||||
subTitle={Locale.Settings.Access.Baidu.ApiKey.SubTitle}
|
||||
>
|
||||
<PasswordInput
|
||||
value={accessStore.baiduApiKey}
|
||||
type="text"
|
||||
placeholder={
|
||||
Locale.Settings.Access.Baidu.ApiKey.Placeholder
|
||||
}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.baiduApiKey = e.currentTarget.value),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.Baidu.SecretKey.Title}
|
||||
subTitle={
|
||||
Locale.Settings.Access.Baidu.SecretKey.SubTitle
|
||||
}
|
||||
>
|
||||
<PasswordInput
|
||||
value={accessStore.baiduSecretKey}
|
||||
type="text"
|
||||
placeholder={
|
||||
Locale.Settings.Access.Baidu.SecretKey.Placeholder
|
||||
}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.baiduSecretKey = e.currentTarget.value),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
</>
|
||||
)}
|
||||
|
||||
{accessStore.provider === ServiceProvider.ByteDance && (
|
||||
<>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.ByteDance.Endpoint.Title}
|
||||
subTitle={
|
||||
Locale.Settings.Access.ByteDance.Endpoint.SubTitle +
|
||||
ByteDance.ExampleEndpoint
|
||||
}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
value={accessStore.bytedanceUrl}
|
||||
placeholder={ByteDance.ExampleEndpoint}
|
||||
onChange={(e) =>
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.bytedanceUrl = e.currentTarget.value),
|
||||
)
|
||||
}
|
||||
></input>
|
||||
</ListItem>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.ByteDance.ApiKey.Title}
|
||||
subTitle={
|
||||
Locale.Settings.Access.ByteDance.ApiKey.SubTitle
|
||||
}
|
||||
>
|
||||
<PasswordInput
|
||||
value={accessStore.bytedanceApiKey}
|
||||
type="text"
|
||||
placeholder={
|
||||
Locale.Settings.Access.ByteDance.ApiKey.Placeholder
|
||||
}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.bytedanceApiKey =
|
||||
e.currentTarget.value),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
</>
|
||||
)}
|
||||
|
||||
{accessStore.provider === ServiceProvider.Alibaba && (
|
||||
<>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.Alibaba.Endpoint.Title}
|
||||
subTitle={
|
||||
Locale.Settings.Access.Alibaba.Endpoint.SubTitle +
|
||||
Alibaba.ExampleEndpoint
|
||||
}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
value={accessStore.alibabaUrl}
|
||||
placeholder={Alibaba.ExampleEndpoint}
|
||||
onChange={(e) =>
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.alibabaUrl = e.currentTarget.value),
|
||||
)
|
||||
}
|
||||
></input>
|
||||
</ListItem>
|
||||
<ListItem
|
||||
title={Locale.Settings.Access.Alibaba.ApiKey.Title}
|
||||
subTitle={
|
||||
Locale.Settings.Access.Alibaba.ApiKey.SubTitle
|
||||
}
|
||||
>
|
||||
<PasswordInput
|
||||
value={accessStore.alibabaApiKey}
|
||||
type="text"
|
||||
placeholder={
|
||||
Locale.Settings.Access.Alibaba.ApiKey.Placeholder
|
||||
}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.alibabaApiKey = e.currentTarget.value),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
Reference in New Issue
Block a user