langchain.js
    Preparing search index...

    Abstract class for interacting with a remote server to retrieve relevant documents based on a given query.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    asyncCaller: AsyncCaller

    The authentication method to use, currently implemented is

    • false: no authentication
    • { bearer: string }: Bearer token authentication
    headers: Record<string, string>
    url: string

    The URL of the remote retriever server

    Accessors

    • get lc_secrets(): undefined | { [key: string]: string }

      Returns undefined | { [key: string]: string }

    Methods

    • Parameters

      • query: string

      Returns Promise<DocumentInterface[]>

    • Abstract method that should be implemented by subclasses to create the JSON body of the request based on the given query.

      Parameters

      • query: string

        The query based on which the JSON body of the request is created.

      Returns RemoteRetrieverValues

      The JSON body of the request.

    • Abstract method that should be implemented by subclasses to process the JSON response from the server and convert it into an array of Document instances.

      Parameters

      Returns DocumentInterface[]

      An array of Document instances.