Main: Make openapi export store locally

This runs faster than always making a syscall to check if the env
var is set.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2024-07-08 14:52:17 -04:00
parent ae66e8f9ba
commit 6613e38436
3 changed files with 9 additions and 2 deletions

View file

@ -9,7 +9,6 @@ import signal
from loguru import logger
from typing import Optional
from backends.exllamav2.utils import check_exllama_version
from common import config, gen_logging, sampling, model
from common.args import convert_args_to_dict, init_argparser
from common.auth import load_auth_keys
@ -18,6 +17,10 @@ from common.networking import is_port_in_use
from common.signals import signal_handler
from common.utils import unwrap
from endpoints.server import export_openapi, start_api
from endpoints.utils import do_export_openapi
if not do_export_openapi:
from backends.exllamav2.utils import check_exllama_version
async def entrypoint(args: Optional[dict] = None):