mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 03:04:03 +00:00
fix(ai): add fallback default model when Ollama model is empty
When model is not explicitly set in config or request, fall back to llama3 to prevent 'model is required' errors from Ollama.
This commit is contained in:
@@ -98,6 +98,10 @@ func (c *OllamaClient) Chat(ctx context.Context, req ChatRequest) (*ChatResponse
|
||||
if model == "" {
|
||||
model = c.model
|
||||
}
|
||||
// Ultimate fallback - if no model configured anywhere, use llama3
|
||||
if model == "" {
|
||||
model = "llama3"
|
||||
}
|
||||
|
||||
ollamaReq := ollamaRequest{
|
||||
Model: model,
|
||||
|
||||
Reference in New Issue
Block a user