MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / NewOpenAIProvider

Function NewOpenAIProvider

internal/provider/openai.go:34–41  ·  view source on GitHub ↗

NewOpenAIProvider constructs the provider. The SDK reads OPENAI_API_KEY from the environment by default; pass option.WithAPIKey if you need to override.

(model, system string, maxTokens int64)

Source from the content-addressed store, hash-verified

32// from the environment by default; pass option.WithAPIKey if you need to
33// override.
34func NewOpenAIProvider(model, system string, maxTokens int64) *OpenAIProvider {
35 return &OpenAIProvider{
36 client: openai.NewClient(),
37 model: model,
38 system: system,
39 maxTokens: maxTokens,
40 }
41}
42
43func (p *OpenAIProvider) Model() string {
44 p.mu.Lock()

Callers 1

newProviderByNameFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected