The elicitation response (accept with form values, decline, or cancel)
| 16369 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 16370 | @dataclass |
| 16371 | class UIElicitationResponse: |
| 16372 | """The elicitation response (accept with form values, decline, or cancel)""" |
| 16373 | |
| 16374 | action: UIElicitationResponseAction |
| 16375 | """The user's response: accept (submitted), decline (rejected), or cancel (dismissed)""" |
| 16376 | |
| 16377 | content: dict[str, float | bool | list[str] | str] | None = None |
| 16378 | """The form values submitted by the user (present when action is 'accept')""" |
| 16379 | |
| 16380 | @staticmethod |
| 16381 | def from_dict(obj: Any) -> 'UIElicitationResponse': |
| 16382 | assert isinstance(obj, dict) |
| 16383 | action = UIElicitationResponseAction(obj.get("action")) |
| 16384 | content = from_union([lambda x: from_dict(lambda x: from_union([from_float, from_bool, lambda x: from_list(from_str, x), from_str], x), x), from_none], obj.get("content")) |
| 16385 | return UIElicitationResponse(action, content) |
| 16386 | |
| 16387 | def to_dict(self) -> dict: |
| 16388 | result: dict = {} |
| 16389 | result["action"] = to_enum(UIElicitationResponseAction, self.action) |
| 16390 | if self.content is not None: |
| 16391 | result["content"] = from_union([lambda x: from_dict(lambda x: from_union([to_float, from_bool, lambda x: from_list(from_str, x), from_str], x), x), from_none], self.content) |
| 16392 | return result |
| 16393 | |
| 16394 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 16395 | @dataclass |
no outgoing calls
searching dependent graphs…