ApiResult¶
Structure Class¶
ApiResult
dataclass
¶
Contains information about the API operation that was called from the action group and the response body that was returned.
This data type is used in the following API operations:
- In the
returnControlInvocationResultsof the InvokeAgent request
Attributes¶
action_group
instance-attribute
¶
action_group: str
The action group that the API operation belongs to.
api_path
class-attribute
instance-attribute
¶
api_path: str | None = field(repr=False, default=None)
The path to the API operation.
confirmation_state
class-attribute
instance-attribute
¶
confirmation_state: ConfirmationState | None = None
Controls the API operations or functions to invoke based on the user confirmation.
http_method
class-attribute
instance-attribute
¶
http_method: str | None = None
The HTTP method for the API operation.
http_status_code
class-attribute
instance-attribute
¶
http_status_code: int | None = None
http status code from API execution response (for example: 200, 400, 500).
response_body
class-attribute
instance-attribute
¶
response_body: dict[str, ContentBody] | None = None
The response body from the API operation. The key of the object is the
content type (currently, only TEXT is supported). The response may be
returned directly or from the Lambda function.
response_state
class-attribute
instance-attribute
¶
response_state: ResponseState | None = None
Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt