MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / GetClient

Function GetClient

cmd/provider.go:200–210  ·  view source on GitHub ↗

GetClient returns the generative client based on the platform

(ctx context.Context, p core.Platform)

Source from the content-addressed store, hash-verified

198
199// GetClient returns the generative client based on the platform
200func GetClient(ctx context.Context, p core.Platform) (core.Generative, error) {
201 switch p {
202 case core.Gemini:
203 return NewGemini(ctx)
204 case core.OpenAI, core.Azure:
205 return NewOpenAI(ctx)
206 case core.Anthropic:
207 return NewAnthropic(ctx)
208 }
209 return nil, errors.New("invalid provider")
210}

Callers 2

review.goFile · 0.85
commit.goFile · 0.85

Calls 3

NewGeminiFunction · 0.85
NewOpenAIFunction · 0.85
NewAnthropicFunction · 0.85

Tested by

no test coverage detected