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

Function WithBaseURL

provider/openai/options.go:79–83  ·  view source on GitHub ↗

WithBaseURL returns a new Option that sets the base URL for the client configuration. It takes a string value representing the base URL to use for requests. It returns an optionFunc that sets the baseURL field of the configuration to the provided

(val string)

Source from the content-addressed store, hash-verified

77// It takes a string value representing the base URL to use for requests.
78// It returns an optionFunc that sets the baseURL field of the configuration to the provided
79func WithBaseURL(val string) Option {
80 return optionFunc(func(c *config) {
81 c.baseURL = val
82 })
83}
84
85// WithTimeout returns a new Option that sets the timeout for the client configuration.
86// It takes a time.Duration value representing the timeout duration.

Callers 2

NewOpenAIFunction · 0.92
TestCompletionStreamFunction · 0.85

Calls 1

optionFuncFuncType · 0.70

Tested by 1

TestCompletionStreamFunction · 0.68