Download docs/autogen2.patch from abugaber/aiben: direct link, hf CLI and curl.
- Browser
- Download file 3.79 kB
-
https://huggingface.co/spaces/abugaber/aiben/resolve/main/docs/autogen2.patch
- Command line
-
hf download hf://spaces/abugaber/aiben/docs/autogen2.patch
-
curl -L -o autogen2.patch https://huggingface.co/spaces/abugaber/aiben/resolve/main/docs/autogen2.patch
3.79 kB
| --- /home/jon/miniconda3/envs/h2ogpt/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py 2024-08-30 22:59:32.130641859 -0700 | |
| +++ /home/jon/conversable_agent.py 2024-08-30 22:59:52.451296579 -0700 | |
| if num_code_blocks == 1: | |
| iostream.print( | |
| colored( | |
| - f"\n>>>>>>>> EXECUTING CODE BLOCK (inferred language is {code_blocks[0].language})...", | |
| + f"\n\n**EXECUTING CODE BLOCK (inferred language is {code_blocks[0].language})**\n\n", | |
| "red", | |
| ), | |
| flush=True, | |
| else: | |
| iostream.print( | |
| colored( | |
| - f"\n>>>>>>>> EXECUTING {num_code_blocks} CODE BLOCKS (inferred languages are [{', '.join([x.language for x in code_blocks])}])...", | |
| + f"\n\n**EXECUTING {num_code_blocks} CODE BLOCKS (inferred languages are [{', '.join([x.language for x in code_blocks])}])**\n\n", | |
| "red", | |
| ), | |
| flush=True, | |
| # print the no_human_input_msg | |
| if no_human_input_msg: | |
| - iostream.print(colored(f"\n>>>>>>>> {no_human_input_msg}", "red"), flush=True) | |
| + iostream.print(colored(f"\n\n**{no_human_input_msg}", "red"), flush=True) | |
| # stop the conversation | |
| if reply == "exit": | |
| # increment the consecutive_auto_reply_counter | |
| self._consecutive_auto_reply_counter[sender] += 1 | |
| if self.human_input_mode != "NEVER": | |
| - iostream.print(colored("\n>>>>>>>> USING AUTO REPLY...", "red"), flush=True) | |
| + iostream.print(colored("\n\n**USING AUTO REPLY**\n\n", "red"), flush=True) | |
| return False, None | |
| # print the no_human_input_msg | |
| if no_human_input_msg: | |
| - iostream.print(colored(f"\n>>>>>>>> {no_human_input_msg}", "red"), flush=True) | |
| + iostream.print(colored(f"\n\n**{no_human_input_msg}", "red"), flush=True) | |
| # stop the conversation | |
| if reply == "exit": | |
| # increment the consecutive_auto_reply_counter | |
| self._consecutive_auto_reply_counter[sender] += 1 | |
| if self.human_input_mode != "NEVER": | |
| - iostream.print(colored("\n>>>>>>>> USING AUTO REPLY...", "red"), flush=True) | |
| + iostream.print(colored("\n\n**USING AUTO REPLY**\n\n", "red"), flush=True) | |
| return False, None | |
| lang = infer_lang(code) | |
| iostream.print( | |
| colored( | |
| - f"\n>>>>>>>> EXECUTING CODE BLOCK {i} (inferred language is {lang})...", | |
| + f"\n\n**EXECUTING CODE BLOCK {i} (inferred language is {lang})**\n\n", | |
| "red", | |
| ), | |
| flush=True, | |
| # Try to execute the function | |
| if arguments is not None: | |
| iostream.print( | |
| - colored(f"\n>>>>>>>> EXECUTING FUNCTION {func_name}...", "magenta"), | |
| + colored(f"\n\n**EXECUTING FUNCTION {func_name}**\n\n", "magenta"), | |
| flush=True, | |
| ) | |
| try: | |
| # Try to execute the function | |
| if arguments is not None: | |
| iostream.print( | |
| - colored(f"\n>>>>>>>> EXECUTING ASYNC FUNCTION {func_name}...", "magenta"), | |
| + colored(f"\n\n**EXECUTING ASYNC FUNCTION {func_name}**\n\n", "magenta"), | |
| flush=True, | |
| ) | |
| try: | |