langchain.js
    Preparing search index...

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    gateway?: Gateway
    maxConcurrency: number = 1
    maxRetries?: number
    model: string

    The id of the model to be used for this request. Please refer to the list of models.

    modelGateway: boolean = false
    modelGatewayKwargs?: WatsonxEmbeddingsGatewayKwargs
    projectId?: string

    The project that contains the resource. Either space_id or project_id has to be given.

    returnOptions?: EmbeddingReturnOptions

    The return options for text embeddings.

    service?: WatsonxAiMlVml_v1
    serviceUrl: string
    spaceId?: string

    The space that contains the resource. Either space_id or project_id has to be given.

    truncateInputTokens?: number

    Represents the maximum number of input tokens accepted. This can be used to avoid requests failing due to input being longer than configured limits. If the text is truncated, then it truncates the end of the input (on the right), so the start of the input will remain the same. If this value exceeds the maximum sequence length (refer to the documentation to find this value for the model) then the call will fail if the total number of tokens exceeds the maximum sequence length.

    version: string

    Methods

    • Parameters

      • documents: string[]

      Returns Promise<number[][]>

    • Parameters

      • document: string

      Returns Promise<number[]>

    • Returns {
          return_options: undefined | EmbeddingReturnOptions;
          truncate_input_tokens: undefined | number;
      }

    • Returns Promise<any>

    • Returns
          | { modelId: string; projectId: string }
          | { modelId: string; spaceId: string }
          | { model: string }