mirror of
https://github.com/mudler/LocalAI.git
synced 2024-06-07 19:40:48 +00:00
c5c77d2b0d
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
865 B
865 B
+++ disableToc = false title = "Easy Setup - Embeddings" weight = 2 +++
To install an embedding model, run the following command
curl http://localhost:8080/models/apply -H "Content-Type: application/json" -d '{
"id": "model-gallery@bert-embeddings"
}'
Now we need to make a bert.yaml
in the models folder
backend: bert-embeddings
embeddings: true
name: text-embedding-ada-002
parameters:
model: bert
Restart LocalAI after you change a yaml file
When you would like to request the model from CLI you can do
curl http://localhost:8080/v1/embeddings \
-H "Content-Type: application/json" \
-d '{
"input": "The food was delicious and the waiter...",
"model": "text-embedding-ada-002"
}'
See OpenAI Embedding for more info!