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

Function GetPricing

model/pricing.go:35–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33)
34
35func GetPricing() []Pricing {
36 if time.Since(lastGetPricingTime) > time.Minute*1 || len(pricingMap) == 0 {
37 updatePricingLock.Lock()
38 defer updatePricingLock.Unlock()
39 // Double check after acquiring the lock
40 if time.Since(lastGetPricingTime) > time.Minute*1 || len(pricingMap) == 0 {
41 modelSupportEndpointsLock.Lock()
42 defer modelSupportEndpointsLock.Unlock()
43 updatePricing()
44 }
45 }
46 return pricingMap
47}
48
49func GetModelSupportEndpointTypes(model string) []constant.EndpointType {
50 if model == "" {

Callers 2

InitResourcesFunction · 0.92
GetPricingFunction · 0.92

Calls 1

updatePricingFunction · 0.85

Tested by

no test coverage detected