diff --git a/src/common/components/forms/FormSwitchControl.tsx b/src/common/components/forms/FormSwitchControl.tsx index 1322469e7..f232d01a8 100644 --- a/src/common/components/forms/FormSwitchControl.tsx +++ b/src/common/components/forms/FormSwitchControl.tsx @@ -10,7 +10,7 @@ import { FormLabelStart } from './FormLabelStart'; */ export function FormSwitchControl(props: { title: string | React.JSX.Element, description?: string | React.JSX.Element, - on?: string, off?: string, fullWidth?: boolean, + on?: React.ReactNode, off?: string, fullWidth?: boolean, checked: boolean, onChange: (on: boolean) => void, disabled?: boolean, tooltip?: React.ReactNode, diff --git a/src/modules/llms/vendors/ollama/OllamaServiceSetup.tsx b/src/modules/llms/vendors/ollama/OllamaServiceSetup.tsx index f31feb707..2ee59bf16 100644 --- a/src/modules/llms/vendors/ollama/OllamaServiceSetup.tsx +++ b/src/modules/llms/vendors/ollama/OllamaServiceSetup.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; -import { Button, FormControl, Typography } from '@mui/joy'; +import { Button, FormControl, Tooltip, Typography } from '@mui/joy'; +import WarningRoundedIcon from '@mui/icons-material/WarningRounded'; import type { DModelsServiceId } from '~/common/stores/llms/modelsservice.types'; import { FormSwitchControl } from '~/common/components/forms/FormSwitchControl'; @@ -50,9 +51,24 @@ export function OllamaServiceSetup(props: { serviceId: DModelsServiceId }) { onChange={text => updateSettings({ ollamaHost: text })} /> + + + + Images are well supported (e.g. try Llama3.2-vision). However only the PNG format is accepted by the Ollama API. + For attachments, use the "Original" format option. + + + Information} + title='JSON mode' + on={}>Force JSON} + off='Off (default)' + fullWidth + description={ + + Information + + } checked={ollamaJson} onChange={on => { updateSettings({ ollamaJson: on }); @@ -60,14 +76,6 @@ export function OllamaServiceSetup(props: { serviceId: DModelsServiceId }) { }} /> - - - - Images are well supported (e.g. try Llama3.2-vision). However only the PNG format is accepted by the Ollama API. - For attachments, use the "Original" format option. - - -