@@ -268,7 +268,7 @@ func GetFuncCallResult(
268
268
case "python" : {
269
269
parameters := data ["parameters" ].(map [string ]interface {})
270
270
codeContent := parameters ["code" ].(string )
271
- if inputC , ok := parameters ["input" ]; ok == true {
271
+ if inputC , ok := parameters ["input" ]; ok {
272
272
inputContent = inputC .(string )
273
273
}
274
274
url = UrlConfig .pythonUrl
@@ -284,7 +284,7 @@ func GetFuncCallResult(
284
284
case "retrieval" : {
285
285
url = UrlConfig .retrievalUrl
286
286
parameters := data ["parameters" ].(map [string ]interface {})
287
- query := parameters ["query" ].([] string )
287
+ query := parameters ["query" ].(string )
288
288
body = map [string ]interface {} {
289
289
"query" : query ,
290
290
"top_k" : 5 ,
@@ -295,7 +295,7 @@ func GetFuncCallResult(
295
295
case "document" : {
296
296
url = UrlConfig .documentUrl
297
297
parameters := data ["parameters" ].(map [string ]interface {})
298
- query := parameters ["question" ].([] string )
298
+ query := parameters ["question" ].(string )
299
299
300
300
body = map [string ]interface {} {
301
301
"query" : query ,
@@ -306,7 +306,7 @@ func GetFuncCallResult(
306
306
case "bingapi" : {
307
307
url = UrlConfig .bingapiUrl
308
308
parameters := data ["parameters" ].(map [string ]interface {})
309
- query := parameters ["question" ].([] string )
309
+ query := parameters ["question" ].(string )
310
310
topK := 2
311
311
if val , exists := parameters ["top_k" ]; exists {
312
312
topK = val .(int )
0 commit comments