MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / SumByApis

Method SumByApis

service/ai-api/iml.go:180–195  ·  view source on GitHub ↗
(ctx context.Context, providerId string, start, end int64, apiIds ...string)

Source from the content-addressed store, hash-verified

178}
179
180func (i *imlAPIUseService) SumByApis(ctx context.Context, providerId string, start, end int64, apiIds ...string) ([]*APIUse, error) {
181 //list, err := i.store.SumByGroup(ctx, "api", "api,sum(input_token) as input_token,sum(output_token) as output_token,sum(total_token) as total_token", "provider = ? and api in (?) and minute >= ? and minute <= ?", providerId, apiIds, start, end)
182 //if err != nil {
183 // return nil, err
184 //}
185 //
186 //return utils.SliceToSlice(list, func(v *api.AiAPIUse) *APIUse {
187 // return &APIUse{
188 // API: v.API,
189 // InputToken: v.InputToken,
190 // OutputToken: v.OutputToken,
191 // TotalToken: v.TotalToken,
192 // }
193 //}), nil
194 return nil, nil
195}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected