fix: app config speech-to-text feature (#665)

This commit is contained in:
zxhlyh 2023-07-28 14:02:32 +08:00 committed by GitHub
parent 6f17c9b2fe
commit c5b68fb273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ export const ProviderContextProvider = ({
children,
}: ProviderContextProviderProps) => {
const { data: userInfo } = useSWR({ url: '/info' }, fetchTenantInfo)
const currentProvider = userInfo?.providers?.find(({ token_is_set, is_valid }) => token_is_set && is_valid)
const currentProvider = userInfo?.providers?.find(({ token_is_set, is_valid, provider_name }) => token_is_set && is_valid && (provider_name === 'openai' || provider_name === 'azure_openai'))
return (
<ProviderContext.Provider value={{ currentProvider }}>