Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
31f768bf
Commit
31f768bf
authored
Jun 18, 2024
by
Timothy J. Baek
Browse files
fix
parent
a2e1ea10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+1
-4
src/lib/components/chat/MessageInput.svelte
src/lib/components/chat/MessageInput.svelte
+5
-5
No files found.
src/lib/components/chat/Chat.svelte
View file @
31f768bf
...
@@ -323,10 +323,7 @@
...
@@ -323,10 +323,7 @@
} else if (messages.length != 0 && messages.at(-1).done != true) {
} else if (messages.length != 0 && messages.at(-1).done != true) {
// Response not done
// Response not done
console.log('wait');
console.log('wait');
} else if (
} else if (files.length > 0 && files.filter((file) => file.status === 'processed').length > 0) {
files.length > 0 &&
files.filter((file) => file.upload_status === false).length > 0
) {
// Upload not done
// Upload not done
toast.error(
toast.error(
$i18n.t(
$i18n.t(
...
...
src/lib/components/chat/MessageInput.svelte
View file @
31f768bf
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
type: 'doc',
type: 'doc',
name: url,
name: url,
collection_name: '',
collection_name: '',
upload_
status: false,
status: false,
url: url,
url: url,
error: ''
error: ''
};
};
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
const res = await uploadWebToVectorDB(localStorage.token, '', url);
const res = await uploadWebToVectorDB(localStorage.token, '', url);
if (res) {
if (res) {
doc.
upload_
status =
true
;
doc.status =
'processed'
;
doc.collection_name = res.collection_name;
doc.collection_name = res.collection_name;
files = files;
files = files;
}
}
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
type: 'doc',
type: 'doc',
name: url,
name: url,
collection_name: '',
collection_name: '',
upload_
status: false,
status: false,
url: url,
url: url,
error: ''
error: ''
};
};
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
const res = await uploadYoutubeTranscriptionToVectorDB(localStorage.token, url);
const res = await uploadYoutubeTranscriptionToVectorDB(localStorage.token, url);
if (res) {
if (res) {
doc.
upload_
status =
true
;
doc.status =
'processed'
;
doc.collection_name = res.collection_name;
doc.collection_name = res.collection_name;
files = files;
files = files;
}
}
...
@@ -365,7 +365,7 @@
...
@@ -365,7 +365,7 @@
{
{
type: e?.detail?.type ?? 'doc',
type: e?.detail?.type ?? 'doc',
...e.detail,
...e.detail,
upload_
status:
true
status:
'processed'
}
}
];
];
}}
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment