renderAsString

Renders a list of demonstrations as a single concatenated string.

Used with FewShotPromptType.AS_STRING to produce a single user message containing all demonstrations.

Return

A formatted string with all demonstrations, or null if the list is empty.

Parameters

demonstrations

The demonstrations to render.

format

Whether to include intermediate traces or only input/output.