Pending external tool call request ID, with the tool result or an error describing why it failed.
| 19791 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 19792 | @dataclass |
| 19793 | class HandlePendingToolCallRequest: |
| 19794 | """Pending external tool call request ID, with the tool result or an error describing why it |
| 19795 | failed. |
| 19796 | """ |
| 19797 | request_id: str |
| 19798 | """Request ID of the pending tool call""" |
| 19799 | |
| 19800 | error: str | None = None |
| 19801 | """Error message if the tool call failed""" |
| 19802 | |
| 19803 | result: ExternalToolTextResultForLlm | str | None = None |
| 19804 | """Tool call result (string or expanded result object)""" |
| 19805 | |
| 19806 | @staticmethod |
| 19807 | def from_dict(obj: Any) -> 'HandlePendingToolCallRequest': |
| 19808 | assert isinstance(obj, dict) |
| 19809 | request_id = from_str(obj.get("requestId")) |
| 19810 | error = from_union([from_str, from_none], obj.get("error")) |
| 19811 | result = from_union([ExternalToolTextResultForLlm.from_dict, from_str, from_none], obj.get("result")) |
| 19812 | return HandlePendingToolCallRequest(request_id, error, result) |
| 19813 | |
| 19814 | def to_dict(self) -> dict: |
| 19815 | result: dict = {} |
| 19816 | result["requestId"] = from_str(self.request_id) |
| 19817 | if self.error is not None: |
| 19818 | result["error"] = from_union([from_str, from_none], self.error) |
| 19819 | if self.result is not None: |
| 19820 | result["result"] = from_union([lambda x: to_class(ExternalToolTextResultForLlm, x), from_str, from_none], self.result) |
| 19821 | return result |
| 19822 | |
| 19823 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 19824 | @dataclass |
no outgoing calls
searching dependent graphs…