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

Method MaskConfig

ai-provider/model-runtime/provider.go:368–381  ·  view source on GitHub ↗
(cfg string)

Source from the content-addressed store, hash-verified

366}
367
368func (p *Provider) MaskConfig(cfg string) string {
369 var data map[string]string
370 err := json.Unmarshal([]byte(cfg), &data)
371 if err != nil {
372 return cfg
373 }
374 for _, key := range p.maskKeys {
375 if _, ok := data[key]; ok {
376 data[key] = "******"
377 }
378 }
379 result, _ := json.Marshal(data)
380 return string(result)
381}
382
383func (p *Provider) SetDefaultModel(modelType string, model IModel) {
384 p.registry.addModel(model, true)

Callers

nothing calls this directly

Calls 1

MarshalMethod · 0.80

Tested by

no test coverage detected