From 5d4d2e2c603e1b5301159132a0a29d61cfec490b Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sun, 10 Dec 2023 13:53:36 -0500 Subject: [PATCH] update docs with chat completion api --- README.md | 5 +++-- docs/api.md | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a8669fc5..d202d73e 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,8 @@ Finally, in a separate shell, run a model: ## REST API 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 '{ @@ -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 '{ diff --git a/docs/api.md b/docs/api.md index 248de114..5910ccf2 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3,6 +3,7 @@ ## Endpoints - [Generate a completion](#generate-a-completion) +- [Generate a chat completion](#generate-a-chat-completion) - [Create a Model](#create-a-model) - [List Local Models](#list-local-models) - [Show Model Information](#show-model-information) @@ -290,7 +291,7 @@ curl http://localhost:11434/api/generate -d '{ } ``` -## Send Chat Messages (coming in 0.1.14) +## Generate a chat completion ```shell POST /api/chat