align with the behavior of other variables

This commit is contained in:
root
2023-09-04 09:10:55 +00:00
parent a4f1cea227
commit 3e41071242
2 changed files with 2 additions and 1 deletions

View File

@@ -341,7 +341,7 @@ class OpenAIHelper:
"""
try:
with open(filename, "rb") as audio:
prompt_text = os.environ.get('WHISPER_PROMPT', '')
prompt_text = self.config['whisper_prompt']
result = await openai.Audio.atranscribe("whisper-1", audio, prompt=prompt_text)
return result.text
except Exception as e: