Skip to content

Commit

Permalink
fix empty strings in datagen (#1385)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike0sv authored Dec 5, 2024
1 parent 49cce31 commit f07a2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evidently/utils/llm/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down

0 comments on commit f07a2cb

Please sign in to comment.