filename tweaks
This commit is contained in:
@@ -122,13 +122,13 @@ class JournalPromptGenerator:
|
||||
def _load_historic_prompts(self):
|
||||
"""Load historic prompts from JSON file."""
|
||||
try:
|
||||
with open("historic_prompts.json", "r") as f:
|
||||
with open("prompts_historic.json", "r") as f:
|
||||
self.historic_prompts = json.load(f)
|
||||
except FileNotFoundError:
|
||||
self.console.print("[yellow]Warning: historic_prompts.json not found, starting with empty history[/yellow]")
|
||||
self.console.print("[yellow]Warning: prompts_historic.json not found, starting with empty history[/yellow]")
|
||||
self.historic_prompts = []
|
||||
except json.JSONDecodeError:
|
||||
self.console.print("[yellow]Warning: historic_prompts.json is corrupted, starting with empty history[/yellow]")
|
||||
self.console.print("[yellow]Warning: prompts_historic.json is corrupted, starting with empty history[/yellow]")
|
||||
self.historic_prompts = []
|
||||
|
||||
def _save_historic_prompts(self):
|
||||
@@ -137,19 +137,19 @@ class JournalPromptGenerator:
|
||||
if len(self.historic_prompts) > 60:
|
||||
self.historic_prompts = self.historic_prompts[:60]
|
||||
|
||||
with open("historic_prompts.json", "w") as f:
|
||||
with open("prompts_historic.json", "w") as f:
|
||||
json.dump(self.historic_prompts, f, indent=2)
|
||||
|
||||
def _load_pool_prompts(self):
|
||||
"""Load pool prompts from JSON file."""
|
||||
try:
|
||||
with open("pool_prompts.json", "r") as f:
|
||||
with open("prompts_pool.json", "r") as f:
|
||||
self.pool_prompts = json.load(f)
|
||||
except FileNotFoundError:
|
||||
self.console.print("[yellow]Warning: pool_prompts.json not found, starting with empty pool[/yellow]")
|
||||
self.console.print("[yellow]Warning: prompts_pool.json not found, starting with empty pool[/yellow]")
|
||||
self.pool_prompts = []
|
||||
except json.JSONDecodeError:
|
||||
self.console.print("[yellow]Warning: pool_prompts.json is corrupted, starting with empty pool[/yellow]")
|
||||
self.console.print("[yellow]Warning: prompts_pool.json is corrupted, starting with empty pool[/yellow]")
|
||||
self.pool_prompts = []
|
||||
|
||||
def _load_feedback_words(self):
|
||||
@@ -171,7 +171,7 @@ class JournalPromptGenerator:
|
||||
|
||||
def _save_pool_prompts(self):
|
||||
"""Save pool prompts to JSON file."""
|
||||
with open("pool_prompts.json", "w") as f:
|
||||
with open("prompts_pool.json", "w") as f:
|
||||
json.dump(self.pool_prompts, f, indent=2)
|
||||
|
||||
def add_prompts_to_pool(self, prompts: List[str]):
|
||||
|
||||
Reference in New Issue
Block a user