chore: 清理 Docker 相关文件并优化前端布局
- 删除 Docker 相关文件 (docker-compose, Dockerfile, nginx.conf, init.sql 等) - 优化 platforms.html 卡片布局和响应式样式 - 优化 users.html 格式和移动端卡片设计 - 优化 admin.html 页面结构和表格布局 - 修复各页面 min-height 和溢出问题 - 更新导航组件样式
This commit is contained in:
@@ -28,7 +28,7 @@ def list_llm_configs(
|
||||
):
|
||||
"""获取 LLM 配置列表"""
|
||||
configs = db.query(LLMConfig).all()
|
||||
return [LLMConfigResponse.from_orm(c) for c in configs]
|
||||
return [LLMConfigResponse.model_validate(c) for c in configs]
|
||||
|
||||
@router.get("/{config_id}", response_model=LLMConfigResponse)
|
||||
def get_llm_config(
|
||||
@@ -51,7 +51,7 @@ def create_llm_config(
|
||||
admin_user = Depends(get_current_admin)
|
||||
):
|
||||
"""创建 LLM 配置"""
|
||||
config = LLMConfig(**config_data.dict())
|
||||
config = LLMConfig(**config_data.model_dump())
|
||||
db.add(config)
|
||||
db.commit()
|
||||
db.refresh(config)
|
||||
@@ -69,7 +69,7 @@ def update_llm_config(
|
||||
config = db.query(LLMConfig).filter(LLMConfig.id == config_id).first()
|
||||
if not config:
|
||||
raise HTTPException(status_code=404, detail="配置不存在")
|
||||
update_data = config_update.dict(exclude_unset=True)
|
||||
update_data = config_update.model_dump(exclude_unset=True)
|
||||
for field, value in update_data.items():
|
||||
setattr(config, field, value)
|
||||
db.commit()
|
||||
|
||||
Reference in New Issue
Block a user