Arafath10 commited on
Commit
7b373bb
·
verified ·
1 Parent(s): 7c622cf

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -0
main.py CHANGED
@@ -138,6 +138,7 @@ def get_messages_of_thread(thread_id):
138
 
139
 
140
  def insert_newchat(user_name,user_message,bot_message):
 
141
  #insert data
142
  # Connect to the database
143
  connection_load_chat = mysql.connector.connect(
@@ -178,6 +179,7 @@ def insert_newchat(user_name,user_message,bot_message):
178
  return {"current_thread_id":current_thread_id,"message":"chat stored successfully"}
179
 
180
  def update_existingchat(tread_id,user_message,bot_message):
 
181
  # Connect to the database
182
  connection_load_chat = mysql.connector.connect(
183
  host=host,
 
138
 
139
 
140
  def insert_newchat(user_name,user_message,bot_message):
141
+ bot_message = bot_message.replace('"', '\\"')
142
  #insert data
143
  # Connect to the database
144
  connection_load_chat = mysql.connector.connect(
 
179
  return {"current_thread_id":current_thread_id,"message":"chat stored successfully"}
180
 
181
  def update_existingchat(tread_id,user_message,bot_message):
182
+ bot_message = bot_message.replace('"', '\\"')
183
  # Connect to the database
184
  connection_load_chat = mysql.connector.connect(
185
  host=host,