feat(follow-up/ollama): support ollama provider (#3795)

This commit is contained in:
Ahmed Rowaihi
2025-01-07 23:43:43 +03:00
committed by GitHub
parent 9a417bdc95
commit e429af139e
6 changed files with 199 additions and 124 deletions
@@ -14,6 +14,7 @@ import azureOpenAiIcon from '@/assets/images/azure_openai.svg'
import mistralAiIcon from '@/assets/images/mistralai.svg'
import openAiIcon from '@/assets/images/openai.svg'
import groqIcon from '@/assets/images/groq.png'
import ollamaIcon from '@/assets/images/ollama.svg'
import { TooltipWithParser } from '@/ui-component/tooltip/TooltipWithParser'
import CredentialInputHandler from '@/views/canvas/CredentialInputHandler'
import { Input } from '@/ui-component/input/Input'
@@ -35,7 +36,8 @@ const FollowUpPromptProviders = {
GOOGLE_GENAI: 'chatGoogleGenerativeAI',
GROQ: 'groqChat',
MISTRALAI: 'chatMistralAI',
OPENAI: 'chatOpenAI'
OPENAI: 'chatOpenAI',
OLLAMA: 'ollama'
}
const followUpPromptsOptions = {
@@ -261,6 +263,38 @@ const followUpPromptsOptions = {
default: 0.9
}
]
},
[FollowUpPromptProviders.OLLAMA]: {
label: 'Ollama',
name: FollowUpPromptProviders.OLLAMA,
icon: ollamaIcon,
inputs: [
{
label: 'Model Name',
name: 'modelName',
type: 'string',
placeholder: 'llama2',
description: 'Name of the Ollama model to use',
default: 'llama3.2-vision:latest'
},
{
label: 'Prompt',
name: 'prompt',
type: 'string',
rows: 4,
description: promptDescription,
optional: true,
default: defaultPrompt
},
{
label: 'Temperature',
name: 'temperature',
type: 'number',
step: 0.1,
optional: true,
default: 0.7
}
]
}
}