zhaoqingang
2025-04-08 0650b889a36d9b9fd42415b9b9819676f839ae9b
app/service/v2/initialize_data.py
@@ -181,7 +181,7 @@
        else:
            try:
                dialog = ComplexChatModel(id=agent["id"], name=agent["name"], description=agent["description"],
                                     icon=agent["icon"], tenant_id=user.id if user else "", dialog_type=agent["dialogType"], mode=agent["mode"],chat_mode = agent["chat_mode"])
                                     icon=agent["icon"], tenant_id=user.id if user else "", dialog_type=agent["dialogType"], mode=agent["mode"],chat_mode = agent["chat_mode"],chat_model = agent.get("chat_model"),chat_model_ds = agent.get("chat_model_ds"),chat_provider = agent.get("chat_provider"))
                db.add(dialog)
                db.commit()
                db.refresh(dialog)
@@ -434,7 +434,8 @@
async def system_license_sync(db):
    with open(os.path.join(ENV_CONF_PATH, "system.yaml") , 'r', encoding='utf-8') as file:
        # 加载JSON数据
        config = json.load(file)
        config = yaml.safe_load(file)
        try:
            system = db.query(SystemDataModel).filter_by(id=SYSTEM_ID).first()
            if system: