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

Function WithToken

provider/openai/options.go:42–46  ·  view source on GitHub ↗

WithToken is a function that returns an Option, which sets the token field of the config struct.

(val string)

Source from the content-addressed store, hash-verified

40
41// WithToken is a function that returns an Option, which sets the token field of the config struct.
42func WithToken(val string) Option {
43 return optionFunc(func(c *config) {
44 c.token = val
45 })
46}
47
48// WithOrgID is a function that returns an Option, which sets the orgID field of the config struct.
49func WithOrgID(val string) Option {

Callers 3

NewOpenAIFunction · 0.92
Test_config_validFunction · 0.70
TestCompletionStreamFunction · 0.70

Calls 1

optionFuncFuncType · 0.70

Tested by 2

Test_config_validFunction · 0.56
TestCompletionStreamFunction · 0.56