The LlmSetTimeout function sets the timeout period, in seconds,
for blocking operations such as sending a message to the server. If a
request does not complete within the specified time, the operation will
fail and return a timeout error.
The minimum timeout period is 5 seconds and the maximum timeout period
is 300 seconds. If a value outside this range is specified, it will be
clamped to the nearest supported value. Specifying a value of zero resets
the timeout to the default value of 60 seconds.
The appropriate timeout value may vary depending on the selected
provider, model, and network conditions. Larger or more complex models
may require additional time to generate a response. Locally hosted
models may also require longer timeouts depending on the available
hardware resources, such as CPU or GPU performance.
The maximum timeout period is intended to prevent applications from
waiting indefinitely for a response. If an operation consistently
requires several minutes to complete, applications should consider
performing the request on a background thread or using a smaller or
faster model.