Commit 5d4d2e2c authored by Jeffrey Morgan's avatar Jeffrey Morgan
Browse files

update docs with chat completion api

parent 7db5bcf7
...@@ -205,7 +205,8 @@ Finally, in a separate shell, run a model: ...@@ -205,7 +205,8 @@ Finally, in a separate shell, run a model:
## REST API ## REST API
Ollama has a REST API for running and managing models. Ollama has a REST API for running and managing models.
For example, to generate text from a model:
### Generate a response
``` ```
curl http://localhost:11434/api/generate -d '{ curl http://localhost:11434/api/generate -d '{
...@@ -214,7 +215,7 @@ curl http://localhost:11434/api/generate -d '{ ...@@ -214,7 +215,7 @@ curl http://localhost:11434/api/generate -d '{
}' }'
``` ```
Or send a chat message (coming in 0.1.14): ### Chat with a model
``` ```
curl http://localhost:11434/api/chat -d '{ curl http://localhost:11434/api/chat -d '{
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
## Endpoints ## Endpoints
- [Generate a completion](#generate-a-completion) - [Generate a completion](#generate-a-completion)
- [Generate a chat completion](#generate-a-chat-completion)
- [Create a Model](#create-a-model) - [Create a Model](#create-a-model)
- [List Local Models](#list-local-models) - [List Local Models](#list-local-models)
- [Show Model Information](#show-model-information) - [Show Model Information](#show-model-information)
...@@ -290,7 +291,7 @@ curl http://localhost:11434/api/generate -d '{ ...@@ -290,7 +291,7 @@ curl http://localhost:11434/api/generate -d '{
} }
``` ```
## Send Chat Messages (coming in 0.1.14) ## Generate a chat completion
```shell ```shell
POST /api/chat POST /api/chat
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment