David-Kunz / gen.nvim

Neovim plugin to generate text using LLMs with customizable prompts
The Unlicense
977 stars 62 forks source link

feat: specify Ollama host and port in opts #67

Closed jmdaly closed 4 months ago

jmdaly commented 4 months ago

Hi there,

First of all, thanks for the great plugin! I love its simplicity and functionality. I find it useful sometimes to run the ollama server on a different computer than the computer I'm developing locally on. With that in mind, I wonder if you'd be open to this PR that adds host and port to options, and updates the command and list_models functions to use the specified host and port. This makes it easier to select a different host/port without needing to replace command and list_models with custom functions.

This is my first time working on a neovim plugin, and I'm very open to feedback in terms of any changes that might be needed!

Thanks!

David-Kunz commented 4 months ago

Hi @jmdaly ,

Thanks a lot for your first contribution to a Neovim plugin, it looks great! 🎉

The only thing I wonder: Is it possible to specify the port when running ollama serve?

Thanks and best regards, David

jmdaly commented 4 months ago

You're welcome, I'm glad to be able to contribute! Good question about the port. When running ollama inside a docker container, the user can map the server to a different host port. So I figured it might be useful to expose the port, but I'm good with whatever you think is best 😄

Thanks, John

David-Kunz commented 4 months ago

Alright, I think we can merge this, thanks a lot!

jmdaly commented 4 months ago

Awseome, glad to help and thank you for merging!