Merge branch 'main' into main

This commit is contained in:
Timothy Jaeryang Baek 2024-01-25 00:13:12 -08:00 committed by GitHub
commit fa5918ad13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 54 additions and 26 deletions

View file

@ -121,13 +121,19 @@
error: ''
};
files = [...files, doc];
const res = await uploadDocToVectorDB(localStorage.token, '', file);
try {
files = [...files, doc];
const res = await uploadDocToVectorDB(localStorage.token, '', file);
if (res) {
doc.upload_status = true;
doc.collection_name = res.collection_name;
files = files;
if (res) {
doc.upload_status = true;
doc.collection_name = res.collection_name;
files = files;
}
} catch (e) {
// Remove the failed doc from the files array
files = files.filter((f) => f.name !== file.name);
toast.error(e);
}
};

View file

@ -321,8 +321,9 @@
return true;
} else {
let title = chat.title.toLowerCase();
const query = search.toLowerCase();
if (title.includes(search)) {
if (title.includes(query)) {
return true;
} else {
return false;

View file

@ -12,6 +12,7 @@ export const WEB_UI_VERSION = 'v1.0.0-alpha-static';
export const REQUIRED_OLLAMA_VERSION = '0.1.16';
export const SUPPORTED_FILE_TYPE = [
'application/epub+zip',
'application/pdf',
'text/plain',
'text/csv',