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)
| 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. |
| 88 | func 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. |
no test coverage detected