GitHub Copilot Embeddings
AI-generatedSummary
Generate vector embeddings for text using the GitHub Copilot API with selectable model and input modes.
Inputs
- Model (required) — Select an embedding model from the dynamically loaded list or enter a custom model name if 'Enter Custom Model Name' is chosen.
- Input Mode (required) — Select how to provide text input: a single text string, a JSON array of texts (batch), or extract text from a specified field in each input item.
- Text (required) — Provide the text to embed when 'Single Text' input mode is selected.
- Texts (required) — Provide a JSON array of text strings to embed in a single request when 'Batch (Array)' input mode is selected.
- Field Name (required) — Specify the field name in each input item containing the text to embed when 'From Field' input mode is selected.
- Options — Optional settings including embedding vector dimensions (for 'text-embedding-3-small' only), encoding format (float or base64), and retry configuration (enable retry and max retries for API quota errors).
Output shape
One output item per input item, each containing a JSON object with the embedding results from the GitHub Copilot API.
The output JSON includes the original model name, a list of embedding data objects with 'index' and 'embedding' vector, and usage details. If the node fails on individual items and 'Continue On Fail' is enabled, error messages are returned per item instead. The node requires GitHub Copilot API credentials and validates the token format before making requests.
Examples
Example 1: Embed a single text string using the recommended 'text-embedding-3-small' model.
Set Model to 'text-embedding-3-small', Input Mode to 'Single Text', and enter the desired text in the 'Text' field.
Example 2: Embed multiple texts efficiently by batching.
Set Model to a supported embedding model, Input Mode to 'Batch (Array)', and provide a JSON array of texts in 'Texts'.
Example 3: Process embedded texts dynamically from incoming data items.
Set Input Mode to 'From Field' and specify the field name containing text to embed; each input item will be processed accordingly.