From e184c1d0356c9665107609c7dc191ffa423ba915 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 8 Aug 2023 15:48:47 -0700 Subject: [PATCH] Link to `api.md` in `README.md` --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 79ea1997..140cb08a 100644 --- a/README.md +++ b/README.md @@ -134,20 +134,15 @@ Finally, run a model! ## REST API -### `POST /api/generate` +> See the [API documentation](./docs/api.md) for all endpoints. -Generate text from a model. +Ollama has an API for running and managing models. For example to generate text from a model: ``` -curl -X POST http://localhost:11434/api/generate -d '{"model": "llama2", "prompt":"Why is the sky blue?"}' -``` - -### `POST /api/create` - -Create a model from a `Modelfile`. - -``` -curl -X POST http://localhost:11434/api/create -d '{"name": "my-model", "path": "/path/to/modelfile"}' +curl -X POST http://localhost:11434/api/generate -d '{ + "model": "llama2", + "prompt":"Why is the sky blue?" +}' ``` ## Tools using Ollama