Package com.github.copilot.sdk.json
Class AutoModeSwitchRequest
java.lang.Object
com.github.copilot.sdk.json.AutoModeSwitchRequest
Request to switch to auto mode after an eligible rate limit.
This is sent by the server when the agent encounters a rate limit and wants to switch to an alternative model automatically.
- Since:
- 1.0.8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the rate-limit error code that triggered the request.Gets the seconds until the rate limit resets, when known.setErrorCode(String errorCode) Sets the rate-limit error code.setRetryAfterSeconds(Double retryAfterSeconds) Sets the seconds until the rate limit resets.
-
Constructor Details
-
AutoModeSwitchRequest
public AutoModeSwitchRequest()
-
-
Method Details
-
getErrorCode
Gets the rate-limit error code that triggered the request.- Returns:
- the error code, or
null
-
setErrorCode
Sets the rate-limit error code.- Parameters:
errorCode- the error code- Returns:
- this instance for method chaining
-
getRetryAfterSeconds
Gets the seconds until the rate limit resets, when known.- Returns:
- the retry-after seconds, or
null
-
setRetryAfterSeconds
Sets the seconds until the rate limit resets.- Parameters:
retryAfterSeconds- the retry-after seconds- Returns:
- this instance for method chaining
-