Fix/speech to text button (#947)

This commit is contained in:
zxhlyh
2023-08-22 14:55:20 +08:00
committed by GitHub
parent a3aba7a9aa
commit b185a70c21
8 changed files with 35 additions and 246 deletions

View File

@@ -52,7 +52,7 @@ const Debug: FC<IDebug> = ({
modelConfig,
completionParams,
} = useContext(ConfigContext)
const { currentProvider } = useProviderContext()
const { speech2textDefaultModel } = useProviderContext()
const [chatList, setChatList, getChatList] = useGetState<IChatItem[]>([])
const chatListDomRef = useRef<HTMLDivElement>(null)
useEffect(() => {
@@ -390,7 +390,7 @@ const Debug: FC<IDebug> = ({
}}
isShowSuggestion={doShowSuggestion}
suggestionList={suggestQuestions}
isShowSpeechToText={speechToTextConfig.enabled && currentProvider?.provider_name === 'openai'}
isShowSpeechToText={speechToTextConfig.enabled && !!speech2textDefaultModel}
/>
</div>
</div>