pepperoni21 / ollama-rs

A Rust library allowing to interact with the Ollama API.
MIT License
542 stars 81 forks source link

Feat: start the ollama server from the app #82

Open ahmedoubadi opened 1 month ago

ahmedoubadi commented 1 month ago

I would like to request a feature that allows the Ollama server to be started directly within the app, without requiring the user to manually start the server separately. This would streamline the user experience and ensure that the server is always running when the app is in use, reducing potential errors or confusion during setup.

Use Case:

Currently, the process of starting the Ollama server requires users to run it externally. By integrating the server startup into the app's lifecycle, users can benefit from:

A more seamless onboarding experience. Reduced setup complexity, especially for non-technical users. Better error handling when the server is not running or stops unexpectedly.

pepperoni21 commented 1 month ago

So the library would support installing ollama and running the server directly from the rust code? Sounds like a good idea but I don't really know a good way of doing this. Making an interface between the go code and rust? Installing the server and running it from the command line?

InAnYan commented 3 weeks ago

No, installing is too much, just starting is enough.

However,

Pros of auto start:

Cons of auto start:

Considering the conses, I think it's better not to add an auto start. ollama-rs as I see is just a wrapper around ollama server API