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.
This commit is contained in:
Paillat
2023-08-02 21:16:59 +02:00
parent 713329c512
commit 985fcc4663

View File

@@ -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,