DiamondYin commited on
Commit
8bffefe
·
1 Parent(s): 7c246c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -88,9 +88,9 @@ def get_response(history, audio_input):
88
  LOGGER.info("\ndocument_response: %s", answer1)
89
  print('\ndocument_response:', answer1)
90
 
91
- #for trigger in GENERAL_RSPONSE_TRIGGERS:
92
- #if trigger in str(answer):
93
- MESSAGES.append({"role": "user", "content": question})
94
  #chat = openai.ChatCompletion.create(
95
  # model="gpt-3.5-turbo",
96
  # messages=MESSAGES,
@@ -99,9 +99,9 @@ def get_response(history, audio_input):
99
  # stop="\n"
100
  # )
101
  #answer = chat.choices[0].message.content
102
- MESSAGES.append({"role": "assistant", "content": answer1})
103
- LOGGER.info("general_response: %s", answer1)
104
- print('\ngeneral_response:', answer1)
105
 
106
  AUDIO_HTML = text_to_speech_gen(answer1)
107
  history[-1][1] = answer1
 
88
  LOGGER.info("\ndocument_response: %s", answer1)
89
  print('\ndocument_response:', answer1)
90
 
91
+ for trigger in GENERAL_RSPONSE_TRIGGERS:
92
+ if trigger in str(answer1):
93
+ MESSAGES.append({"role": "user", "content": question})
94
  #chat = openai.ChatCompletion.create(
95
  # model="gpt-3.5-turbo",
96
  # messages=MESSAGES,
 
99
  # stop="\n"
100
  # )
101
  #answer = chat.choices[0].message.content
102
+ MESSAGES.append({"role": "assistant", "content": answer1})
103
+ LOGGER.info("general_response: %s", answer1)
104
+ print('\ngeneral_response:', answer1)
105
 
106
  AUDIO_HTML = text_to_speech_gen(answer1)
107
  history[-1][1] = answer1