awacke1 commited on
Commit
10132e6
·
1 Parent(s): cd48409

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -36,7 +36,8 @@ def chat_with_model(prompt, document_section):
36
  if len(document_section)>0:
37
  conversation.append({'role': 'assistant', 'content': document_section})
38
  response = openai.ChatCompletion.create(model=model, messages=conversation)
39
- return response['choices'][0]['message']['content']
 
40
 
41
  def transcribe_audio(openai_key, file_path, model):
42
  OPENAI_API_URL = "https://api.openai.com/v1/audio/transcriptions"
 
36
  if len(document_section)>0:
37
  conversation.append({'role': 'assistant', 'content': document_section})
38
  response = openai.ChatCompletion.create(model=model, messages=conversation)
39
+ return response
40
+ #return response['choices'][0]['message']['content']
41
 
42
  def transcribe_audio(openai_key, file_path, model):
43
  OPENAI_API_URL = "https://api.openai.com/v1/audio/transcriptions"