mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 17:24:55 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user