Request host-driven completions for the current composer input.
| 1084 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 1085 | @dataclass |
| 1086 | class CompletionsRequestRequest: |
| 1087 | """Request host-driven completions for the current composer input.""" |
| 1088 | |
| 1089 | offset: int |
| 1090 | """Cursor offset within `text`, in UTF-16 code units.""" |
| 1091 | |
| 1092 | text: str |
| 1093 | """The full composed composer input.""" |
| 1094 | |
| 1095 | @staticmethod |
| 1096 | def from_dict(obj: Any) -> 'CompletionsRequestRequest': |
| 1097 | assert isinstance(obj, dict) |
| 1098 | offset = from_int(obj.get("offset")) |
| 1099 | text = from_str(obj.get("text")) |
| 1100 | return CompletionsRequestRequest(offset, text) |
| 1101 | |
| 1102 | def to_dict(self) -> dict: |
| 1103 | result: dict = {} |
| 1104 | result["offset"] = from_int(self.offset) |
| 1105 | result["text"] = from_str(self.text) |
| 1106 | return result |
| 1107 | |
| 1108 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 1109 | @dataclass |
no outgoing calls
no test coverage detected
searching dependent graphs…