Skip to content

Commit

Permalink
Update src/c++/perf_analyzer/genai-perf/genai_perf/profile_data_parse…
Browse files Browse the repository at this point in the history
…r/llm_profile_data_parser.py

Co-authored-by: Hyunjae Woo <[email protected]>
  • Loading branch information
mwawrzos and nv-hwoo authored Jul 30, 2024
1 parent 14a552a commit 0d4b143
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 0d4b143

Please sign in to comment.