Skip to content

Commit 751c30f

Browse files
committed
feat(extractSmartScrape): better pagination handling
1 parent 509e6e6 commit 751c30f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/api/src/scraper/scrapeURL/lib/extractSmartScrape.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const commonSmartScrapeProperties = {
1616
shouldUseSmartscrape: {
1717
type: "boolean",
1818
description:
19-
"Set to `true` if any of the extractedData is null and you think you can find the information by performing user-like interactions (e.g., clicking buttons/accordions to reveal hidden text, login, inputs etc.). SmartScrape can perform these actions to access the data.",
19+
"Set to `true` if any of the extractedData is null and you think you can find the information by performing user-like interactions (e.g., clicking buttons/accordions to reveal hidden text, login, inputs, pagination etc.). SmartScrape can perform these actions to access the data.",
2020
},
2121
// Note: extractedData is added dynamically in prepareSmartScrapeSchema
2222
};

apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export async function generateCompletions({
386386
const repairConfig = {
387387
experimental_repairText: async ({ text, error }) => {
388388
// AI may output a markdown JSON code block. Remove it - mogery
389-
logger.debug("Repairing text", { textType: typeof text, error });
389+
logger.debug("Repairing text", { textType: typeof text, textPeek: JSON.stringify(text).slice(0, 100) + "...", error });
390390

391391
if (typeof text === "string" && text.trim().startsWith("```")) {
392392
if (text.trim().startsWith("```json")) {

0 commit comments

Comments
 (0)