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

Function WithTimeout

provider/openai/options.go:88–92  ·  view source on GitHub ↗

WithTimeout returns a new Option that sets the timeout for the client configuration. It takes a time.Duration value representing the timeout duration. It returns an optionFunc that sets the timeout field of the configuration to the provided value.

(val time.Duration)

Source from the content-addressed store, hash-verified

86// It takes a time.Duration value representing the timeout duration.
87// It returns an optionFunc that sets the timeout field of the configuration to the provided value.
88func WithTimeout(val time.Duration) Option {
89 return optionFunc(func(c *config) {
90 c.timeout = val
91 })
92}
93
94// WithMaxTokens returns a new Option that sets the max tokens for the client configuration.
95// The maximum number of tokens to generate in the chat completion.

Callers 1

NewOpenAIFunction · 0.92

Calls 1

optionFuncFuncType · 0.70

Tested by

no test coverage detected