Optional
embeddersArray of embedding models to be defined.
const ai = genkit({
plugins: [
ollama({
serverAddress: 'http://localhost:11434',
embedders: [{ name: 'nomic-embed-text', dimensions: 768 }],
}),
],
});
Optional
modelsArray of models to be defined.
const ai = genkit({
plugins: [
ollama({
models: [{ name: 'gemma' }],
serverAddress: 'http://127.0.0.1:11434', // default local address
}),
],
});
Optional
requestOptional request headers, which can be either static or dynamically generated.
const ai = genkit({
plugins: [
ollama({
models: [...],
serverAddress: 'https://my-deployment.server.address',
requestHeaders: async (params) => {
const headers = await fetchAuthHeaders(params.serverAddress);
return { Authorization: headers['Authorization'] };
},
}),
],
});
The address of the Ollama server.
Parameters for the Ollama plugin configuration.