good version for web
This commit is contained in:
@@ -237,6 +237,21 @@ async def delete_version(
|
||||
|
||||
|
||||
# 算法调用相关路由
|
||||
@router.post("/call/public", response_model=AlgorithmCallResult)
|
||||
async def call_algorithm_public(
|
||||
call: AlgorithmCallCreate,
|
||||
db: Session = Depends(get_db)
|
||||
):
|
||||
"""公开调用算法(不需要认证,用于演示页面)"""
|
||||
# 使用匿名用户ID进行调用
|
||||
anonymous_user_id = "anonymous"
|
||||
|
||||
# 执行算法
|
||||
result = AlgorithmCallService.execute_algorithm(db, anonymous_user_id, call)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@router.post("/call", response_model=AlgorithmCallResult)
|
||||
async def call_algorithm(
|
||||
call: AlgorithmCallCreate,
|
||||
|
||||
Reference in New Issue
Block a user