MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / ChatIO

Class ChatIO

toolbench/inference/utils.py:223–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221
222# For IO presentation
223class 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
240class SimpleChatIO(ChatIO):
241 def prompt_for_input(self, role) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected