post_generate_embeddings
Generate numerical embeddings for text using a specified model. Returns JSON-formatted embeddings data or error details.
Instructions
Generate embeddings for the given text using Ollama API.
Args:
model (str): Model name to use for embeddings generation.
Example: "nomic-embed-text"
text (List[str]): List of texts to generate embeddings for.
Example: ["Text 1"] or ["Text 1", "Text 2"]
Returns:
str: JSON-formatted string containing:
- Embeddings data and metadata if successful
- Error details if the request fails or response format is invalid
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>",
"text": "<text>"
},
"name": "post_generate_embeddings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |