more concise

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
Yuan Tang 2025-02-28 12:46:31 -05:00
parent d6204b072f
commit df2d833e72
No known key found for this signature in database

View file

@ -274,7 +274,7 @@ class VLLMInferenceAdapter(Inference, ModelsProtocolPrivate):
# References: # References:
# * https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice # * https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice
# * https://github.com/vllm-project/vllm/pull/10000 # * https://github.com/vllm-project/vllm/pull/10000
if (tools is None or len(tools) == 0) and tool_config is not None: if not tools and tool_config is not None:
tool_config.tool_choice = ToolChoice.none tool_config.tool_choice = ToolChoice.none
request = ChatCompletionRequest( request = ChatCompletionRequest(
model=model.provider_resource_id, model=model.provider_resource_id,