diff --git a/src/evidently/utils/llm/prompts.py b/src/evidently/utils/llm/prompts.py index bc0eed4749..ce4fb13990 100644 --- a/src/evidently/utils/llm/prompts.py +++ b/src/evidently/utils/llm/prompts.py @@ -146,7 +146,7 @@ def _render(self) -> str: This should be only a list of string {self.of_what}, each one on a new line with no enumeration""" def parse_response(self, response: str) -> List[str]: - return response.split("\n") + return [line.strip() for line in response.split("\n") if line.strip()] class StringFormatBlock(OutputFormatBlock[str]):