fix: ensure campos is always an array in pickSchemaFields function
This commit is contained in:
@@ -300,7 +300,7 @@ app.post(`${prefix}/conversations/:id/messages`, async (c) => {
|
||||
}
|
||||
|
||||
// Pedimos respuesta estructurada con responses.create
|
||||
const schema = pickSchemaFields(definicion, body.campos);
|
||||
const schema = pickSchemaFields(definicion, body.campos ?? []);
|
||||
const planForPrompt = safePlanForPrompt(plan);
|
||||
|
||||
const model = CREATE_CHAT_CONVERSATION_STRUCTURED_MODELO;
|
||||
|
||||
Reference in New Issue
Block a user