attribute 字段名规范

This commit is contained in:
zhouchengrong
2024-03-28 10:29:04 +08:00
parent 307afe6053
commit 10bef5c152
309 changed files with 0 additions and 7394 deletions

View File

@@ -1,25 +0,0 @@
import logging
import time
from fastapi import APIRouter
from app.schemas.similar_match import SimilarMatchMItem
from app.service.similar_match.service import SimilarMatch
from app.service.utils.decorator import RunTime
logger = logging.getLogger()
router = APIRouter()
@RunTime
@router.post("similar_match")
def similar_match(request_item: SimilarMatchMItem):
try:
if request_item.result_number <= 0:
raise KeyError("result number can't be less than 0")
service = SimilarMatch(request_item)
search_response = service.match_features()
return {"message": "ok", "data": search_response}
except KeyError as e:
logger.warning(str(e))
return {"message": "result number can't be less than 0", "data": []}