LiteLLM Embeddings icon

LiteLLM Embeddings

Generate embeddings using LiteLLM

LiteLLM Embeddings

AI-generated

Summary

Generates vector embeddings from text using LiteLLM, supporting batch processing and model customization.

Inputs

  • Notice (required) — Note indicating the node should be connected to a Vector Store or AI Agent.
  • Model (required) — The model to generate embeddings. Options are dynamically fetched from the API endpoint if not selected.
  • options.dimensions — The dimension of the output embedding vector (256, 512, 1024, 1536, or 3072).
  • options.baseURL — Override the default base URL for the API.
  • options.batchSize — Maximum number of documents to process in a single request (default: 512).
  • options.stripNewLines — Whether to remove newline characters from input text before embedding (default: true).

Output shape

A single embedding record per input item, containing a 'response' field with the vector array.

Only the first embedding from a batched request is output per input item. If multiple items are processed in one batch, they share the same embedding vector.

Examples

Example 1: Generate a single embedding for a query string

Model: text-embedding-005, Batch Size: 512, Strip New Lines: true

Example 2: Process multiple documents in a batch to save API calls

Batch Size: 10, Model: text-embedding-005, Dimensions: 1536

Example 3: Use a custom base URL for an enterprise API endpoint

Base URL: https://api.company.com/v1, Model: text-embedding-005

Links

Discussion