aboutsummaryrefslogtreecommitdiff
path: root/autogpts/autogpt/autogpt/core/runner/client_lib/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'autogpts/autogpt/autogpt/core/runner/client_lib/settings.py')
-rw-r--r--autogpts/autogpt/autogpt/core/runner/client_lib/settings.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/autogpts/autogpt/autogpt/core/runner/client_lib/settings.py b/autogpts/autogpt/autogpt/core/runner/client_lib/settings.py
new file mode 100644
index 000000000..9c9983024
--- /dev/null
+++ b/autogpts/autogpt/autogpt/core/runner/client_lib/settings.py
@@ -0,0 +1,14 @@
+from pathlib import Path
+
+import yaml
+
+from autogpt.core.agent import SimpleAgent
+
+
+def make_user_configuration(settings_file_path: Path):
+ user_configuration = SimpleAgent.build_user_configuration()
+
+ settings_file_path.parent.mkdir(parents=True, exist_ok=True)
+ print("Writing settings to", settings_file_path)
+ with settings_file_path.open("w") as f:
+ yaml.safe_dump(user_configuration, f)