(fix) fix moderation test

This commit is contained in:
ishaan-jaff 2024-02-14 11:40:58 -08:00
parent 573515ec3d
commit a575efb4ee
3 changed files with 9 additions and 6 deletions

View file

@ -2962,8 +2962,11 @@ def text_completion(
##### Moderation #######################
@client
def moderation(input: str, model: str, api_key: Optional[str] = None, **kwargs):
def moderation(
input: str, model: Optional[str] = None, api_key: Optional[str] = None, **kwargs
):
# only supports open ai for now
api_key = (
api_key or litellm.api_key or litellm.openai_key or get_secret("OPENAI_API_KEY")