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
be889b2f
Commit
be889b2f
authored
Aug 10, 2023
by
Jeffrey Morgan
Browse files
add docs for `/api/embeddings`
parent
7e26a8df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
docs/api.md
docs/api.md
+34
-0
No files found.
docs/api.md
View file @
be889b2f
...
...
@@ -8,6 +8,7 @@
-
[
Copy a model
](
#copy-a-model
)
-
[
Delete a model
](
#delete-a-model
)
-
[
Pull a model
](
#pull-a-model
)
-
[
Generate embeddings
](
#generate-embeddings
)
## Conventions
...
...
@@ -220,3 +221,36 @@ curl -X POST http://localhost:11434/api/pull -d '{
"total"
:
2142590208
}
```
## Generate Embeddings
```
POST /api/embeddings
```
Generate embeddings from a model
### Parameters
-
`model`
: name of model to generate embeddings from
-
`prompt`
: text to generate embeddings for
### Request
```
curl -X POST http://localhost:11434/api/embeddings -d '{
"model": "llama2:7b",
"prompt": "Here is an article about llamas..."
}'
```
### Response
```
json
{
"embeddings"
:
[
0.5670403838157654
,
0.009260174818336964
,
0.23178744316101074
,
-0.2916173040866852
,
-0.8924556970596313
,
0.8785552978515625
,
-0.34576427936553955
,
0.5742510557174683
,
-0.04222835972905159
,
-0.137906014919281
]
}
```
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