mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Tool result refactor (return an object instead of a string)
This commit is contained in:
40 files changed
+315
-276
No files matched your search
@@ -1,7 +1,12 @@
|
||||
import type z from "zod";
|
||||
|
||||
export interface ToolResult {
|
||||
content: string;
|
||||
cost?: number;
|
||||
}
|
||||
|
||||
export interface Tool<TParams> {
|
||||
description: string;
|
||||
inputSchema?: z.ZodType<TParams>;
|
||||
execute(args: TParams): Promise<string>;
|
||||
execute(args: TParams): Promise<ToolResult>;
|
||||
}
|
||||
Reference in new issue
Block a user