-
Notifications
You must be signed in to change notification settings - Fork 550
Closed
Labels
Description
Ollama config options have required fields: modelName and serverAddress
| * Copyright 2024 Google LLC |
which means that those two config options must be provided at call time:
await embed({
embedder: 'ollama-embedder',
content: 'foo',
options: {
modelName: 'ollama-embedder',
serverAddress: 'http://localhost:...',
}
})(and they are actually unused)
Which is not right. Intended usage is:
export default configureGenkit({
plugins: [
ollama({
embedders: [
{ name: 'ollama-embedder', dimensions: 123 },
],
serverAddress: 'http://127.0.0.1:11434', // default local address
}),
],
});
await embed({
embedder: 'ollama-embedder',
content: 'foo',
options: {
truncate: true,
}
})the options are these: https://github.com/ollama/ollama/blob/main/docs/api.md#parameters-7 (sans model name because it's already provided to configureGenkit).
I say OllamaEmbeddingConfigSchema must be .passthrough() (https://zod.dev/?id=passthrough) and we should just pass all extra/unknown options directly to ollama API as is.
cabljac
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done