From a90092b004558438cfa622c34e167711180b4192 Mon Sep 17 00:00:00 2001 From: Nadeesha Cabral Date: Fri, 6 Dec 2024 13:04:23 +1100 Subject: [PATCH] fix: Limit JSON.stringify output to 20,000 characters (#240) --- bootstrap-node/src/run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-node/src/run.ts b/bootstrap-node/src/run.ts index 20ca09ac..aed1cf04 100644 --- a/bootstrap-node/src/run.ts +++ b/bootstrap-node/src/run.ts @@ -47,7 +47,7 @@ const summarizePost = async ({ data }: { data: object }) => .run({ initialPrompt: ` - ${JSON.stringify(data)} + ${JSON.stringify(data).substring(0, 20_000)} You are given a post from Hacker News, and a url for the post's comments.