diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 9251ba4e4..9695375db 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -109,6 +109,24 @@ (model) => $models.find((m) => m.id === model)?.info?.meta?.capabilities?.vision ?? true ); + $: areSelectedModelsWebSearchCapable = selectedModelIds.every( + (id) => + $models.find((m) => m.id === id)?.info?.meta?.capabilities?.websearch ?? false + ); + $: console.log('areSelectedModelsWebSearchCapable: ', areSelectedModelsWebSearchCapable); + + $: areSelectedModelsCodeExecutionCapable = selectedModelIds.every( + (id) => + $models.find((m) => m.id === id)?.info?.meta?.capabilities?.codeexecution ?? false + ); + $: console.log('areSelectedModelsCodeExecutionCapable: ', areSelectedModelsCodeExecutionCapable); + + $: areSelectedModelsImageGenerationCapable = selectedModelIds.every( + (id) => + $models.find((m) => m.id === id)?.info?.meta?.capabilities?.imagegeneration ?? false + ); + $: console.log('areSelectedModelsImageGenerationCapable: ', areSelectedModelsImageGenerationCapable); + const scrollToBottom = () => { const element = document.getElementById('messages-container'); element.scrollTo({ @@ -1128,7 +1146,7 @@
{#if $_user} - {#if $config?.features?.enable_web_search && ($_user.role === 'admin' || $_user?.permissions?.features?.web_search)} + {#if $config?.features?.enable_web_search && ($_user.role === 'admin' || $_user?.permissions?.features?.web_search) && areSelectedModelsWebSearchCapable}
diff --git a/src/lib/components/workspace/Models/ModelEditor.svelte b/src/lib/components/workspace/Models/ModelEditor.svelte index 4bd875ee2..66a9233b9 100644 --- a/src/lib/components/workspace/Models/ModelEditor.svelte +++ b/src/lib/components/workspace/Models/ModelEditor.svelte @@ -77,7 +77,10 @@ let capabilities = { vision: true, usage: undefined, - citations: true + citations: true, + websearch: true, + codeexecution: true, + imagegeneration: true, }; let knowledge = [];