mirror of
https://github.com/open-webui/open-webui
synced 2024-11-23 00:27:40 +00:00
refac: legacy support
This commit is contained in:
parent
2e267b420a
commit
ee6e41b144
@ -937,7 +937,26 @@
|
||||
done: false
|
||||
}
|
||||
];
|
||||
files.push(...model.info.meta.knowledge);
|
||||
files.push(
|
||||
...model.info.meta.knowledge.map((item) => {
|
||||
if (item?.collection_name) {
|
||||
return {
|
||||
id: item.collection_name,
|
||||
name: item.name,
|
||||
legacy: true
|
||||
};
|
||||
} else if (item?.collection_names) {
|
||||
return {
|
||||
name: item.name,
|
||||
type: 'collection',
|
||||
collection_names: item.collection_names,
|
||||
legacy: true
|
||||
};
|
||||
} else {
|
||||
return item;
|
||||
}
|
||||
})
|
||||
);
|
||||
history.messages[responseMessageId] = responseMessage;
|
||||
}
|
||||
files.push(
|
||||
@ -1243,7 +1262,26 @@
|
||||
done: false
|
||||
}
|
||||
];
|
||||
files.push(...model.info.meta.knowledge);
|
||||
files.push(
|
||||
...model.info.meta.knowledge.map((item) => {
|
||||
if (item?.collection_name) {
|
||||
return {
|
||||
id: item.collection_name,
|
||||
name: item.name,
|
||||
legacy: true
|
||||
};
|
||||
} else if (item?.collection_names) {
|
||||
return {
|
||||
name: item.name,
|
||||
type: 'collection',
|
||||
collection_names: item.collection_names,
|
||||
legacy: true
|
||||
};
|
||||
} else {
|
||||
return item;
|
||||
}
|
||||
})
|
||||
);
|
||||
history.messages[responseMessageId] = responseMessage;
|
||||
}
|
||||
files.push(
|
||||
|
Loading…
Reference in New Issue
Block a user