Class responsible for retrieving data from Vespa. It extends the RemoteRetriever class and includes methods for creating the JSON body for a query and processing the JSON response from Vespa.

Example

const retriever = new VespaRetriever({
url: "https:
auth: false,
query_body: {
yql: "select content from paragraph where userQuery()",
hits: 5,
ranking: "documentation",
locale: "en-us",
},
content_field: "content",
});
const result = await retriever.getRelevantDocuments("what is vespa?");

Hierarchy (view full)

Constructors

Properties

asyncCaller: AsyncCaller

The authentication method to use, currently implemented is

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

The URL of the remote retriever server

Methods

Generated using TypeDoc