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

Method SimpleProvider

module/ai/iml.go:233–245  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

231}
232
233func (i *imlProviderModule) SimpleProvider(ctx context.Context, id string) (*ai_dto.SimpleProvider, error) {
234 p, has := model_runtime.GetProvider(id)
235 if !has {
236 return nil, fmt.Errorf("ai provider not found")
237 }
238 return &ai_dto.SimpleProvider{
239 Id: p.ID(),
240 Name: p.Name(),
241 Logo: p.Logo(),
242 DefaultConfig: p.DefaultConfig(),
243 GetAPIKeyUrl: p.HelpUrl(),
244 }, nil
245}
246
247func (i *imlProviderModule) ConfiguredProviders(ctx context.Context, keyword string) ([]*ai_dto.ConfiguredProviderItem, error) {
248 // 获取已配置的AI服务商

Callers

nothing calls this directly

Calls 5

IDMethod · 0.65
NameMethod · 0.65
LogoMethod · 0.65
DefaultConfigMethod · 0.65
HelpUrlMethod · 0.65

Tested by

no test coverage detected