|
@@ -1,5 +1,9 @@
|
|
|
|
+import json
|
|
|
|
+from io import StringIO
|
|
from typing import Dict
|
|
from typing import Dict
|
|
|
|
|
|
|
|
+import yaml
|
|
|
|
+
|
|
|
|
|
|
def format_agent_profile(profile: Dict) -> str:
|
|
def format_agent_profile(profile: Dict) -> str:
|
|
fields = [
|
|
fields = [
|
|
@@ -22,6 +26,11 @@ def format_agent_profile(profile: Dict) -> str:
|
|
strings_to_join.append(cur_string)
|
|
strings_to_join.append(cur_string)
|
|
return "\n".join(strings_to_join)
|
|
return "\n".join(strings_to_join)
|
|
|
|
|
|
|
|
+def format_agent_profile_v2(profile: Dict) -> str:
|
|
|
|
+ str_stream = StringIO()
|
|
|
|
+ yaml.dump(profile, str_stream, indent=2, allow_unicode=True)
|
|
|
|
+ return str_stream.getvalue()
|
|
|
|
+
|
|
def format_user_profile(profile: Dict) -> str:
|
|
def format_user_profile(profile: Dict) -> str:
|
|
"""
|
|
"""
|
|
:param profile:
|
|
:param profile:
|