model name format added
Signed-off-by: Matt Williams <m@technovangelist.com>
This commit is contained in:
parent
4904cd8bcd
commit
2b3bb41598
1 changed files with 14 additions and 2 deletions
16
docs/api.md
16
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,
|
||||
|
|
Loading…
Reference in a new issue