mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 12:20: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 {
|
if err != nil {
|
||||||
return cliproxyexecutor.Response{}, err
|
return cliproxyexecutor.Response{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.payload, _ = sjson.DeleteBytes(body.payload, "generationConfig")
|
||||||
|
body.payload, _ = sjson.DeleteBytes(body.payload, "tools")
|
||||||
|
|
||||||
endpoint := e.buildEndpoint(req.Model, "countTokens", "")
|
endpoint := e.buildEndpoint(req.Model, "countTokens", "")
|
||||||
wsReq := &wsrelay.HTTPRequest{
|
wsReq := &wsrelay.HTTPRequest{
|
||||||
Method: http.MethodPost,
|
Method: http.MethodPost,
|
||||||
|
|||||||
Reference in New Issue
Block a user