Skip to content

Commit

Permalink
fix(tools): correctly infer input type for DynamicTool
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <[email protected]>
  • Loading branch information
Tomas2D committed Nov 14, 2024
1 parent 5e1de24 commit 90db143
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export abstract class Tool<
abstract description: string;

public readonly cache: BaseCache<Task<TOutput>>;
protected readonly options: TOptions;
public readonly options: TOptions;

public readonly emitter = Emitter.root.child<ToolCallbacks<ToolInput<this>, TOutput>>({
namespace: ["tool"],
Expand Down Expand Up @@ -400,10 +400,10 @@ export class DynamicTool<

declare name: string;
declare description: string;
private readonly _inputSchema: AnyToolSchemaLike;
private readonly _inputSchema: TInputSchema;
private readonly handler;

inputSchema() {
inputSchema(): TInputSchema {
return this._inputSchema;
}

Expand Down

0 comments on commit 90db143

Please sign in to comment.