Is there a command that just serves the REST api , similar to ollama run on the cli #6

Closed
opened 2026-02-15 16:27:23 -05:00 by yindo · 2 comments
Owner

Originally created by @gregnwosu on GitHub (Jan 24, 2024).

I want to serve the API from python in a similar way as

ollama run mistral

maybe that returns a server reference that can be used to shutdown the model once done.
Happy to contribute if there is a need

Originally created by @gregnwosu on GitHub (Jan 24, 2024). I want to serve the API from python in a similar way as ```bash ollama run mistral ``` maybe that returns a server reference that can be used to shutdown the model once done. Happy to contribute if there is a need
yindo closed this issue 2026-02-15 16:27:23 -05:00
Author
Owner

@furqanalishah commented on GitHub (Jan 25, 2024):

@gregnwosu thanks.
Could please tell us about a use case when you would need it?

@furqanalishah commented on GitHub (Jan 25, 2024): @gregnwosu thanks. Could please tell us about a use case when you would need it?
Author
Owner

@mxyng commented on GitHub (Jan 25, 2024):

This project is intended to be a thin client library for the Ollama API. A running ollama instance is required. You can change which instance the library uses by manually creating a client ollama.Client(host='') or by setting OLLAMA_HOST

@mxyng commented on GitHub (Jan 25, 2024): This project is intended to be a thin client library for the Ollama API. A running ollama instance is required. You can change which instance the library uses by manually creating a client `ollama.Client(host='')` or by setting `OLLAMA_HOST`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#6