From d6a130a052db3a50975a719088a9226abfebb266 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Tue, 10 Oct 2023 15:56:04 -0400 Subject: [PATCH] Print traceback on server error --- llama_cpp/server/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llama_cpp/server/app.py b/llama_cpp/server/app.py index c70e882..18cd47c 100644 --- a/llama_cpp/server/app.py +++ b/llama_cpp/server/app.py @@ -1,5 +1,6 @@ import sys import json +import traceback import multiprocessing import time from re import compile, Match, Pattern @@ -243,6 +244,7 @@ class RouteErrorHandler(APIRoute): ) -> Tuple[int, ErrorResponse]: """Wraps error message in OpenAI style error response""" print(f"Exception: {str(error)}", file=sys.stderr) + traceback.print_exc(file=sys.stderr) if body is not None and isinstance( body, (