From f88e2362c57c352e7529ebb0e3c04ba1e3d1ef3d Mon Sep 17 00:00:00 2001 From: Cyberes Date: Tue, 3 Oct 2023 20:01:28 -0600 Subject: [PATCH] remove some debug prints --- llm_server/llm/openai/moderation.py | 2 -- llm_server/workers/moderator.py | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/llm_server/llm/openai/moderation.py b/llm_server/llm/openai/moderation.py index 045b79a..827d04b 100644 --- a/llm_server/llm/openai/moderation.py +++ b/llm_server/llm/openai/moderation.py @@ -14,8 +14,6 @@ def check_moderation_endpoint(prompt: str): response.raise_for_status() response = response.json() - print(response) - offending_categories = [] for k, v in response['results'][0]['categories'].items(): if v: diff --git a/llm_server/workers/moderator.py b/llm_server/workers/moderator.py index 86c2da5..64ba527 100644 --- a/llm_server/workers/moderator.py +++ b/llm_server/workers/moderator.py @@ -39,7 +39,7 @@ def get_results(tag, num_tasks): flagged_categories.add(item) num_results += 1 if time.time() - start_time > opts.openai_moderation_timeout: - print('Timed out waiting for result from moderator.') + print('----> Timed out waiting for result from moderator.') break return list(flagged_categories) @@ -49,7 +49,6 @@ def moderation_worker(): result = redis_moderation.blpop(['queue:msgs_to_check']) try: msg, tag = json.loads(result[1]) - print(tag) _, categories = check_moderation_endpoint(msg) redis_moderation.rpush('queue:flagged_categories', json.dumps((tag, categories))) except: