Skip to content

Commit

Permalink
Merge pull request #38 from kris-hansen/ollama-hotfix
Browse files Browse the repository at this point in the history
fix: allow local only models
  • Loading branch information
kris-hansen authored Feb 21, 2025
2 parents aa28dcf + 528ff4c commit fb69744
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/models/ollama.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ func (o *OllamaProvider) SupportsModel(modelName string) bool {
return false
}

// Configure sets up the provider (no API key needed for Ollama)
// Configure sets up the provider. Since Ollama is a local service that doesn't use API keys,
// we accept "LOCAL" as a special API key value to indicate it's properly configured.
func (o *OllamaProvider) Configure(apiKey string) error {
o.debugf("Configuring Ollama provider")
if apiKey != "LOCAL" {
return fmt.Errorf("invalid API key for Ollama: must be 'LOCAL' to indicate local service")
}
return nil
}

Expand Down

0 comments on commit fb69744

Please sign in to comment.