commit by Kalman.CHENG ☆

This commit is contained in:
chengminglong
2025-08-22 09:35:08 +08:00
parent 5efb48837c
commit c0af12e909
2 changed files with 9 additions and 2 deletions

View File

@@ -34,7 +34,9 @@ async def train_document_task():
print(datetime.datetime.now(), "存在未训练的文档" + str(len(no_train_document_result))+"")
# 这里可以根据train_flag的值来判断是训练还是删除
document = no_train_document_result[0]
theme = await find_by_id("t_ai_teaching_model_theme", "id", document["theme_id"])
select_theme_sql: str = f"select * from t_ai_teaching_model_theme where id = {document['theme_id']}"
select_theme_result = await find_by_sql(select_theme_sql, ())
theme = select_theme_result[0] if select_theme_result else None
document_name = document["document_name"] + "." + document["document_suffix"]
working_dir = "Topic/" + theme["short_name"]
document_path = document["document_path"]