feat(quota management): add end-user quota check for shared conversations

fix(default free plan): adjust free plan quota limits

feat(application service): add functionality to reset Agent model parameters to default values
This commit is contained in:
wxy
2026-04-16 19:35:52 +08:00
parent 915cb54f21
commit f883c1469d
5 changed files with 97 additions and 8 deletions

View File

@@ -271,6 +271,20 @@ def update_agent_config(
return success(data=app_schema.AgentConfig.model_validate(cfg))
@router.post("/{app_id}/config/reset", summary="重置 Agent 配置为默认状态")
@cur_workspace_access_guard()
def reset_agent_config(
app_id: uuid.UUID,
db: Session = Depends(get_db),
current_user=Depends(get_current_user),
):
workspace_id = current_user.current_workspace_id
service = AppService(db)
cfg = service.reset_agent_config(app_id=app_id, workspace_id=workspace_id)
cfg = enrich_agent_config(cfg)
return success(data=app_schema.AgentConfig.model_validate(cfg), msg="Agent 配置已重置为默认状态")
@router.get("/{app_id}/config", summary="获取 Agent 配置")
@cur_workspace_access_guard()
def get_agent_config(