Skip to main content

Variable: ollama

const ollama: (modelId, config?) => ModelConfig & object

Defined in: packages/core/src/providers/factories.ts:270

Configure Ollama provider explicitly

Type Declaration

models

models: (config?) => Promise<ModelInfo[]>

List the models the configured Ollama server has pulled, newest-first.

Parameters

config?

ProviderConfig

Returns

Promise<ModelInfo[]>

Param

Ollama model ID (e.g., 'llama3.2', 'mistral', 'phi3', 'deepseek-r1')

Param

Optional configuration (provider settings + thinking options)

Returns

ModelConfig with provider set to 'ollama'

Examples

const bot = new Baleybot({
model: ollama('llama3.2')
});
const bot = new Baleybot({
model: ollama('llama3.2', {
baseUrl: 'http://192.168.1.100:11434'
})
});
const bot = new Baleybot({
model: ollama('deepseek-r1:7b', {
reasoning: {
effort: 'high',
summary: 'detailed'
}
})
});
const bot = new Baleybot({
model: ollama('llama3.2', {
baseUrl: 'https://ollama.mycompany.com',
apiKey: 'my-api-key'
})
});