handle and fix temp paths to chat completions adapter

This commit is contained in:
Concedo 2024-12-05 17:22:35 +08:00
parent 5106816eac
commit d0d1d922de

View file

@ -4389,6 +4389,8 @@ def main(launch_args,start_server=True):
filename = args.chatcompletionsadapter
if not filename.endswith(".json"):
filename += ".json"
#strip to just the filename
filename = os.path.basename(filename)
premade_adapt_path = os.path.join(adapt_dir,filename)
if premade_adapt_path and os.path.exists(premade_adapt_path):
ccadapter_path = os.path.abspath(premade_adapt_path)