新增请求/响应日志中间件,支持详细的请求和响应信息记录
All checks were successful
Build and Push OCI GenAI Gateway Docker Image / docker-build-push (push) Successful in 34s
All checks were successful
Build and Push OCI GenAI Gateway Docker Image / docker-build-push (push) Successful in 34s
This commit is contained in:
@@ -20,6 +20,7 @@ from api.routers import models, chat, embeddings
|
||||
from api.schemas import ErrorResponse, ErrorDetail
|
||||
from api.error_handler import OCIErrorHandler
|
||||
from api.exceptions import ModelNotFoundException, InvalidModelTypeException
|
||||
from api.middleware import setup_logging_middleware
|
||||
|
||||
|
||||
# Configure logging
|
||||
@@ -133,6 +134,9 @@ app.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# Add logging middleware (for request/response debugging)
|
||||
setup_logging_middleware(app)
|
||||
|
||||
|
||||
# Exception handlers
|
||||
@app.exception_handler(ModelNotFoundException)
|
||||
|
||||
Reference in New Issue
Block a user