mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-26 02:07:28 +08:00
fix: sse response (#6468)
This commit is contained in:
@@ -49,7 +49,9 @@ const WorkflowResponseItemSchema = z.object({
|
||||
id: z.string().optional(),
|
||||
stepId: z.string().optional(),
|
||||
event: z.custom<SseResponseEventEnum>(),
|
||||
data: z.record(z.string(), z.any())
|
||||
data: z.custom<Record<string, any> & { length?: never }>(
|
||||
(val) => typeof val === 'object' && val !== null && !Array.isArray(val)
|
||||
)
|
||||
});
|
||||
export type WorkflowResponseItemType = z.infer<typeof WorkflowResponseItemSchema>;
|
||||
export const WorkflowResponseFnSchema = z.function({
|
||||
|
||||
Reference in New Issue
Block a user