IliaLarchenko commited on
Commit
e0a8291
1 Parent(s): 4e257b5

Non streaming bug fix

Browse files
Files changed (1) hide show
  1. api/llm.py +2 -2
api/llm.py CHANGED
@@ -141,7 +141,7 @@ class LLMManager:
141
  chat_history = self.update_chat_history(code, previous_code, chat_history, chat_display)
142
 
143
  reply = self.get_text(chat_history)
144
- chat_display.append([None, reply])
145
  chat_history.append({"role": "assistant", "content": reply})
146
 
147
  return chat_history, chat_display, code
@@ -178,7 +178,7 @@ class LLMManager:
178
  return "No interview history available"
179
  else:
180
  messages = self.end_interview_prepare_messages(problem_description, chat_history, interview_type)
181
- return self.get_text_stream(messages)
182
 
183
  def end_interview_stream(self, problem_description, chat_history, interview_type="coding"):
184
  if len(chat_history) <= 2:
 
141
  chat_history = self.update_chat_history(code, previous_code, chat_history, chat_display)
142
 
143
  reply = self.get_text(chat_history)
144
+ chat_display.append([None, reply.split("#NOTES#")[0].strip()])
145
  chat_history.append({"role": "assistant", "content": reply})
146
 
147
  return chat_history, chat_display, code
 
178
  return "No interview history available"
179
  else:
180
  messages = self.end_interview_prepare_messages(problem_description, chat_history, interview_type)
181
+ return self.get_text(messages)
182
 
183
  def end_interview_stream(self, problem_description, chat_history, interview_type="coding"):
184
  if len(chat_history) <= 2: