fix: ensure campos is always an array in pickSchemaFields function
This commit is contained in:
@@ -2,7 +2,7 @@ import { HttpError } from "./errors.ts";
|
||||
|
||||
export function pickSchemaFields(
|
||||
definicion: any,
|
||||
campos?: string[],
|
||||
campos: string[],
|
||||
) {
|
||||
if (!definicion || definicion.type !== "object" || !definicion.properties) {
|
||||
return definicion;
|
||||
@@ -18,6 +18,11 @@ export function pickSchemaFields(
|
||||
"Listo: mejoré la redacción del perfil de ingreso y propuse un tema de investigación alineado al plan.",
|
||||
],
|
||||
},
|
||||
"is-refusal": {
|
||||
type: "boolean",
|
||||
description:
|
||||
"Indica si el plan fue rechazado por el modelo. En caso de ser true, se espera un mensaje de rechazo en `ai-message`.",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user