diff options
| author | moon jooho <[email protected]> | 2025-07-04 09:13:02 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-04 00:13:02 +0000 |
| commit | 8d3fec08e59b100da036b685d20b080203ba3a4c (patch) | |
| tree | fdfb31c69d8cf15a536e650fb0fdd148d14051ae /packages/core/src/tools/web-search.ts | |
| parent | 654f8aeb614c3e5129f33d93aa9cfa06d347e3a0 (diff) | |
Add and improve JSDoc comments for core tool methods (#3128)
Diffstat (limited to 'packages/core/src/tools/web-search.ts')
| -rw-r--r-- | packages/core/src/tools/web-search.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/core/src/tools/web-search.ts b/packages/core/src/tools/web-search.ts index c4dcc54a..5ee8e85c 100644 --- a/packages/core/src/tools/web-search.ts +++ b/packages/core/src/tools/web-search.ts @@ -81,7 +81,12 @@ export class WebSearchTool extends BaseTool< ); } - validateParams(params: WebSearchToolParams): string | null { + /** + * Validates the parameters for the WebSearchTool. + * @param params The parameters to validate + * @returns An error message string if validation fails, null if valid + */ + validateToolParams(params: WebSearchToolParams): string | null { if ( this.schema.parameters && !SchemaValidator.validate( @@ -105,7 +110,7 @@ export class WebSearchTool extends BaseTool< params: WebSearchToolParams, signal: AbortSignal, ): Promise<WebSearchToolResult> { - const validationError = this.validateParams(params); + const validationError = this.validateToolParams(params); if (validationError) { return { llmContent: `Error: Invalid parameters provided. Reason: ${validationError}`, |
