Skip to content

Commit

Permalink
Make benchmark_guided_serving.py
Browse files Browse the repository at this point in the history
Signed-off-by: mgoin <[email protected]>
  • Loading branch information
mgoin committed Dec 3, 2024
1 parent 7090c27 commit 7854d0e
Show file tree
Hide file tree
Showing 2 changed files with 508 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benchmarks/backend_request_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class RequestFuncInput:
logprobs: Optional[int] = None
multi_modal_content: Optional[dict] = None
ignore_eos: bool = False
extra_body: Optional[dict[str, str]] = None


@dataclass
Expand Down Expand Up @@ -242,6 +243,8 @@ async def async_request_openai_completions(
"stream": True,
"ignore_eos": request_func_input.ignore_eos,
}
if request_func_input.extra_body:
payload.update(request_func_input.extra_body)
headers = {
"Authorization": f"Bearer {os.environ.get('OPENAI_API_KEY')}"
}
Expand Down
Loading

0 comments on commit 7854d0e

Please sign in to comment.