Signed-off-by: baonudesifeizhai <baonudesifeizhai@gmail.com>
This commit is contained in:
@@ -217,16 +217,13 @@ class MinimaxM2ToolParser(ToolParser):
|
|||||||
Returns:
|
Returns:
|
||||||
The converted value
|
The converted value
|
||||||
"""
|
"""
|
||||||
if value.lower() == "null":
|
# Check if the VALUE itself indicates null (not just if null is allowed)
|
||||||
|
if value.lower() in ("null", "none", "nil"):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Normalize types
|
# Normalize types
|
||||||
normalized_types = [t.lower() for t in param_types]
|
normalized_types = [t.lower() for t in param_types]
|
||||||
|
|
||||||
# Try null first if it's in the list
|
|
||||||
if "null" in normalized_types or value.lower() in ("null", "none", "nil"):
|
|
||||||
return None
|
|
||||||
|
|
||||||
# Try each type in order of preference (most specific first, string as fallback)
|
# Try each type in order of preference (most specific first, string as fallback)
|
||||||
# Priority: integer > number > boolean > object > array > string
|
# Priority: integer > number > boolean > object > array > string
|
||||||
type_priority = [
|
type_priority = [
|
||||||
|
|||||||
Reference in New Issue
Block a user