add 站点、订阅API
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from fastapi import APIRouter, HTTPException, Depends
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from app import schemas
|
||||
from app.chain.identify import IdentifyChain
|
||||
@@ -11,15 +11,10 @@ router = APIRouter()
|
||||
@router.post("/recognize", response_model=schemas.Context)
|
||||
async def recognize(title: str,
|
||||
subtitle: str = None,
|
||||
current_user: User = Depends(get_current_active_user)):
|
||||
_: User = Depends(get_current_active_user)):
|
||||
"""
|
||||
识别媒体信息
|
||||
"""
|
||||
if not current_user:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="需要授权",
|
||||
)
|
||||
# 识别媒体信息
|
||||
context = IdentifyChain().process(title=title, subtitle=subtitle)
|
||||
return context.to_dict()
|
||||
|
Reference in New Issue
Block a user