IliaLarchenko commited on
Commit
63d96fd
1 Parent(s): 4b088a0

Empty message handling

Browse files
Files changed (1) hide show
  1. api/llm.py +2 -0
api/llm.py CHANGED
@@ -279,6 +279,8 @@ class LLMManager:
279
  List[Dict[str, str]]: Updated chat history.
280
  """
281
  message = chat_display[-1][0]
 
 
282
  if code != previous_code:
283
  message += "\nMY NOTES AND CODE:\n" + code
284
  chat_history.append({"role": "user", "content": message})
 
279
  List[Dict[str, str]]: Updated chat history.
280
  """
281
  message = chat_display[-1][0]
282
+ if not message:
283
+ message = ""
284
  if code != previous_code:
285
  message += "\nMY NOTES AND CODE:\n" + code
286
  chat_history.append({"role": "user", "content": message})