(provider string, model string, config string)
| 202 | } |
| 203 | |
| 204 | func newModel(provider string, model string, config string) *gateway.DynamicRelease { |
| 205 | if config == "" { |
| 206 | config = "{}" |
| 207 | } |
| 208 | return &gateway.DynamicRelease{ |
| 209 | BasicItem: &gateway.BasicItem{ |
| 210 | ID: fmt.Sprintf("%s$%s", provider, model), |
| 211 | Description: fmt.Sprintf("auto generated model: %s, provider: %s", model, provider), |
| 212 | Resource: "ai-model", |
| 213 | Version: time.Now().Format("20060102150405"), |
| 214 | MatchLabels: map[string]string{ |
| 215 | "module": "ai-model", |
| 216 | }, |
| 217 | }, |
| 218 | Attr: map[string]interface{}{ |
| 219 | "provider": provider, |
| 220 | "model": model, |
| 221 | "access_config": config, |
| 222 | }, |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | func (i *imlProviderModelModule) syncGateway(ctx context.Context, clusterId string, releases []*gateway.DynamicRelease, online bool) error { |
| 227 | client, err := i.clusterService.GatewayClient(ctx, clusterId) |
no outgoing calls
no test coverage detected