Commit 2544b8af authored by Matt Williams's avatar Matt Williams
Browse files

update as per Mike's comments


Signed-off-by: default avatarMatt Williams <m@technovangelist.com>
parent ac1b04f2
# Documentation
- [Modelfile](./modelfile.md)
- [How we store Models](./modelstorage.md)
- [How to develop Ollama](./development.md)
- [API](./api.md)
......@@ -24,10 +24,15 @@ The **Generate** endpoint takes a JSON object with the following fields:
```JSON
{
"model": "modelname",
"prompt": "prompt",
"prompt": "You are a software engineer working on building docs for Ollama.",
"options": {
"temperature": 0.7,
}
}
```
**Options** can include any of the parameters listed in the [Modelfile](./modelfile.mdvalid-parameters-and-values) documentation. The only required parameter is **model**. If no **prompt** is provided, the model will generate a response to an empty prompt. If no **options** are provided, the model will use the default options from the Modelfile of the parent model.
### Response
The response is a stream of JSON objects with the following fields:
......@@ -59,20 +64,20 @@ The final response in the stream also includes the context and what is usually s
}
```
| field | description |
| -------------------- | ------------------------------------------ |
| model | the name of the model |
| created_at | the time the response was generated |
| response | the current token |
| done | whether the response is complete |
| total_duration | total time spent generating the response |
| load_duration | time spent loading the model |
| sample_count | number of samples generated |
| sample_duration | time spent generating samples |
| prompt_eval_count | number of times the prompt was evaluated |
| prompt_eval_duration | time spent evaluating the prompt |
| eval_count | number of times the response was evaluated |
| eval_duration | time spent evaluating the response |
| field | description |
| -------------------- | ------------------------------------------------------- |
| model | the name of the model |
| created_at | the time the response was generated |
| response | the current token |
| done | whether the response is complete |
| total_duration | total time in nanoseconds spent generating the response |
| load_duration | time spent in nanoseconds loading the model |
| sample_count | number of samples generated |
| sample_duration | time spent generating samples |
| prompt_eval_count | number of times the prompt was evaluated |
| prompt_eval_duration | time spent in nanoseconds evaluating the prompt |
| eval_count | number of times the response was evaluated |
| eval_duration | time in nanoseconds spent evaluating the response |
### Example
......@@ -117,7 +122,7 @@ The **Create** endpoint takes a JSON object with the following fields:
```JSON
{
"name": "modelname",
"path": "path to Modelfile"
"path": "absolute path to Modelfile"
}
```
......@@ -321,8 +326,7 @@ The **Pull** endpoint takes a JSON object with the following fields:
```JSON
{
"name": "modelname",
"registry": "registryname"
"name": "modelname"
}
```
......
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