Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing error message.
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Shenoy <varun.vinayak.shenoy@oracle.com>
shenoyvvarun committed Nov 22, 2024
1 parent 5ee5b41 commit fada59d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vllm/entrypoints/openai/protocol.py
Original file line number Diff line number Diff line change
@@ -481,13 +481,13 @@ def check_tool_usage(cls, data):
specified_function = data["tool_choice"].get("function")
if not specified_function:
raise ValueError(
"Incorrectly formatted `tool_choice`. Should be like "
"Missing function in `tool_choice`. Correct usage: "
"`{\"type\": \"function\","
" \"function\": {\"name\": \"my_function\"}}`")
specified_function_name = specified_function.get("name")
if not specified_function_name:
raise ValueError(
"Incorrectly formatted `tool_choice`. Should be like "
"Missing name for `function` in `tool_choice`. Correct usage: "

Check failure on line 490 in vllm/entrypoints/openai/protocol.py

GitHub Actions / ruff (3.12)

Ruff (E501)

vllm/entrypoints/openai/protocol.py:490:81: E501 Line too long (87 > 80)
"`{\"type\": \"function\", "
"\"function\": {\"name\": \"my_function\"}}`")
for tool in data["tools"]:

0 comments on commit fada59d

Please sign in to comment.