Skip to content

Commit

Permalink
Update env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
TheExplainthis committed Mar 18, 2023
1 parent 4324863 commit f7f4b6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
handler = WebhookHandler(os.getenv('LINE_CHANNEL_SECRET'))
storage = Storage('db.json')

memory = Memory(system_message=os.getenv('OPENAI_SYSTEM_MESSAGE'), memory_message_count=2)
memory = Memory(system_message=os.getenv('SYSTEM_MESSAGE'), memory_message_count=2)
model_management = {}
api_keys = {}

Expand Down
2 changes: 1 addition & 1 deletion src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def audio_transcriptions(self, file_path, model_engine) -> str:
'file': open(file_path, 'rb'),
'model': (None, 'whisper-1'),
}
r = self._request_with_file('/audio/transcriptions', files)
if r.get('error'):
return None, r.get('error', {}).get('message', '')
r = self._request_with_file('/audio/transcriptions', files)
return r['text'], None

def image_generations(self, prompt: str) -> str:
Expand Down

0 comments on commit f7f4b6f

Please sign in to comment.