feat: Return a 400 if prompt exceeds max tokens

This commit is contained in:
Fred de Gier 2022-10-20 14:56:39 +02:00
commit e2486698e0
4 changed files with 56 additions and 8 deletions

View file

View file

@ -0,0 +1,27 @@
# The uvicorn_logger is used to add timestamps
uvicorn_logger = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"access": {
"()": "uvicorn.logging.AccessFormatter",
"fmt": '%(levelprefix)s %(asctime)s :: %(client_addr)s - "%(request_line)s" %(status_code)s',
"use_colors": True
},
},
"handlers": {
"access": {
"formatter": "access",
"class": "logging.StreamHandler",
"stream": "ext://sys.stdout",
},
},
"loggers": {
"uvicorn.access": {
"handlers": ["access"],
# "level": "INFO",
"propagate": False
},
},
}