⚠️ Deprecated ⚠️

This feature is deprecated and will be removed in the future.

It is not recommended for use.

Use RemoteRetriever instead. Specific implementation of the RemoteRetriever class designed to retrieve documents from a remote source using a JSON-based API. It implements the RemoteLangChainRetrieverParams interface which defines the keys used to interact with the JSON API.

Hierarchy (view full)

Implements

Constructors

Properties

inputKey: string

The key in the JSON body to put the query in

metadataKey: string

The key in the JSON response to get the metadata from

pageContentKey: string

The key in the JSON response to get the page content from

responseKey: string

The key in the JSON response to get the response from

Methods

  • Creates the JSON body of the request sent to the API. The inputKey is set to the query.

    Parameters

    • query: string

      Query string to be sent to the API.

    Returns RemoteRetrieverValues

    An object with the inputKey set to the query.

  • Processes the JSON response from the API. It returns an array of Document objects, each created with the page content and metadata extracted from the response using the pageContentKey and metadataKey, respectively.

    Parameters

    • json: RemoteRetrieverValues

      JSON response from the API.

    Returns Document[]

    An array of Document objects.

Generated using TypeDoc