Skip to content

Commit

Permalink
Patch vLLM for missing content entry (#671)
Browse files Browse the repository at this point in the history
* Patch vLLM

* Formatting
  • Loading branch information
IzzyPutterman authored May 21, 2024
1 parent bba524d commit eae8430
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/c++/perf_analyzer/genai-perf/genai_perf/llm_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,11 @@ def _preprocess_response(
responses = response.strip().split("\n\n")
if len(responses) > 1:
merged_response = json.loads(remove_sse_prefix(responses[0]))
if (
merged_response["choices"][0]["delta"].get("content", None)
is None
):
merged_response["choices"][0]["delta"]["content"] = ""
for r in responses[1:]:
text = self._extract_openai_text_output(r)
merged_response["choices"][0]["delta"]["content"] += text
Expand Down

0 comments on commit eae8430

Please sign in to comment.