| 221 | |
| 222 | # For IO presentation |
| 223 | class ChatIO(abc.ABC): |
| 224 | @abc.abstractmethod |
| 225 | def prompt_for_input(self, role: str) -> str: |
| 226 | """Prompt for input from a role.""" |
| 227 | |
| 228 | @abc.abstractmethod |
| 229 | def prompt_for_output(self, role: str): |
| 230 | """Prompt for output from a role.""" |
| 231 | |
| 232 | @abc.abstractmethod |
| 233 | def stream_output(self, output_stream): |
| 234 | """Stream output.""" |
| 235 | |
| 236 | @abc.abstractmethod |
| 237 | def return_output(self, output_stream): |
| 238 | """Return output.""" |
| 239 | |
| 240 | class SimpleChatIO(ChatIO): |
| 241 | def prompt_for_input(self, role) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected