From 985fcc466304ebd175766c4813457312ede3b2b0 Mon Sep 17 00:00:00 2001 From: Paillat Date: Wed, 2 Aug 2023 21:16:59 +0200 Subject: [PATCH] refactor(misc.py): remove unnecessary argument 'api_key' from moderate function call to openai_caller The 'api_key' argument was being passed to the openai_caller function unnecessarily in the moderate function. This argument is not needed as it is already being passed when creating the caller object. Removing this redundant argument improves code readability and reduces potential confusion. --- src/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/misc.py b/src/utils/misc.py index 7d4612c..13f1aa9 100644 --- a/src/utils/misc.py +++ b/src/utils/misc.py @@ -2,7 +2,7 @@ from src.utils.openaicaller import openai_caller async def moderate(api_key, text, recall_func=None): - caller = openai_caller(api_key) + caller = openai_caller() response = await caller.moderation( recall_func, api_key=api_key,