Skip to content

Commit

Permalink
Fixes #9, magic string
Browse files Browse the repository at this point in the history
  • Loading branch information
JolanThomassin committed Feb 1, 2024
1 parent a625206 commit 408acb5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ailab/db/finesse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
import json

# Constants
DEFAULT_JSON_PATH = "/ailab/db/finesse/prompt"


def load_prompt(prompt_path, filename):
full_path = os.path.join(prompt_path, filename)
Expand All @@ -11,7 +14,13 @@ def load_prompt(prompt_path, filename):
return content


def load_json_template(json_path):
def load_json_template(json_path=DEFAULT_JSON_PATH):
"""
Load a JSON template from the specified path.
Returns:
str: A JSON-formatted string representing the loaded data.
"""
json_file_path = json_path + "/json_template.json"

with open(json_file_path, "r") as file:
Expand Down

0 comments on commit 408acb5

Please sign in to comment.