Update llmExtract.ts

This commit is contained in:
Nicolas 2024-12-18 16:52:05 -03:00
parent bd36c441d3
commit e899ecbe44

View File

@ -159,8 +159,8 @@ export async function generateOpenAICompletions(
role: "user",
content:
options.prompt !== undefined
? `Transform the above content into structured JSON output based on the following user request: ${options.prompt}`
: "Transform the above content into structured JSON output.",
? `Transform the above content into structured JSON output based on the provided schema if any and the following user request: ${options.prompt}`
: "Transform the above content into structured JSON output based on the provided schema if any.",
},
],
response_format: options.schema