From aed5db4968d0466754ecdeb81f5112770d910222 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Mon, 2 Oct 2023 21:43:36 -0600 Subject: [PATCH] trying to narrow down error --- llm_server/database/database.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llm_server/database/database.py b/llm_server/database/database.py index fc1aa21..27a059c 100644 --- a/llm_server/database/database.py +++ b/llm_server/database/database.py @@ -11,6 +11,9 @@ from llm_server.llm import get_token_count def log_prompt(ip: str, token: str, prompt: str, response: Union[str, None], gen_time: Union[int, float, None], parameters: dict, headers: dict, backend_response_code: int, request_url: str, backend_url: str, response_tokens: int = None, is_error: bool = False): + assert isinstance(prompt, str) + assert isinstance(backend_url, str) + def background_task(): nonlocal ip, token, prompt, response, gen_time, parameters, headers, backend_response_code, request_url, backend_url, response_tokens, is_error # Try not to shove JSON into the database.