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
5d4d2e2c
Commit
5d4d2e2c
authored
Dec 10, 2023
by
Jeffrey Morgan
Browse files
update docs with chat completion api
parent
7db5bcf7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
README.md
README.md
+3
-2
docs/api.md
docs/api.md
+2
-1
No files found.
README.md
View file @
5d4d2e2c
...
...
@@ -205,7 +205,8 @@ Finally, in a separate shell, run a model:
## REST API
Ollama has a REST API for running and managing models.
For example, to generate text from a model:
### Generate a response
```
curl http://localhost:11434/api/generate -d '{
...
...
@@ -214,7 +215,7 @@ curl http://localhost:11434/api/generate -d '{
}'
```
Or send a chat message (coming in 0.1.14):
### Chat with a model
```
curl http://localhost:11434/api/chat -d '{
...
...
docs/api.md
View file @
5d4d2e2c
...
...
@@ -3,6 +3,7 @@
## Endpoints
-
[
Generate a completion
](
#generate-a-completion
)
-
[
Generate a chat completion
](
#generate-a-chat-completion
)
-
[
Create a Model
](
#create-a-model
)
-
[
List Local Models
](
#list-local-models
)
-
[
Show Model Information
](
#show-model-information
)
...
...
@@ -290,7 +291,7 @@ curl http://localhost:11434/api/generate -d '{
}
```
##
S
en
d Chat Messages (coming in 0.1.14)
##
G
en
erate a chat completion
```
shell
POST /api/chat
...
...
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