add stepfun models

This commit is contained in:
chenlinfeng
2024-08-16 16:31:42 +08:00
parent 122aa94c9f
commit e29ea54f2c
11 changed files with 521 additions and 3 deletions

View File

@@ -55,6 +55,7 @@ import {
Azure,
Baidu,
Tencent,
Stepfun,
ByteDance,
Alibaba,
Moonshot,
@@ -1043,6 +1044,47 @@ export function Settings() {
</>
);
const stepfunConfigComponent = accessStore.provider ===
ServiceProvider.Stepfun && (
<>
<ListItem
title={Locale.Settings.Access.Stepfun.Endpoint.Title}
subTitle={
Locale.Settings.Access.Stepfun.Endpoint.SubTitle +
Stepfun.ExampleEndpoint
}
>
<input
aria-label={Locale.Settings.Access.Stepfun.Endpoint.Title}
type="text"
value={accessStore.stepfunUrl}
placeholder={Stepfun.ExampleEndpoint}
onChange={(e) =>
accessStore.update(
(access) => (access.stepfunUrl = e.currentTarget.value),
)
}
></input>
</ListItem>
<ListItem
title={Locale.Settings.Access.Stepfun.ApiKey.Title}
subTitle={Locale.Settings.Access.Stepfun.ApiKey.SubTitle}
>
<PasswordInput
aria-label={Locale.Settings.Access.Stepfun.ApiKey.Title}
value={accessStore.stepfunApiKey}
type="text"
placeholder={Locale.Settings.Access.Stepfun.ApiKey.Placeholder}
onChange={(e) => {
accessStore.update(
(access) => (access.stepfunApiKey = e.currentTarget.value),
);
}}
/>
</ListItem>
</>
);
const byteDanceConfigComponent = accessStore.provider ===
ServiceProvider.ByteDance && (
<>
@@ -1579,6 +1621,7 @@ export function Settings() {
{byteDanceConfigComponent}
{alibabaConfigComponent}
{tencentConfigComponent}
{stepfunConfigComponent}
{moonshotConfigComponent}
{stabilityConfigComponent}
{lflytekConfigComponent}