From c265f0d81f2da3c527903c078a554d1c92aada4b Mon Sep 17 00:00:00 2001 From: Jolan Thomassin <98430140+JolanThomassin@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:42:54 +0000 Subject: [PATCH] issue #74, add choice in json_template selection --- ailab/db/finesse/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ailab/db/finesse/__init__.py b/ailab/db/finesse/__init__.py index 0ce0ca1..730408f 100644 --- a/ailab/db/finesse/__init__.py +++ b/ailab/db/finesse/__init__.py @@ -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