MCPcopy Index your code
hub / github.com/coder/coder / NewCopilot

Function NewCopilot

aibridge/provider/copilot.go:57–71  ·  view source on GitHub ↗
(cfg config.Copilot)

Source from the content-addressed store, hash-verified

55var _ Provider = &Copilot{}
56
57func NewCopilot(cfg config.Copilot) *Copilot {
58 if cfg.Name == "" {
59 cfg.Name = config.ProviderCopilot
60 }
61 if cfg.BaseURL == "" {
62 cfg.BaseURL = copilotBaseURL
63 }
64 if cfg.CircuitBreaker != nil {
65 cfg.CircuitBreaker.OpenErrorResponse = copilotOpenErrorResponse
66 }
67 return &Copilot{
68 cfg: cfg,
69 circuitBreaker: cfg.CircuitBreaker,
70 }
71}
72
73func (*Copilot) Type() string {
74 return config.ProviderCopilot

Callers 7

NewCopilotProviderFunction · 0.92
TestAPIDumpFunction · 0.92
TestAPIDumpPassthroughFunction · 0.92
TestCopilot_TypeAndNameFunction · 0.85

Calls

no outgoing calls

Tested by 6

TestAPIDumpFunction · 0.74
TestAPIDumpPassthroughFunction · 0.74
TestCopilot_TypeAndNameFunction · 0.68