From 3ed6cef58febeff1d775099bf03b265190f42460 Mon Sep 17 00:00:00 2001 From: Naosuke Yokoe Date: Sat, 20 Jan 2024 22:41:09 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Converted=20the=20getter?= =?UTF-8?q?=20`name`=20and=20`description`=20of=20Azure=20AI=20Search=20Pl?= =?UTF-8?q?ugin=20to=20a=20property=20(#1599)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/clients/tools/AzureAiSearch.js | 12 +++--------- api/app/clients/tools/structured/AzureAISearch.js | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/api/app/clients/tools/AzureAiSearch.js b/api/app/clients/tools/AzureAiSearch.js index 2d74c00543..9b50aa2c43 100644 --- a/api/app/clients/tools/AzureAiSearch.js +++ b/api/app/clients/tools/AzureAiSearch.js @@ -16,6 +16,9 @@ class AzureAISearch extends StructuredTool { constructor(fields = {}) { super(); + this.name = 'azure-ai-search'; + this.description = + 'Use the \'azure-ai-search\' tool to retrieve search results relevant to your input'; // Initialize properties using helper function this.serviceEndpoint = this._initializeField( @@ -68,15 +71,6 @@ class AzureAISearch extends StructuredTool { }); } - // Simplified getter methods - get name() { - return 'azure-ai-search'; - } - - get description() { - return 'Use the \'azure-ai-search\' tool to retrieve search results relevant to your input'; - } - // Improved error handling and logging async _call(data) { const { query } = data; diff --git a/api/app/clients/tools/structured/AzureAISearch.js b/api/app/clients/tools/structured/AzureAISearch.js index 2d74c00543..9b50aa2c43 100644 --- a/api/app/clients/tools/structured/AzureAISearch.js +++ b/api/app/clients/tools/structured/AzureAISearch.js @@ -16,6 +16,9 @@ class AzureAISearch extends StructuredTool { constructor(fields = {}) { super(); + this.name = 'azure-ai-search'; + this.description = + 'Use the \'azure-ai-search\' tool to retrieve search results relevant to your input'; // Initialize properties using helper function this.serviceEndpoint = this._initializeField( @@ -68,15 +71,6 @@ class AzureAISearch extends StructuredTool { }); } - // Simplified getter methods - get name() { - return 'azure-ai-search'; - } - - get description() { - return 'Use the \'azure-ai-search\' tool to retrieve search results relevant to your input'; - } - // Improved error handling and logging async _call(data) { const { query } = data;