@@ -74,13 +74,9 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
7474 }
7575 value = strings .TrimSpace (value )
7676 switch normalize (key ) {
77- case "tool" :
78- fallthrough
7977 case "name" :
8078 tool .Parameters .Name = strings .ToLower (value )
81- case "model" :
82- fallthrough
83- case "modelname" :
79+ case "model" , "modelname" :
8480 tool .Parameters .ModelName = value
8581 case "description" :
8682 tool .Parameters .Description = value
@@ -92,17 +88,13 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
9288 tool .Parameters .InternalPrompt = & v
9389 case "export" :
9490 tool .Parameters .Export = append (tool .Parameters .Export , csv (strings .ToLower (value ))... )
95- case "tools" :
91+ case "tool" , " tools" :
9692 tool .Parameters .Tools = append (tool .Parameters .Tools , csv (strings .ToLower (value ))... )
97- case "args" :
98- fallthrough
99- case "arg" :
93+ case "args" , "arg" , "param" , "params" , "parameters" , "parameter" :
10094 if err := addArg (value , tool ); err != nil {
10195 return false , err
10296 }
103- case "maxtoken" :
104- fallthrough
105- case "maxtokens" :
97+ case "maxtoken" , "maxtokens" :
10698 tool .Parameters .MaxTokens , err = strconv .Atoi (value )
10799 if err != nil {
108100 return false , err
@@ -113,15 +105,7 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
113105 return false , err
114106 }
115107 tool .Parameters .Cache = & b
116- case "jsonmode" :
117- fallthrough
118- case "json" :
119- fallthrough
120- case "jsonoutput" :
121- fallthrough
122- case "jsonformat" :
123- fallthrough
124- case "jsonresponse" :
108+ case "jsonmode" , "json" , "jsonoutput" , "jsonformat" , "jsonresponse" :
125109 tool .Parameters .JSONResponse , err = toBool (value )
126110 if err != nil {
127111 return false , err
0 commit comments