MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / log_visualize

Function log_visualize

applications/chatdev_lite/chatdev/utils.py:14–32  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

12
13
14def 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
35def convert_to_markdown_table(records_kv):

Callers 6

pre_processingFunction · 0.90
post_processingFunction · 0.90
_update_codesMethod · 0.90
_rewrite_codesMethod · 0.90
_load_from_hardwareMethod · 0.90
wrapperFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected