Merge branch 'dev' of https://github.com/open-webui/open-webui into feat/web-search-toggle

This commit is contained in:
Jun Siang Cheah
2024-05-11 23:51:37 +08:00
85 changed files with 3180 additions and 1520 deletions
+4 -3
View File
@@ -239,7 +239,8 @@ export const generateOpenAIChatCompletion = async (
export const synthesizeOpenAISpeech = async (
token: string = '',
speaker: string = 'alloy',
text: string = ''
text: string = '',
model: string = 'tts-1'
) => {
let error = null;
@@ -250,7 +251,7 @@ export const synthesizeOpenAISpeech = async (
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'tts-1',
model: model,
input: text,
voice: speaker
})
@@ -316,7 +317,7 @@ export const generateTitle = async (
throw error;
}
return res?.choices[0]?.message?.content ?? 'New Chat';
return res?.choices[0]?.message?.content.replace(/["']/g, '') ?? 'New Chat';
};
export const generateSearchQuery = async (