Spaces:
Running
Running
feat(tools): add support for number outputs
Browse files- src/lib/server/tools/outputs.ts +4 -0
- src/lib/types/Tool.ts +7 -1
src/lib/server/tools/outputs.ts
CHANGED
@@ -15,6 +15,10 @@ export const ToolOutputPaths: Record<
|
|
15 |
type: "str",
|
16 |
path: "$",
|
17 |
},
|
|
|
|
|
|
|
|
|
18 |
image: {
|
19 |
type: "file",
|
20 |
path: "$.url",
|
|
|
15 |
type: "str",
|
16 |
path: "$",
|
17 |
},
|
18 |
+
number: {
|
19 |
+
type: "float",
|
20 |
+
path: "$",
|
21 |
+
},
|
22 |
image: {
|
23 |
type: "file",
|
24 |
path: "$.url",
|
src/lib/types/Tool.ts
CHANGED
@@ -31,7 +31,13 @@ export const ToolOutputComponents = z
|
|
31 |
.string()
|
32 |
.toLowerCase()
|
33 |
.pipe(
|
34 |
-
z.union([
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
);
|
36 |
|
37 |
export type ToolOutputComponents = z.infer<typeof ToolOutputComponents>;
|
|
|
31 |
.string()
|
32 |
.toLowerCase()
|
33 |
.pipe(
|
34 |
+
z.union([
|
35 |
+
z.literal("textbox"),
|
36 |
+
z.literal("markdown"),
|
37 |
+
z.literal("image"),
|
38 |
+
z.literal("gallery"),
|
39 |
+
z.literal("number"),
|
40 |
+
])
|
41 |
);
|
42 |
|
43 |
export type ToolOutputComponents = z.infer<typeof ToolOutputComponents>;
|