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
4904cd8b
Commit
4904cd8b
authored
Aug 07, 2023
by
Matt Williams
Browse files
update simpler code samples
Signed-off-by:
Matt Williams
<
m@technovangelist.com
>
parent
8a45359e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
docs/api.md
docs/api.md
+9
-13
No files found.
docs/api.md
View file @
4904cd8b
...
...
@@ -84,9 +84,8 @@ The final response in the stream also includes the context and what is usually s
#### Request
```
shell
curl
--location
--request
POST
'http://localhost:11434/api/generate'
\
--header
'Content-Type: text/plain'
\
--data-raw
'{
curl
-X
POST
'http://localhost:11434/api/generate'
-d
\
'{
"model": "orca",
"prompt": "why is the sky blue"
}'
...
...
@@ -197,7 +196,7 @@ The response is a JSON object with a single key/value pair for models. For examp
#### Request
```
shell
curl
--location
--request
GET
'http://localhost:11434/api/tags'
curl
'http://localhost:11434/api/tags'
```
#### Response
...
...
@@ -262,9 +261,8 @@ There is no response other than a 200 status code.
#### Request
```
shell
curl
--location
--request
POST
'http://localhost:11434/api/copy'
\
--header
'Content-Type: text/plain'
\
--data-raw
'{
curl
-X
POST
'http://localhost:11434/api/copy'
-d
\
'{
"source": "MyCoolModel",
"destination": "ADifferentModel"
}'
...
...
@@ -301,9 +299,8 @@ No response is returned other than a 200 status code.
#### Request
```
shell
curl
--location
--request
DELETE
'http://localhost:11434/api/delete'
\
--header
'Content-Type: text/plain'
\
--data-raw
'{
curl
-X
DELETE
'http://localhost:11434/api/delete'
-d
\
'{
"name": "adifferentModel"
}'
```
...
...
@@ -347,9 +344,8 @@ The response is a stream of JSON objects with the following format:
#### Request
```
shell
curl
--location
--request
POST
'http://localhost:11434/api/pull'
\
--header
'Content-Type: text/plain'
\
--data-raw
'{
curl
-X
POST
'http://localhost:11434/api/pull'
-d
\
'{
"name": "orca:3b-q4_1"
}'
```
...
...
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