Node Details

  • Name: localAIEmbeddings
  • Type: LocalAI Embeddings
  • Version: 1.0
  • Category: Embeddings

Base Classes

  • LocalAI Embeddings
  • Embeddings

Parameters

Credential (Optional)

  • Type: localAIApi
  • Description: Connects to the LocalAI API for authentication

Inputs

  1. Base Path

  2. Model Name

    • Type: string
    • Description: The name of the embedding model to use
    • Default Placeholder: text-embedding-ada-002

Initialization Process

  1. Retrieves the model name and base path from the node’s input data.
  2. Fetches credential data if provided.
  3. Configures the OpenAIEmbeddings object with:
    • Model name
    • API key (set to ‘sk-’ by default, or uses the provided localAIApiKey)
    • Base path for the API

Usage

This node is used within a larger system to generate embeddings for text data. Embeddings are vector representations of text that capture semantic meaning, useful for various NLP tasks such as similarity comparisons, clustering, and information retrieval.

Integration

The node is designed to be part of a modular system, likely within a larger NLP or AI pipeline. It can be connected to other nodes that require text embeddings as input or to nodes that process the resulting embedding vectors.

Notes

  • The node uses the OpenAIEmbeddings class but configures it to work with a local setup, demonstrating the flexibility of the underlying libraries.
  • The ‘sk-’ prefix for the API key is a placeholder and may need to be adjusted based on the specific LocalAI implementation.
  • Users should ensure that the specified local AI service is running and accessible at the provided base path.