| | |
| | | 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) |
| | |
| | | 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: |