@@ -24,10 +24,15 @@ The **Generate** endpoint takes a JSON object with the following fields:
...
@@ -24,10 +24,15 @@ The **Generate** endpoint takes a JSON object with the following fields:
```JSON
```JSON
{
{
"model": "modelname",
"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
### Response
The response is a stream of JSON objects with the following fields:
The response is a stream of JSON objects with the following fields:
...
@@ -60,19 +65,19 @@ The final response in the stream also includes the context and what is usually s
...
@@ -60,19 +65,19 @@ The final response in the stream also includes the context and what is usually s