LM Studio: embeddings
embedGenerate vector representations for texts with a local model, returning dimensions and a cosine-similarity matrix; request raw vectors only when needed.
Instructions
Embed texts with a local embedding model. Returns the dimensions and the cosine-similarity matrix between the texts; raw vectors only on request.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>",
"texts": "<texts>"
},
"name": "embed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Embedding model key (list_models with type embedding). | |
| texts | Yes | Texts to embed. | |
| include_vectors | No | Also return the raw vectors (large). |