obsidian-copilot icon indicating copy to clipboard operation
obsidian-copilot copied to clipboard

Support ollama keep_alive parameter in plugin settings

Open dorianbrown opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently by default ollama keeps the model in memory until 5 minutes has passed. This consumes RAM/VRAM, and can impact the performance of other programs being run after using obsidian-copilot. It would be nice if we could configure the timeout to be something shorter (or longer if wanted).

Describe the solution you'd like

Provide a keep_alive option in the ollama configuration section of the plugin.

dorianbrown avatar Apr 20 '24 10:04 dorianbrown

Yes this would really be great to have. I personally prefer it to keep the models in memory forever so there is no loading time. And ollama will free up memory if it needs it anyway.

Another solution might be to remove the keep_alive parameter from the API call altogether. Then it will just obey whatever the user has set as keepalive on the server. So the user is able to control it there then, no need to create a setting for it in copilot.

Tycho-S avatar Apr 17 '25 20:04 Tycho-S