使用pypi包时,当修改 `CrackSQL/backend/config/init_config.yaml` 中的 LLM 模型配置(如 `api_base`、`api_key`、`temperature` 等参数)后,再次运行初始化脚本时,这些修改不会被应用到数据库中。这是因为cracksql/init_knowledge_base.py代码中的存在性检查逻辑直接跳过了已存在的模型: existing_model = db.session.query(LLMModel).filter_by(name=model_config['name']).first() if existing_model: logger.info(f"LLM model {model_config['name']} already exists") success_count += 1 continue 目前的临时解决方案是: 1. 注释掉存在性检查代码块 2. 删除数据库文件 `info.db` 3. 重新运行初始化脚本
Activity
code4DB commentedon May 26, 2025
That's right, you should delete the
info.dbif you want to re-initialize the information.