mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
bump v
This commit is contained in:
parent
ade3079a28
commit
0ca08b1545
3 changed files with 5 additions and 2 deletions
|
@ -1272,7 +1272,6 @@ def moderation(*args, **kwargs):
|
|||
api_key = None
|
||||
if "api_key" in kwargs:
|
||||
api_key = kwargs["api_key"]
|
||||
|
||||
api_key = (
|
||||
api_key or
|
||||
litellm.api_key or
|
||||
|
@ -1280,6 +1279,8 @@ def moderation(*args, **kwargs):
|
|||
get_secret("OPENAI_API_KEY")
|
||||
)
|
||||
openai.api_key = api_key
|
||||
openai.api_type = "open_ai"
|
||||
openai.api_base = "https://api.openai.com/v1"
|
||||
response = openai.Moderation.create(*args, **kwargs)
|
||||
return response
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue