This commit is contained in:
2025-08-22 09:50:26 +08:00
parent a5fe9793ac
commit 0a70523964
2 changed files with 2 additions and 9 deletions

View File

@@ -34,9 +34,7 @@ async def train_document_task():
print(datetime.datetime.now(), "存在未训练的文档" + str(len(no_train_document_result))+"")
# 这里可以根据train_flag的值来判断是训练还是删除
document = no_train_document_result[0]
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
theme = await find_by_id("t_ai_teaching_model_theme", "id", document["theme_id"])
document_name = document["document_name"] + "." + document["document_suffix"]
working_dir = "Topic/" + theme["short_name"]
document_path = document["document_path"]