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 })