embed_text
Converts texts into vector embeddings with a DashScope model, letting you write large batch results to a JSON file instead of returning them inline.
Instructions
Embed texts into vectors with a DashScope embedding model.
For more than a couple of texts, pass output_file to write the vectors to a JSON file instead of returning them inline (they are large).
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": {
"texts": "<texts>"
},
"name": "embed_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | text-embedding-v4 | |
| texts | Yes | ||
| dimension | No | ||
| output_file | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |