mirror of
https://github.com/open-webui/open-webui
synced 2024-11-21 23:57:51 +00:00
refac: model tools behaviour
This commit is contained in:
parent
7fe10763c1
commit
6ac503413f
@ -153,6 +153,21 @@
|
||||
console.log('saveSessionSelectedModels', selectedModels, sessionStorage.selectedModels);
|
||||
};
|
||||
|
||||
$: if (selectedModelIds) {
|
||||
setToolIds();
|
||||
}
|
||||
|
||||
const setToolIds = () => {
|
||||
if (selectedModels.length !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
const model = $models.find((m) => m.id === selectedModels[0]);
|
||||
if (model) {
|
||||
selectedToolIds = model?.info?.meta?.toolIds ?? [];
|
||||
}
|
||||
};
|
||||
|
||||
const showMessage = async (message) => {
|
||||
const _chatId = JSON.parse(JSON.stringify($chatId));
|
||||
let _messageId = JSON.parse(JSON.stringify(message.id));
|
||||
|
Loading…
Reference in New Issue
Block a user