Skip to content

Commit

Permalink
Fix streaming case for openai (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgerdesnv authored Mar 7, 2024
1 parent d1bb865 commit 886a177
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ def _add_optional_tags_to_openai_json(
if add_model_name:
pa_json["data"][index]["payload"][0]["model"] = model_name
if add_stream:
pa_json["data"][index]["payload"][0]["stream"] = [True]
pa_json["data"][index]["payload"][0]["stream"] = True

return pa_json

Expand Down
4 changes: 4 additions & 0 deletions src/c++/perf_analyzer/genai-pa/genai_pa/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def build_cmd(model, args, extra_args):
"input_format",
"output_format",
]
# OpenAI service-kind sets streaming via the input file, not via the CLI
if args.service_kind == "openai":
skip_args.append("streaming")

if hasattr(args, "version") and args.version:
cmd = f"perf_analyzer --version"
else:
Expand Down

0 comments on commit 886a177

Please sign in to comment.