From 5c86cf77685006f8767e121af6bba8796ed72b09 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 15 Dec 2024 15:23:17 +1030 Subject: [PATCH] fix: Correct schema for run name generation (#309) --- control-plane/src/modules/workflows/summarization.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/control-plane/src/modules/workflows/summarization.ts b/control-plane/src/modules/workflows/summarization.ts index 4017b49..6316984 100644 --- a/control-plane/src/modules/workflows/summarization.ts +++ b/control-plane/src/modules/workflows/summarization.ts @@ -3,6 +3,7 @@ import { Run } from "./workflows"; import { logger } from "../observability/logger"; import { RetryableError } from "../../utilities/errors"; import { buildModel } from "../models"; +import { zodToJsonSchema } from "zod-to-json-schema"; export const generateTitle = async ( message: string, @@ -39,7 +40,7 @@ export const generateTitle = async ( content: message, }, ], - schema, + schema: zodToJsonSchema(schema), }); const parsed = schema.safeParse(response.structured);