settings: move whisper api button

This commit is contained in:
2024-01-12 16:30:25 +08:00
parent 9157992ee1
commit ed59811819

View File

@@ -496,16 +496,29 @@ export default (props: {
{...props} {...props}
/> />
<Input <div className="relative border-slate-300 border rounded">
field="whisper_key" <div className="flex justify-between">
help="用于 Whisper 服务的 key默认为 上方使用的OPENAI key可在此单独配置专用key" <strong className="p-1 m-1">Whisper API</strong>
{...props} <SetAPIsTemplate
/> label="Whisper API"
<Input endpoint={props.chatStore.whisper_api}
field="whisper_api" APIkey={props.chatStore.whisper_key}
help="Whisper 语言转文字服务填入此api才会开启默认为 https://api.openai.com/v1/audio/transriptions" tmps={props.templateAPIsWhisper}
{...props} setTmps={props.setTemplateAPIsWhisper}
/> />
</div>
<hr />
<Input
field="whisper_key"
help="用于 Whisper 服务的 key默认为 上方使用的OPENAI key可在此单独配置专用key"
{...props}
/>
<Input
field="whisper_api"
help="Whisper 语言转文字服务填入此api才会开启默认为 https://api.openai.com/v1/audio/transriptions"
{...props}
/>
</div>
<Input field="tts_key" help="tts service api key" {...props} /> <Input field="tts_key" help="tts service api key" {...props} />
<Input <Input
@@ -578,15 +591,6 @@ export default (props: {
</button> </button>
</div> </div>
<div className="flex justify-evenly flex-wrap"> <div className="flex justify-evenly flex-wrap">
{props.chatStore.whisper_api && props.chatStore.whisper_key && (
<SetAPIsTemplate
label="Whisper API"
endpoint={props.chatStore.whisper_api}
APIkey={props.chatStore.whisper_key}
tmps={props.templateAPIsWhisper}
setTmps={props.setTemplateAPIsWhisper}
/>
)}
{props.chatStore.tts_api && props.chatStore.tts_key && ( {props.chatStore.tts_api && props.chatStore.tts_key && (
<SetAPIsTemplate <SetAPIsTemplate
label="TTS API" label="TTS API"