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
b3110476
Commit
b3110476
authored
Aug 04, 2023
by
Matt Williams
Browse files
filling out generate
Signed-off-by:
Matt Williams
<
m@technovangelist.com
>
parent
b662d9fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
4 deletions
+54
-4
docs/api.md
docs/api.md
+54
-4
No files found.
docs/api.md
View file @
b3110476
...
...
@@ -3,19 +3,69 @@
# API
## Generate a Prompt
**/api/generate**
**
POST
/api/generate**
The
**Generate**
endpoint takes a JSON object with the following fields:
```
{
Model: "modelname",
Prompt: "prompt",
Context: "context",
}
```
Context is optional, but is used to provide additional context, such as memory of earlier prompts.
The response is a stream of JSON objects with the following fields:
```
{
"model": "modelname",
"created_at": "2023-08-04T08:52:19.385406455-07:00"
"response": "the current token",
"done": false
}
```
| 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 |
## Create a Model
**/api/create**
**
POST
/api/create**
## List Local Models
**/api/list**
**GET /api/tags**
### Return Object
```
{
"models": [
{
"name": "modelname:tags",
"modified_at": "2023-08-04T08:52:19.385406455-07:00",
"size": size
}
]
}
```
## Copy a Model
**/api/copy**
## Delete a Model
**/api/delete**
## Pull a Model
**/api/pull**
## Push a Model
**/api/push**
\ No newline at end of file
**/api/push**
## Heartbeat
**/**
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