MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetGroupRateLimit

Function GetGroupRateLimit

setting/rate_limit.go:36–49  ·  view source on GitHub ↗
(group string)

Source from the content-addressed store, hash-verified

34}
35
36func GetGroupRateLimit(group string) (totalCount, successCount int, found bool) {
37 ModelRequestRateLimitMutex.RLock()
38 defer ModelRequestRateLimitMutex.RUnlock()
39
40 if ModelRequestRateLimitGroup == nil {
41 return 0, 0, false
42 }
43
44 limits, found := ModelRequestRateLimitGroup[group]
45 if !found {
46 return 0, 0, false
47 }
48 return limits[0], limits[1], true
49}
50
51func CheckModelRequestRateLimitGroup(jsonStr string) error {
52 checkModelRequestRateLimitGroup := make(map[string][2]int)

Callers 1

ModelRequestRateLimitFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected