Skip to content

Commit

Permalink
[Frontend] Relax api url assertion for openai benchmarking (vllm-proj…
Browse files Browse the repository at this point in the history
…ect#6046)

Signed-off-by: Alvant <[email protected]>
  • Loading branch information
jamestwhedbee authored and Alvant committed Oct 26, 2024
1 parent 0005bbd commit 5d5c154
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmarks/backend_request_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ async def async_request_openai_completions(
) -> RequestFuncOutput:
api_url = request_func_input.api_url
assert api_url.endswith(
"v1/completions"
), "OpenAI Completions API URL must end with 'v1/completions'."
"completions"
), "OpenAI Completions API URL must end with 'completions'."

async with aiohttp.ClientSession(timeout=AIOHTTP_TIMEOUT) as session:
assert not request_func_input.use_beam_search
Expand Down Expand Up @@ -304,8 +304,8 @@ async def async_request_openai_chat_completions(
) -> RequestFuncOutput:
api_url = request_func_input.api_url
assert api_url.endswith(
"v1/chat/completions"
), "OpenAI Chat Completions API URL must end with 'v1/chat/completions'."
"chat/completions"
), "OpenAI Chat Completions API URL must end with 'chat/completions'."

async with aiohttp.ClientSession(timeout=AIOHTTP_TIMEOUT) as session:
assert not request_func_input.use_beam_search
Expand Down

0 comments on commit 5d5c154

Please sign in to comment.