mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
🐛 fix: Converted the getter name and description of Azure AI Search Plugin to a property (#1599)
This commit is contained in:
parent
5ac89b8f0e
commit
3ed6cef58f
2 changed files with 6 additions and 18 deletions
|
|
@ -16,6 +16,9 @@ class AzureAISearch extends StructuredTool {
|
||||||
|
|
||||||
constructor(fields = {}) {
|
constructor(fields = {}) {
|
||||||
super();
|
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
|
// Initialize properties using helper function
|
||||||
this.serviceEndpoint = this._initializeField(
|
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
|
// Improved error handling and logging
|
||||||
async _call(data) {
|
async _call(data) {
|
||||||
const { query } = data;
|
const { query } = data;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ class AzureAISearch extends StructuredTool {
|
||||||
|
|
||||||
constructor(fields = {}) {
|
constructor(fields = {}) {
|
||||||
super();
|
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
|
// Initialize properties using helper function
|
||||||
this.serviceEndpoint = this._initializeField(
|
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
|
// Improved error handling and logging
|
||||||
async _call(data) {
|
async _call(data) {
|
||||||
const { query } = data;
|
const { query } = data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue