mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-14 03:30:25 +00:00
refac
This commit is contained in:
@@ -297,7 +297,8 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
const uploadedFile = await uploadFile(localStorage.token, file, {
|
const uploadedFile = await uploadFile(localStorage.token, file, {
|
||||||
knowledge_id: knowledge.id
|
knowledge_id: knowledge.id,
|
||||||
|
directory_id: currentDirectoryId
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
toast.error(`${e}`);
|
toast.error(`${e}`);
|
||||||
return null;
|
return null;
|
||||||
@@ -376,6 +377,7 @@
|
|||||||
try {
|
try {
|
||||||
let metadata = {
|
let metadata = {
|
||||||
knowledge_id: knowledge.id,
|
knowledge_id: knowledge.id,
|
||||||
|
directory_id: currentDirectoryId,
|
||||||
// If the file is an audio file, provide the language for STT.
|
// If the file is an audio file, provide the language for STT.
|
||||||
...((file.type.startsWith('audio/') || file.type.startsWith('video/')) &&
|
...((file.type.startsWith('audio/') || file.type.startsWith('video/')) &&
|
||||||
$settings?.audio?.stt?.language
|
$settings?.audio?.stt?.language
|
||||||
|
|||||||
Reference in New Issue
Block a user