Skip to content

Commit 7459c2c

Browse files
committed
fix(aistudio): remove generationConfig and tools when action is countTokens
1 parent 359b8de commit 7459c2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/runtime/executor/aistudio_executor.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ func (e *AistudioExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.A
192192
if err != nil {
193193
return cliproxyexecutor.Response{}, err
194194
}
195+
196+
body.payload, _ = sjson.DeleteBytes(body.payload, "generationConfig")
197+
body.payload, _ = sjson.DeleteBytes(body.payload, "tools")
198+
195199
endpoint := e.buildEndpoint(req.Model, "countTokens", "")
196200
wsReq := &wsrelay.HTTPRequest{
197201
Method: http.MethodPost,

0 commit comments

Comments
 (0)