From 2b3bb41598232f83859c427d40a0bfac5fb70fc6 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Mon, 7 Aug 2023 13:17:16 -0700 Subject: [PATCH] model name format added Signed-off-by: Matt Williams --- docs/api.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index d0e0da9c..413a2e9f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -9,13 +9,25 @@ - [Delete a Model](#delete-a-model) - [Pull a Model](#pull-a-model) +## Things to keep in mind when using the API + +### Model name format + +The model name format is `site/namespace/model:tag`. **Site** and **namespace** are optional, but will default to `registry.ollama.ai/library`. + +### Durations + +All durations are in nanoseconds. + + + ## Generate a Prompt **POST /api/generate** ### Description -**Generate** is the main endpoint that you will use when working with Ollama. This is used to generate a response to a prompt sent to a model. +**Generate** is the main endpoint that you will use when working with Ollama. This is used to generate a response to a prompt sent to a model. This is a streaming endpoint, so will be a series of responses. The final response will include the context and what is usually seen in the output from verbose mode. ### Request @@ -23,7 +35,7 @@ The **Generate** endpoint takes a JSON object with the following fields: ```JSON { - "model": "modelname", + "model": "site/namespace/model:tag", "prompt": "You are a software engineer working on building docs for Ollama.", "options": { "temperature": 0.7,