From 5a32d978e5dd9bee4fb14291a099cc4489197f91 Mon Sep 17 00:00:00 2001 From: Vitaly Neyman Date: Mon, 15 Apr 2024 11:08:17 +0300 Subject: [PATCH 1/2] Remove constraint on empty system prompt --- ps_fuzz/app_config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ps_fuzz/app_config.py b/ps_fuzz/app_config.py index 32b2fa5..d72f0ee 100644 --- a/ps_fuzz/app_config.py +++ b/ps_fuzz/app_config.py @@ -148,7 +148,6 @@ def system_prompt(self) -> str: @system_prompt.setter def system_prompt(self, value: str): - if not value: raise ValueError("System prompt cannot be empty") self.config_state['system_prompt'] = value self.save() From 5a1123f054ce7b812869dd96adcaeb004efbb55b Mon Sep 17 00:00:00 2001 From: Vitaly Neyman Date: Mon, 15 Apr 2024 11:08:52 +0300 Subject: [PATCH 2/2] Maintain the config file in user's home directory, instead of the 'current' directory. --- ps_fuzz/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ps_fuzz/cli.py b/ps_fuzz/cli.py index 225dec3..b48abf1 100644 --- a/ps_fuzz/cli.py +++ b/ps_fuzz/cli.py @@ -3,6 +3,7 @@ load_dotenv() import sys import colorama +import os from .chat_clients import * from .client_config import ClientConfig from .attack_config import AttackConfig @@ -18,7 +19,8 @@ RESET = colorama.Style.RESET_ALL BRIGHT = colorama.Style.BRIGHT -APP_CONFIG_FILE = ".psfuzz-config.json" +# Maintain configuration state in the user's home directory +APP_CONFIG_FILE = os.path.join(os.path.expanduser("~"), ".psfuzz-config.json") def main(): # Print the logo