bugfix(tool call ebnf): Fix EBNF generation for optional function parameters (#7283)

This commit is contained in:
Chang Su
2025-06-17 13:36:07 -07:00
committed by GitHub
parent 8c16da334e
commit e726131523
4 changed files with 320 additions and 10 deletions

View File

@@ -77,7 +77,11 @@ class TestToolChoiceLlama32(CustomTestCase):
"city": {
"type": "string",
"description": "name of the city to get weather for",
}
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"],
},
},
"required": ["city"],
},
@@ -152,7 +156,7 @@ class TestToolChoiceLlama32(CustomTestCase):
"enum": ["celsius", "fahrenheit"],
},
},
"required": ["location", "unit"],
"required": ["location"],
},
},
},