Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update llmExtract.ts

Nicolase899ecbe44de
diff --git a/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts b/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts
index 6380edb8a..9b23af2c6 100644
--- a/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts
+++ b/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts
@@ -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