Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
2a2fa3c3
Commit
2a2fa3c3
authored
Dec 27, 2023
by
Jeffrey Morgan
Browse files
`api.md` cleanup & formatting
parent
55978c1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
37 deletions
+35
-37
docs/api.md
docs/api.md
+35
-37
No files found.
docs/api.md
View file @
2a2fa3c3
...
...
@@ -27,7 +27,6 @@ All durations are returned in nanoseconds.
Certain endpoints stream responses as JSON objects and can optional return non-streamed responses.
## Generate a completion
```
shell
...
...
@@ -104,12 +103,12 @@ To calculate how fast the response is generated in tokens per second (token/s),
"response"
:
""
,
"done"
:
true
,
"context"
:
[
1
,
2
,
3
],
"total_duration"
:
10706818083
,
"load_duration"
:
6338219291
,
"prompt_eval_count"
:
26
,
"prompt_eval_duration"
:
130079000
,
"eval_count"
:
259
,
"eval_duration"
:
4232710000
"total_duration"
:
10706818083
,
"load_duration"
:
6338219291
,
"prompt_eval_count"
:
26
,
"prompt_eval_duration"
:
130079000
,
"eval_count"
:
259
,
"eval_duration"
:
4232710000
}
```
...
...
@@ -235,6 +234,7 @@ curl http://localhost:11434/api/generate -d '{
#### Request (Raw Mode)
In some cases, you may wish to bypass the templating system and provide a full prompt. In this case, you can use the
`raw`
parameter to disable templating. Also note that raw mode will not return a context.
##### Request
```
shell
...
...
@@ -306,8 +306,7 @@ curl http://localhost:11434/api/generate -d '{
"embedding_only": false,
"rope_frequency_base": 1.1,
"rope_frequency_scale": 0.8,
"num_thread": 8,
"cache": true
"num_thread": 8
}
}'
```
...
...
@@ -348,10 +347,10 @@ A single JSON object is returned:
```
json
{
"model"
:
"llama2"
,
"created_at"
:
"2023-12-18T19:52:07.071755Z"
,
"response"
:
""
,
"done"
:
true
"model"
:
"llama2"
,
"created_at"
:
"2023-12-18T19:52:07.071755Z"
,
"response"
:
""
,
"done"
:
true
}
```
...
...
@@ -425,12 +424,12 @@ Final response:
"model"
:
"llama2"
,
"created_at"
:
"2023-08-04T19:22:45.499127Z"
,
"done"
:
true
,
"total_duration"
:
4883583458
,
"load_duration"
:
1334875
,
"prompt_eval_count"
:
26
,
"prompt_eval_duration"
:
342546000
,
"eval_count"
:
282
,
"eval_duration"
:
4535599000
"total_duration"
:
4883583458
,
"load_duration"
:
1334875
,
"prompt_eval_count"
:
26
,
"prompt_eval_duration"
:
342546000
,
"eval_count"
:
282
,
"eval_duration"
:
4535599000
}
```
...
...
@@ -520,12 +519,12 @@ Final response:
"model"
:
"llama2"
,
"created_at"
:
"2023-08-04T19:22:45.499127Z"
,
"done"
:
true
,
"total_duration"
:
8113331500
,
"load_duration"
:
6396458
,
"prompt_eval_count"
:
61
,
"prompt_eval_duration"
:
398801000
,
"eval_count"
:
468
,
"eval_duration"
:
7701267000
"total_duration"
:
8113331500
,
"load_duration"
:
6396458
,
"prompt_eval_count"
:
61
,
"prompt_eval_duration"
:
398801000
,
"eval_count"
:
468
,
"eval_duration"
:
7701267000
}
```
...
...
@@ -560,12 +559,12 @@ curl http://localhost:11434/api/chat -d '{
"images"
:
null
},
"done"
:
true
,
"total_duration"
:
1668506709
,
"load_duration"
:
1986209
,
"prompt_eval_count"
:
26
,
"prompt_eval_duration"
:
359682000
,
"eval_count"
:
83
,
"eval_duration"
:
1303285000
"total_duration"
:
1668506709
,
"load_duration"
:
1986209
,
"prompt_eval_count"
:
26
,
"prompt_eval_duration"
:
359682000
,
"eval_count"
:
83
,
"eval_duration"
:
1303285000
}
```
...
...
@@ -625,7 +624,6 @@ HEAD /api/blobs/:digest
Ensures that the file blob used for a FROM or ADAPTER field exists on the server. This is checking your Ollama server and not Ollama.ai.
#### Query Parameters
-
`digest`
: the SHA256 digest of the blob
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment