Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we get an ollama.stop? #287

Open
JTMarsh556 opened this issue Sep 22, 2024 · 5 comments
Open

Can we get an ollama.stop? #287

JTMarsh556 opened this issue Sep 22, 2024 · 5 comments
Assignees

Comments

@JTMarsh556
Copy link

ollama stop was a great addition. I was hoping we could get stop added to the API library.

Thanks

@davidearlyoung
Copy link

I second this as well. And to keep things clear. I'm talking about making available in the ollama python lib the same behavior you get when you run ollama stop <target_model> from terminal. Which is what I believe what JTMarsh556 is also asking.

@jcgordon10
Copy link

+1
I'm writing a script and want to be able to call it with different models as a parameter, but I need to be able to have the script stop the model it's using at the end of it's execution, that way the way is clear for if I call with a different model.

@wallscreet
Copy link

The generate and chat methods both accept a float for keep-alive. When hot-switching models, I set my keep-alive=0 at the call and it should unload immediately (at least that's been my observation).

@ParthSareen
Copy link
Contributor

Great - thanks for bringing - will scope in :)

@ParthSareen ParthSareen self-assigned this Nov 26, 2024
@liponex
Copy link

liponex commented Dec 18, 2024

Also, as I understand, there can be multiple generations at once through AsyncClient. So better would be adding stop function as returning handle from client.chat, client.generate and etc.

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

No branches or pull requests

6 participants