Class RemoteRetrieverAbstract

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

Hierarchy

Implements

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

Methods

  • 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 Document<Record<string, any>>[]

    An array of Document instances.

Generated using TypeDoc