From the course: Defending and Deploying AI by Pearson

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Exploring the Ollama REST API

Exploring the Ollama REST API

Olama has an API that is extremely versatile and you can access the documentation in their GitHub repository. They have plenty of different operations and methods that are available for interacting with Olama programmatically. generating chat completions, to creating a model, listing local models, and many other operations. And they have all those examples in here using a curl. So as you see, I have Olamat running. And at the end of the day, I'm actually using curl to interact with the API on port 11434. And just like in the documentation, It's very well explained. You can do many different operations, as I mentioned to you earlier. And in this case, I'm actually just doing a PS to list all the models that were running at that given time. And in this case, QWQ latest is the model that was actually running. And as a matter of fact, I actually killed it right before I took this screenshot. So you can also list all the different models that are available locally in Olama by using the…

Contents