send the role and content to visualizer server to show log on webpage in real-time You can leave the role undefined and just pass the content, i.e. log_visualize("messages"), where the role is "System". Args: role: the agent that sends message content: the content of mes
(role, content=None)
| 12 | |
| 13 | |
| 14 | def log_visualize(role, content=None): |
| 15 | """ |
| 16 | send the role and content to visualizer server to show log on webpage in real-time |
| 17 | You can leave the role undefined and just pass the content, i.e. log_visualize("messages"), where the role is "System". |
| 18 | Args: |
| 19 | role: the agent that sends message |
| 20 | content: the content of message |
| 21 | |
| 22 | Returns: None |
| 23 | |
| 24 | """ |
| 25 | if not content: |
| 26 | logging.info(role + "\n") |
| 27 | print(role + "\n") |
| 28 | else: |
| 29 | print(str(role) + ": " + str(content) + "\n") |
| 30 | logging.info(str(role) + ": " + str(content) + "\n") |
| 31 | role = str(role) |
| 32 | content = str(content) |
| 33 | |
| 34 | |
| 35 | def convert_to_markdown_table(records_kv): |
no outgoing calls
no test coverage detected