Skip to content

Add OLLAMA_KEEP_ALIVE parameter support#36

Open
MichaelAnders wants to merge 2 commits intoFast-Editor:mainfrom
MichaelAnders:feature/ollama-keep-alive
Open

Add OLLAMA_KEEP_ALIVE parameter support#36
MichaelAnders wants to merge 2 commits intoFast-Editor:mainfrom
MichaelAnders:feature/ollama-keep-alive

Conversation

@MichaelAnders
Copy link
Contributor

Summary

Adds OLLAMA_KEEP_ALIVE environment variable to control how long Ollama keeps models loaded in memory.

Changes

  • New OLLAMA_KEEP_ALIVE env var in config
  • Passed to Ollama API requests via keep_alive parameter
  • Accepts: -1 (permanent), 0 (immediate unload), "10m", "24h", or seconds

Use Cases

  • Set -1 to keep models permanently loaded (faster responses)
  • Set "30m" for longer retention between requests
  • Set 0 to unload immediately (save memory)

Testing

  • Verified parameter is passed correctly to Ollama API
  • Tested with various values (-1, 0, "10m")

- New OLLAMA_KEEP_ALIVE env var controls how long models stay loaded
- Accepts: -1 (permanent), 0 (immediate unload), "10m", "24h", or seconds
- Passed to Ollama API requests via keep_alive parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant