UNPKG

@azure/search-documents

Version:
25 lines 1.12 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { createKnowledgeBaseRetrieval } from "./api/index.js"; import { retrieve } from "./api/operations.js"; export class KnowledgeBaseRetrievalClient { _client; /** The pipeline used by this client to make requests */ pipeline; constructor(endpointParam, credential, knowledgeBaseName, options = {}) { const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` : `azsdk-js-client`; this._client = createKnowledgeBaseRetrieval(endpointParam, credential, knowledgeBaseName, { ...options, userAgentOptions: { userAgentPrefix }, }); this.pipeline = this._client.pipeline; } /** KnowledgeBase retrieves relevant data from backing stores. */ retrieve(retrievalRequest, options = { requestOptions: {} }) { return retrieve(this._client, retrievalRequest, options); } } //# sourceMappingURL=knowledgeBaseRetrievalClient.js.map