⚙️ fix: Ensure Azure AI Search TOP is a number (#3891)

allows configuration through AZURE_AI_SEARCH_SEARCH_OPTION_TOP enviroment variable
This commit is contained in:
Sebastian Diez 2024-09-11 15:21:33 +02:00 committed by GitHub
parent 35a89bfa99
commit 07e5531b5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ class AzureAISearch extends StructuredTool {
try {
const searchOption = {
queryType: this.queryType,
top: this.top,
top: typeof this.top === 'string' ? Number(this.top) : this.top,
};
if (this.select) {
searchOption.select = this.select.split(',');

View file

@ -83,7 +83,7 @@ class AzureAISearch extends StructuredTool {
try {
const searchOption = {
queryType: this.queryType,
top: this.top,
top: typeof this.top === 'string' ? Number(this.top) : this.top,
};
if (this.select) {
searchOption.select = this.select.split(',');