diff --git a/llm_server/database/log_to_db.py b/llm_server/database/log_to_db.py index 8e27055..364e1d3 100644 --- a/llm_server/database/log_to_db.py +++ b/llm_server/database/log_to_db.py @@ -5,6 +5,9 @@ from redis import Redis def log_to_db(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) + r = Redis(host='localhost', port=6379, db=3) data = { 'function': 'log_prompt',