Skip to content

Commit

Permalink
fix: Correct schema for run name generation (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith authored Dec 15, 2024
1 parent da55519 commit 5c86cf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion control-plane/src/modules/workflows/summarization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -39,7 +40,7 @@ export const generateTitle = async (
content: message,
},
],
schema,
schema: zodToJsonSchema(schema),
});

const parsed = schema.safeParse(response.structured);
Expand Down

0 comments on commit 5c86cf7

Please sign in to comment.