From 162a7089213a03d6f408e9f813e4a79cb04ce197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Je=C5=BEek?= Date: Mon, 6 Jan 2025 09:17:49 +0100 Subject: [PATCH] fixup! resolve PR comments --- src/runs/execution/tools/wikipedia-tool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runs/execution/tools/wikipedia-tool.ts b/src/runs/execution/tools/wikipedia-tool.ts index b9862dd..6e3a70c 100644 --- a/src/runs/execution/tools/wikipedia-tool.ts +++ b/src/runs/execution/tools/wikipedia-tool.ts @@ -79,7 +79,7 @@ export function wikipediaTool( query: input.question, documents: output.results.flatMap((document, idx) => Array.from( - splitString(document.fields.markdown as string, { + splitString((document.fields.markdown as string | null) || '', { size: passageSizeTokens * CHARS_PER_TOKEN_AVG, overlap: overlapTokens * CHARS_PER_TOKEN_AVG })