nsarrazin HF Staff commited on
Commit
a7fff37
·
unverified ·
1 Parent(s): b526144

feat(tools): add support for number outputs

Browse files
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([z.literal("textbox"), z.literal("markdown"), z.literal("image"), z.literal("gallery")])
 
 
 
 
 
 
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>;