MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / newRelease

Function newRelease

module/ai-balance/iml.go:117–137  ·  view source on GitHub ↗
(item *ai_balance.Balance, base string)

Source from the content-addressed store, hash-verified

115}
116
117func newRelease(item *ai_balance.Balance, base string) *gateway.DynamicRelease {
118
119 cfg := make(map[string]interface{})
120 cfg["provider"] = item.Provider
121 cfg["model"] = item.Model
122 cfg["model_config"] = ai_provider_local.LocalConfig
123 cfg["base"] = base
124 cfg["priority"] = item.Priority
125 return &gateway.DynamicRelease{
126 BasicItem: &gateway.BasicItem{
127 ID: item.Id,
128 Description: item.ModelName,
129 Resource: "ai-provider",
130 Version: item.UpdateAt.Format("20060102150405"),
131 MatchLabels: map[string]string{
132 "module": "ai-provider",
133 },
134 },
135 Attr: cfg,
136 }
137}
138
139func (i *imlBalanceModule) Sort(ctx context.Context, input *ai_balance_dto.Sort) error {
140 var list []*ai_balance.Balance

Callers 4

CreateMethod · 0.85
SortMethod · 0.85
getLocalBalancesMethod · 0.85
getBalancesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected