mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
fix(aistudio): remove generationConfig and tools when action is countTokens
This commit is contained in:
@@ -192,6 +192,10 @@ func (e *AistudioExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.A
|
||||
if err != nil {
|
||||
return cliproxyexecutor.Response{}, err
|
||||
}
|
||||
|
||||
body.payload, _ = sjson.DeleteBytes(body.payload, "generationConfig")
|
||||
body.payload, _ = sjson.DeleteBytes(body.payload, "tools")
|
||||
|
||||
endpoint := e.buildEndpoint(req.Model, "countTokens", "")
|
||||
wsReq := &wsrelay.HTTPRequest{
|
||||
Method: http.MethodPost,
|
||||
|
||||
Reference in New Issue
Block a user