Skip to content

Commit aeb71c0

Browse files
authored
Add Ollama as a sentence generation provider (#1753)
1 parent d6cb274 commit aeb71c0

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

bot/admin/web/src/app/configuration/sentence-generation-settings/models/engines-configuration.ts

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { AzureOpenAiApiVersionsList, EnginesConfiguration, LLMProvider, OpenAIModelsList } from '../../../shared/model/ai-settings';
1+
import {
2+
AzureOpenAiApiVersionsList,
3+
EnginesConfiguration,
4+
LLMProvider,
5+
OllamaLlmModelsList,
6+
OpenAIModelsList
7+
} from '../../../shared/model/ai-settings';
28

39
export const DefaultPrompt: string = `# Sentences generation instructions
410
@@ -54,5 +60,15 @@ export const EngineConfigurations: EnginesConfiguration[] = [
5460
{ key: 'temperature', label: 'Temperature', type: 'number', inputScale: 'fullwidth' },
5561
{ key: 'prompt', label: 'Prompt', type: 'prompt', inputScale: 'fullwidth', defaultValue: DefaultPrompt }
5662
]
63+
},
64+
{
65+
label: 'Ollama',
66+
key: LLMProvider.Ollama,
67+
params: [
68+
{ key: 'baseUrl', label: 'BaseUrl', type: 'text', defaultValue: 'http://localhost:11434' },
69+
{ key: 'model', label: 'Model', type: 'openlist', source: OllamaLlmModelsList, defaultValue: 'llama2' },
70+
{ key: 'temperature', label: 'Temperature', type: 'number', inputScale: 'fullwidth', defaultValue: 0.7 },
71+
{ key: 'prompt', label: 'Prompt', type: 'prompt', inputScale: 'fullwidth', defaultValue: DefaultPrompt }
72+
]
5773
}
5874
];

0 commit comments

Comments
 (0)