mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(fix) fix moderation test
This commit is contained in:
parent
573515ec3d
commit
a575efb4ee
3 changed files with 9 additions and 6 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue