Skip to content

Commit

Permalink
docs(tools): update examples
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <toomas2d@gmail.com>
Signed-off-by: Matias Molinas <matias.molinas@gmail.com>
  • Loading branch information
Tomas2D authored and matiasmolinas committed Dec 7, 2024
1 parent d6ebefa commit df5438a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class OpenLibraryTool extends Tool<OpenLibraryToolOutput, ToolOptions, To

protected async _run(
input: ToolInput<this>,
_options: ToolRunOptions | undefined,
_options: Partial<ToolRunOptions>,
run: GetRunContext<this>,
) {
const request = {
Expand Down
2 changes: 1 addition & 1 deletion examples/tools/custom/openLibrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class OpenLibraryTool extends Tool<OpenLibraryToolOutput, ToolOptions, To

protected async _run(
input: ToolInput<this>,
_options: ToolRunOptions | undefined,
_options: Partial<ToolRunOptions>,
run: GetRunContext<this>,
) {
const request = {
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/langchain/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class LangChainTool<T extends AnyZodObject, TOutput = any> extends Tool<

protected async _run(
arg: ToolInput<this>,
options: LangChainToolRunOptions | undefined,
options: Partial<LangChainToolRunOptions>,
run: GetRunContext<this>,
): Promise<JSONToolOutput<TOutput>> {
const { outputClass = JSONToolOutput } = this.options;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/database/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class SQLTool extends Tool<SQLToolOutput, ToolOptions, ToolRunOptions> {

protected async _run(
input: ToolInput<this>,
_options: ToolRunOptions | undefined,
_options: Partial<ToolRunOptions>,
): Promise<SQLToolOutput> {
const { provider, connection } = this.options;
const { schema } = connection;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/search/duckDuckGoSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class DuckDuckGoSearchTool extends Tool<

protected async _run(
{ query: input }: ToolInput<this>,
options: DuckDuckGoSearchToolRunOptions | undefined,
options: Partial<DuckDuckGoSearchToolRunOptions>,
run: RunContext<this>,
) {
const headers = new HeaderGenerator().getHeaders();
Expand Down
2 changes: 1 addition & 1 deletion src/tools/search/googleSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class GoogleSearchTool extends Tool<

protected async _run(
{ query: input }: ToolInput<this>,
_options: GoogleSearchToolRunOptions | undefined,
_options: Partial<GoogleSearchToolRunOptions>,
run: RunContext<this>,
) {
const results = await paginate({
Expand Down

0 comments on commit df5438a

Please sign in to comment.