Feat/chat support voice input (#532)

This commit is contained in:
zxhlyh 2023-07-07 17:50:42 +08:00 • committed by GitHub
commit a03a92e9db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 1420 additions and 26 deletions

View file

@ -114,3 +114,7 @@ export const removeMessage = (messageId: string, isInstalledApp: boolean, instal
export const fetchSuggestedQuestions = (messageId: string, isInstalledApp: boolean, installedAppId = '') => {
return (getAction('get', isInstalledApp))(getUrl(`/messages/${messageId}/suggested-questions`, isInstalledApp, installedAppId))
}
export const audioToText = (url: string, isPublicAPI: boolean, body: FormData) => {
return (getAction('post', !isPublicAPI))(url, { body }, { bodyStringify: false, deleteContentType: true }) as Promise<{ text: string }>
}