From 81c347f5382081baa8f03bcc51aabf1a0f53afce Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sat, 18 Jan 2025 22:49:03 -0300 Subject: [PATCH] Update llmExtract.ts --- .../scraper/scrapeURL/transformers/llmExtract.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts b/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts index 020e6ccf..b5d8356e 100644 --- a/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts +++ b/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts @@ -282,6 +282,22 @@ Consider: 3. Appropriate data types for each field 4. Nested objects and arrays where appropriate +Valid JSON schema, has to be simple. No crazy properties. OpenAI has to support it. +Supported types +The following types are supported for Structured Outputs: + +String +Number +Boolean +Integer +Object +Array +Enum +anyOf + +Formats are not supported. Min/max are not supported. Anything beyond the above is not supported. Keep it simple with types and descriptions. +Optionals are not supported. +Keep it simple. Don't create too many properties, just the ones that are needed. Don't invent properties. Return a valid JSON schema object with properties that would capture the information requested in the prompt.`, }, {