Skip to content

Commit e7c174a

Browse files
authored
feat: set null text output to empty string (#427)
1 parent ee6af79 commit e7c174a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

genai-perf/genai_perf/profile_data_parser/llm_profile_data_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def _extract_text_output(self, response: str) -> str:
485485
extract_method = extraction_methods.get(
486486
self._response_format, self._throw_unknown_response_format_error
487487
)
488-
return extract_method(response)
488+
return extract_method(response) or "" # prevent null output
489489

490490
def _get_response_output_tokens(self, output_texts: List[str]) -> List[List[int]]:
491491
"""Return a list of response output tokens."""

0 commit comments

Comments
 (0)