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

Method display_options

camel/human.py:53–75  ·  view source on GitHub ↗

r"""Displays the options to the user. Args: messages (Sequence[BaseMessage]): A list of `BaseMessage` objects. Returns: None

(self, messages: Sequence[BaseMessage])

Source from the content-addressed store, hash-verified

51 self.options_dict: Dict[str, str] = dict()
52
53 def display_options(self, messages: Sequence[BaseMessage]) -> None:
54 r"""Displays the options to the user.
55
56 Args:
57 messages (Sequence[BaseMessage]): A list of `BaseMessage` objects.
58
59 Returns:
60 None
61 """
62 options = [message.content for message in messages]
63 options.append(self.input_button)
64 options.append(self.kill_button)
65 print_text_animated(
66 self.logger_color + "\n> Proposals from "
67 f"{messages[0].role_name} ({messages[0].role_type}). "
68 "Please choose an option:\n"
69 )
70 for index, option in enumerate(options):
71 print_text_animated(
72 self.logger_color
73 + f"\x1b[3mOption {index + 1}:\n{option}\x1b[0m\n"
74 )
75 self.options_dict[str(index + 1)] = option
76
77 def get_input(self) -> str:
78 r"""Gets the input from the user.

Callers 1

reduce_stepMethod · 0.95

Calls 1

print_text_animatedFunction · 0.90

Tested by

no test coverage detected