Skip to content

Commit

Permalink
Update moderation and TTS models (#76)
Browse files Browse the repository at this point in the history
* Update to eleven_multilingual_v2

* Set moderation model explicitly
  • Loading branch information
justinh-rahb authored Aug 25, 2023
1 parent 1d34ffd commit b07274a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"description": "ElevenLabs Text-to-Speech API key."
},
"ELEVENLABS_MODEL_NAME": {
"default": "eleven_multilingual_v1",
"default": "eleven_multilingual_v2",
"required": False,
"type": str,
"description": "Name of the ElevenLabs Text-to-Speech model."
Expand Down
2 changes: 1 addition & 1 deletion utils/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize_openai(api_key, temperature, max_tokens_output):
return params

def moderate_content(text: str) -> dict:
response = openai.Moderation.create(input=text)
response = openai.Moderation.create(input=text, model="text-moderation-latest")
return response["results"][0]

# Define the function for token counting
Expand Down

0 comments on commit b07274a

Please sign in to comment.