[Bugfix] Handle None parameters in Mistral function calls. (#13786)
This commit is contained in:
committed by
GitHub
parent
0ecdd98031
commit
215bf150a6
@@ -41,7 +41,40 @@ from vllm.transformers_utils.tokenizers.mistral import (
|
||||
)
|
||||
],
|
||||
),
|
||||
)],
|
||||
),
|
||||
(
|
||||
{
|
||||
"messages":
|
||||
[{
|
||||
"role": "user",
|
||||
"content": "What is the current local date and time?",
|
||||
}],
|
||||
"tools": [{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"description": "Fetch the current local date and time.",
|
||||
"name": "get_current_time",
|
||||
"parameters": None,
|
||||
},
|
||||
}],
|
||||
},
|
||||
ChatCompletionRequest(
|
||||
messages=[
|
||||
UserMessage(
|
||||
content="What is the current local date and time?")
|
||||
],
|
||||
tools=[
|
||||
Tool(
|
||||
type="function",
|
||||
function=Function(
|
||||
name="get_current_time",
|
||||
description="Fetch the current local date and time.",
|
||||
parameters={},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)],
|
||||
)
|
||||
def test_make_mistral_chat_completion_request(openai_request,
|
||||
expected_mistral_request):
|
||||
|
||||
Reference in New Issue
Block a user