From df5438a3549a334082eb00d7e6e679ba95c30d18 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Thu, 5 Dec 2024 10:05:09 +0100 Subject: [PATCH] docs(tools): update examples Signed-off-by: Tomas Dvorak Signed-off-by: Matias Molinas --- docs/tools.md | 2 +- examples/tools/custom/openLibrary.ts | 2 +- src/adapters/langchain/tools.ts | 2 +- src/tools/database/sql.ts | 2 +- src/tools/search/duckDuckGoSearch.ts | 2 +- src/tools/search/googleSearch.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/tools.md b/docs/tools.md index 03a46df0..d004c22b 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -269,7 +269,7 @@ export class OpenLibraryTool extends Tool, - _options: ToolRunOptions | undefined, + _options: Partial, run: GetRunContext, ) { const request = { diff --git a/examples/tools/custom/openLibrary.ts b/examples/tools/custom/openLibrary.ts index 80fc9366..8e4d9abe 100644 --- a/examples/tools/custom/openLibrary.ts +++ b/examples/tools/custom/openLibrary.ts @@ -67,7 +67,7 @@ export class OpenLibraryTool extends Tool, - _options: ToolRunOptions | undefined, + _options: Partial, run: GetRunContext, ) { const request = { diff --git a/src/adapters/langchain/tools.ts b/src/adapters/langchain/tools.ts index 51bac440..7bdbc67b 100644 --- a/src/adapters/langchain/tools.ts +++ b/src/adapters/langchain/tools.ts @@ -115,7 +115,7 @@ export class LangChainTool extends Tool< protected async _run( arg: ToolInput, - options: LangChainToolRunOptions | undefined, + options: Partial, run: GetRunContext, ): Promise> { const { outputClass = JSONToolOutput } = this.options; diff --git a/src/tools/database/sql.ts b/src/tools/database/sql.ts index 899dae54..ecfca522 100644 --- a/src/tools/database/sql.ts +++ b/src/tools/database/sql.ts @@ -136,7 +136,7 @@ export class SQLTool extends Tool { protected async _run( input: ToolInput, - _options: ToolRunOptions | undefined, + _options: Partial, ): Promise { const { provider, connection } = this.options; const { schema } = connection; diff --git a/src/tools/search/duckDuckGoSearch.ts b/src/tools/search/duckDuckGoSearch.ts index 500938fc..8e2e5ab2 100644 --- a/src/tools/search/duckDuckGoSearch.ts +++ b/src/tools/search/duckDuckGoSearch.ts @@ -116,7 +116,7 @@ export class DuckDuckGoSearchTool extends Tool< protected async _run( { query: input }: ToolInput, - options: DuckDuckGoSearchToolRunOptions | undefined, + options: Partial, run: RunContext, ) { const headers = new HeaderGenerator().getHeaders(); diff --git a/src/tools/search/googleSearch.ts b/src/tools/search/googleSearch.ts index 6554e05f..21d2c132 100644 --- a/src/tools/search/googleSearch.ts +++ b/src/tools/search/googleSearch.ts @@ -123,7 +123,7 @@ export class GoogleSearchTool extends Tool< protected async _run( { query: input }: ToolInput, - _options: GoogleSearchToolRunOptions | undefined, + _options: Partial, run: RunContext, ) { const results = await paginate({