diff --git a/src/c++/perf_analyzer/genai-perf/genai_perf/profile_data_parser/llm_profile_data_parser.py b/src/c++/perf_analyzer/genai-perf/genai_perf/profile_data_parser/llm_profile_data_parser.py index d812858c5..577ed2986 100755 --- a/src/c++/perf_analyzer/genai-perf/genai_perf/profile_data_parser/llm_profile_data_parser.py +++ b/src/c++/perf_analyzer/genai-perf/genai_perf/profile_data_parser/llm_profile_data_parser.py @@ -220,6 +220,8 @@ def _get_openai_input_text(self, req_inputs: dict) -> str: return payload["prompt"] elif self._response_format == ResponseFormat.OPENAI_VISION: content = payload["messages"][0]["content"] + # When no images were included in the request input, the content + # is same as text-only chat completions format (e.g. string). if isinstance(content, str): return content return " ".join(c["text"] for c in content if c["type"] == "text")