Share via


KnowledgeRetrievalClient class

Class used to perform operations against a knowledge base.

Constructors

KnowledgeRetrievalClient(string, string, KeyCredential | TokenCredential, KnowledgeRetrievalClientOptions)

Creates an instance of KnowledgeRetrievalClient.

Example usage:

import { KnowledgeRetrievalClient, AzureKeyCredential } from "@azure/search-documents";

const knowledgeRetrievalClient = new KnowledgeRetrievalClient(
  "<endpoint>",
  "<knowledgeBaseName>",
  new AzureKeyCredential("<apiKey>"),
);

Properties

endpoint

The endpoint of the search service

knowledgeBaseName

The name of the knowledge base

pipeline

A reference to the internal HTTP pipeline for use with raw requests

serviceVersion

The service version to use when communicating with the service.

Methods

retrieveKnowledge(KnowledgeBaseRetrievalRequest, RetrieveKnowledgeOptions)

Constructor Details

KnowledgeRetrievalClient(string, string, KeyCredential | TokenCredential, KnowledgeRetrievalClientOptions)

Creates an instance of KnowledgeRetrievalClient.

Example usage:

import { KnowledgeRetrievalClient, AzureKeyCredential } from "@azure/search-documents";

const knowledgeRetrievalClient = new KnowledgeRetrievalClient(
  "<endpoint>",
  "<knowledgeBaseName>",
  new AzureKeyCredential("<apiKey>"),
);
new KnowledgeRetrievalClient(endpoint: string, knowledgeBaseName: string, credential: KeyCredential | TokenCredential, options?: KnowledgeRetrievalClientOptions)

Parameters

endpoint

string

The endpoint of the search service

knowledgeBaseName

string

The name of the knowledge base

credential

KeyCredential | TokenCredential

Used to authenticate requests to the service.

options
KnowledgeRetrievalClientOptions

Used to configure the Search client.

Property Details

endpoint

The endpoint of the search service

endpoint: string

Property Value

string

knowledgeBaseName

The name of the knowledge base

knowledgeBaseName: string

Property Value

string

pipeline

A reference to the internal HTTP pipeline for use with raw requests

pipeline: Pipeline

Property Value

serviceVersion

The service version to use when communicating with the service.

serviceVersion: string

Property Value

string

Method Details

retrieveKnowledge(KnowledgeBaseRetrievalRequest, RetrieveKnowledgeOptions)

function retrieveKnowledge(retrievalRequest: KnowledgeBaseRetrievalRequest, options?: RetrieveKnowledgeOptions): Promise<KnowledgeBaseRetrievalResponse>

Parameters

Returns