feat(新功能): sketch 推荐算法

fix(修复bug):
docs(文档变更):
refactor(重构):
test(增加测试):
This commit is contained in:
zhouchengrong
2025-02-28 16:26:44 +08:00
parent 08f9f7ebf7
commit a2e78f3dd5
6 changed files with 755 additions and 5 deletions

View File

@@ -1,15 +1,17 @@
import logging.config
from http.client import HTTPException
from fastapi.responses import JSONResponse
from fastapi import FastAPI, HTTPException, Request
import uvicorn
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.triggers.cron import CronTrigger
from fastapi import FastAPI
from fastapi import HTTPException, Request
from fastapi.responses import JSONResponse
from app.api.api_route import router
from app.core.config import settings
from app.core.record_api_count import count_api_calls
from app.schemas.response_template import ResponseModel
from app.service.recommend.service import load_resources
from logging_env import LOGGER_CONFIG_DICT
logging.config.dictConfig(LOGGER_CONFIG_DICT)
@@ -17,6 +19,8 @@ logging.getLogger("pika").setLevel(logging.WARNING)
from starlette.middleware.cors import CORSMiddleware
logger = logging.getLogger(__name__)
def get_application() -> FastAPI:
application = FastAPI(
@@ -51,5 +55,7 @@ async def http_exception_handler(request: Request, exc: HTTPException):
)
if __name__ == '__main__':
uvicorn.run(app, host="0.0.0.0", port=8000)