MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / parse_input

Method parse_input

camel/human.py:97–113  ·  view source on GitHub ↗

r"""Parses the user's input and returns a `BaseMessage` object. Args: human_input (str): The user's input. Returns: content: A `str` object representing the user's input.

(self, human_input: str)

Source from the content-addressed store, hash-verified

95 return human_input
96
97 def parse_input(self, human_input: str) -> str:
98 r"""Parses the user's input and returns a `BaseMessage` object.
99
100 Args:
101 human_input (str): The user's input.
102
103 Returns:
104 content: A `str` object representing the user's input.
105 """
106 if self.options_dict[human_input] == self.input_button:
107 content = input(self.logger_color + "Please enter your message: ")
108 elif self.options_dict[human_input] == self.kill_button:
109 exit(self.logger_color + f"Killed by {self.name}.")
110 else:
111 content = self.options_dict[human_input]
112
113 return content
114
115 def reduce_step(
116 self, messages: Sequence[BaseMessage]

Callers 1

reduce_stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected