langchain.js
    Preparing search index...

    Import from "@langchain/community/embeddings/huggingface_transformers" instead and use the new "@huggingface/transformers" peer dependency.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    batchSize: number = 512

    The maximum number of documents to embed in a single request.

    model: string = "Xenova/all-MiniLM-L6-v2"

    Model name to use

    modelName: string = "Xenova/all-MiniLM-L6-v2"

    Model name to use Alias for model

    pipelineOptions?: FeatureExtractionPipelineOptions

    Optional parameters for the pipeline.

    pretrainedOptions?: PretrainedOptions

    Optional parameters for the pretrained model.

    stripNewLines: boolean = true

    Whether to strip new lines from the input text. This is recommended by OpenAI, but may not be suitable for all use cases.

    timeout?: number

    Timeout to use when making requests to OpenAI.

    Methods

    • Parameters

      • texts: string[]

      Returns Promise<number[][]>

    • Parameters

      • text: string

      Returns Promise<number[]>