MCPcopy Index your code
hub / github.com/docker/docker-agent / NewProvider

Method NewProvider

pkg/rag/builder.go:33–37  ·  view source on GitHub ↗

NewProvider creates a model provider using the build config's environment, gateway, and custom provider settings. It uses the provider registry carried by RuntimeConfig (populated by the team loader with the full provider set); without it, model creation fails with "unknown provider type".

(ctx context.Context, cfg *latest.ModelConfig)

Source from the content-addressed store, hash-verified

31// by RuntimeConfig (populated by the team loader with the full provider set);
32// without it, model creation fails with "unknown provider type".
33func (c ManagersBuildConfig) NewProvider(ctx context.Context, cfg *latest.ModelConfig) (provider.Provider, error) {
34 return c.RuntimeConfig.ProviderRegistryOrDefault().New(ctx, cfg, c.Env,
35 options.WithGateway(c.ModelsGateway),
36 options.WithProviders(c.Providers))
37}
38
39// NewManager constructs a single RAG manager from a RAGConfig.
40func NewManager(

Callers 1

buildRerankingConfigFunction · 0.45

Calls 4

WithGatewayFunction · 0.92
WithProvidersFunction · 0.92
NewMethod · 0.45

Tested by

no test coverage detected