@@ -74,13 +74,9 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
74
74
}
75
75
value = strings .TrimSpace (value )
76
76
switch normalize (key ) {
77
- case "tool" :
78
- fallthrough
79
77
case "name" :
80
78
tool .Parameters .Name = strings .ToLower (value )
81
- case "model" :
82
- fallthrough
83
- case "modelname" :
79
+ case "model" , "modelname" :
84
80
tool .Parameters .ModelName = value
85
81
case "description" :
86
82
tool .Parameters .Description = value
@@ -92,17 +88,13 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
92
88
tool .Parameters .InternalPrompt = & v
93
89
case "export" :
94
90
tool .Parameters .Export = append (tool .Parameters .Export , csv (strings .ToLower (value ))... )
95
- case "tools" :
91
+ case "tool" , " tools" :
96
92
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" :
100
94
if err := addArg (value , tool ); err != nil {
101
95
return false , err
102
96
}
103
- case "maxtoken" :
104
- fallthrough
105
- case "maxtokens" :
97
+ case "maxtoken" , "maxtokens" :
106
98
tool .Parameters .MaxTokens , err = strconv .Atoi (value )
107
99
if err != nil {
108
100
return false , err
@@ -113,15 +105,7 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
113
105
return false , err
114
106
}
115
107
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" :
125
109
tool .Parameters .JSONResponse , err = toBool (value )
126
110
if err != nil {
127
111
return false , err
0 commit comments