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
97c56969
Commit
97c56969
authored
Dec 06, 2023
by
Jeffrey Morgan
Browse files
fix base urls in chat examples
parent
32f62fbb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
docs/api.md
docs/api.md
+5
-2
No files found.
docs/api.md
View file @
97c56969
...
@@ -291,6 +291,7 @@ curl http://localhost:11434/api/generate -d '{
...
@@ -291,6 +291,7 @@ curl http://localhost:11434/api/generate -d '{
```
```
## Send Chat Messages
## Send Chat Messages
```
shell
```
shell
POST /api/chat
POST /api/chat
```
```
...
@@ -312,10 +313,11 @@ Advanced parameters (optional):
...
@@ -312,10 +313,11 @@ Advanced parameters (optional):
### Examples
### Examples
#### Request
#### Request
Send a chat message with a streaming response.
Send a chat message with a streaming response.
```
shell
```
shell
curl http://localhost:11434/api/
gener
at
e
-d
'{
curl http://localhost:11434/api/
ch
at
-d
'{
"model": "llama2",
"model": "llama2",
"messages": [
"messages": [
{
{
...
@@ -361,10 +363,11 @@ Final response:
...
@@ -361,10 +363,11 @@ Final response:
```
```
#### Request (With History)
#### Request (With History)
Send a chat message with a conversation history.
Send a chat message with a conversation history.
```
shell
```
shell
curl http://localhost:11434/api/
gener
at
e
-d
'{
curl http://localhost:11434/api/
ch
at
-d
'{
"model": "llama2",
"model": "llama2",
"messages": [
"messages": [
{
{
...
...
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