langchain.js
    Preparing search index...

    Class OllamaEmbeddings

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    baseUrl: string = "http://localhost:11434"
    client: Ollama
    keepAlive?: string | number
    model: string = "mxbai-embed-large"
    requestOptions?: Partial<Options>
    truncate: boolean = false

    Methods

    • convert camelCased Ollama request options like "useMMap" to the snake_cased equivalent which the ollama API actually uses. Used only for consistency with the llms/Ollama and chatModels/Ollama classes

      Parameters

      Returns Partial<OllamaOptions>

    • Parameters

      • texts: string[]

      Returns Promise<number[][]>

    • Parameters

      • text: string

      Returns Promise<number[]>