Fix two minor bugs related to factor extraction.

This commit is contained in:
WinstonLiyt
2024-07-17 07:45:51 +00:00
parent d5a6a08210
commit 79476a992e
2 changed files with 2 additions and 2 deletions
@@ -22,7 +22,7 @@ def get_data_folder_intro():
It is for preparing prompting message.
"""
content_l = []
for p in Path(FACTOR_IMPLEMENT_SETTINGS.data_folder).iterdir():
for p in Path(FACTOR_IMPLEMENT_SETTINGS.data_folder_debug).iterdir():
if p.name.endswith(".h5"):
df = pd.read_hdf(p)
# get df.head() as string with full width
@@ -183,7 +183,7 @@ def __extract_factors_formulation_from_content(
except json.JSONDecodeError:
parse_success = False
if ret_json_str is None or not parse_success:
current_user_prompt = "Your response didn't follow the instruction might be wrong json format. Try again."
current_user_prompt = "Your response didn't follow the instruction might be wrong json format.\nRemember not to add any dots (...) in the json string which will cause json parse error!!!\nTry again."
else:
for name, formulation_and_description in ret_dict.items():
if name in factor_dict: