From 6d0968d6ec1e421bb9dcc619d0349eacc804e0a2 Mon Sep 17 00:00:00 2001 From: Yulong Ruan Date: Wed, 11 Sep 2024 17:19:14 +0800 Subject: [PATCH] fix: make input_instruction can be empty string Signed-off-by: Yulong Ruan --- server/routes/text2viz_routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/text2viz_routes.ts b/server/routes/text2viz_routes.ts index f77d9f2a..760ecc45 100644 --- a/server/routes/text2viz_routes.ts +++ b/server/routes/text2viz_routes.ts @@ -27,7 +27,7 @@ export function registerText2VizRoutes(router: IRouter, assistantService: Assist validate: { body: schema.object({ input_question: inputSchema, - input_instruction: schema.maybe(inputSchema), + input_instruction: schema.maybe(schema.string({ maxLength: TEXT2VEGA_INPUT_SIZE_LIMIT })), ppl: schema.string(), dataSchema: schema.string(), sampleData: schema.string(),