Skip to content

Commit

Permalink
issue #74, add choice in json_template selection
Browse files Browse the repository at this point in the history
  • Loading branch information
JolanThomassin committed Mar 28, 2024
1 parent 2f28dfc commit c265f0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ailab/db/finesse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def load_prompt(prompt_path, filename):
return content


def load_json_template(json_path=DEFAULT_JSON_PATH):
def load_json_template(filename, 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"
json_file_path = json_path + "/" + filename + ".json"

with open(json_file_path, "r") as file:
data = json.load(file) # Load the JSON data as a Python dictionary
Expand Down

0 comments on commit c265f0d

Please sign in to comment.