From 8c877cb6a8dcbf5404ee14722d86e796066f91cd Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 11 Nov 2023 13:22:07 +0800 Subject: [PATCH] add default api endpoint --- src/app.tsx | 6 +++--- src/settings.tsx | 26 ++++++++++++++------------ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index b00c96d..80b757a 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -66,14 +66,14 @@ export const newChatStore = ( model = "gpt-3.5-turbo-1106", temperature = 0.7, dev = false, - whisper_api = "", + whisper_api = "https://api.openai.com/v1/audio/transcriptions", whisper_key = "", - tts_api = "", + tts_api = "https://api.openai.com/v1/audio/speech", tts_key = "", tts_speed = 1.0, tts_speed_enabled = false, toolsString = "", - image_gen_api = "", + image_gen_api = "https://api.openai.com/v1/images/generations", image_gen_key = "" ): ChatStore => { return { diff --git a/src/settings.tsx b/src/settings.tsx index c461157..c1776de 100644 --- a/src/settings.tsx +++ b/src/settings.tsx @@ -502,13 +502,13 @@ export default (props: { {...props} /> @@ -526,15 +526,17 @@ export default (props: { {Tr("Reset")} -
- + {props.chatStore.apiEndpoint && props.chatStore.apiKey && ( + + )} + {props.chatStore.whisper_api && props.chatStore.whisper_key && (