Srinivasulu kethanaboina commited on
Commit
bba67cb
·
verified ·
1 Parent(s): 93ef39c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -116,7 +116,7 @@ def save_chat_message(session_id, message_data):
116
  def chat_interface(message, history,request: gr.Request):
117
  try:
118
  # Generate a unique session ID for this chat session
119
- session_id = str(uuid.uuid4())
120
 
121
  # Process the user message and generate a response (your chatbot logic)
122
  response = handle_query(message)
@@ -130,7 +130,7 @@ def chat_interface(message, history,request: gr.Request):
130
  }
131
 
132
  # Call the save function to store in Firebase with the generated session ID
133
- save_chat_message(request.client.host, message_data)
134
 
135
  # Return the bot response
136
  return response
 
116
  def chat_interface(message, history,request: gr.Request):
117
  try:
118
  # Generate a unique session ID for this chat session
119
+ session_id = str(request.client.host)
120
 
121
  # Process the user message and generate a response (your chatbot logic)
122
  response = handle_query(message)
 
130
  }
131
 
132
  # Call the save function to store in Firebase with the generated session ID
133
+ save_chat_message(session_id, message_data)
134
 
135
  # Return the bot response
136
  return response