KnowledgeRetrievalClient class
Class used to perform operations against a knowledge base.
Constructors
| Knowledge |
Creates an instance of KnowledgeRetrievalClient. Example usage:
|
Properties
| endpoint | The endpoint of the search service |
| knowledge |
The name of the knowledge base |
| pipeline | A reference to the internal HTTP pipeline for use with raw requests |
| service |
The service version to use when communicating with the service. |
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
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
- retrievalRequest
- KnowledgeBaseRetrievalRequest
- options
- RetrieveKnowledgeOptions
Returns
Promise<KnowledgeBaseRetrievalResponse>