richardr1126 commited on
Commit
0ece87c
·
1 Parent(s): a01503d
Files changed (1) hide show
  1. app-ngrok.py +3 -5
app-ngrok.py CHANGED
@@ -100,15 +100,13 @@ def generate(input_message: str, db_info="", temperature=0.2, top_p=0.9, top_k=0
100
  if response_text and response_text[-1] == ".":
101
  response_text = response_text[:-1]
102
 
 
 
103
  if log:
104
  # Log the request to Firestore
105
- output = format(response_text)
106
  log_to_firestore(input_message, db_info, temperature, output if format_sql else response_text)
107
 
108
- if format_sql:
109
- return output
110
- else:
111
- return response_text
112
 
113
 
114
  except Exception as e:
 
100
  if response_text and response_text[-1] == ".":
101
  response_text = response_text[:-1]
102
 
103
+ output = format(response_text) if format_sql else response_text
104
+
105
  if log:
106
  # Log the request to Firestore
 
107
  log_to_firestore(input_message, db_info, temperature, output if format_sql else response_text)
108
 
109
+ return output
 
 
 
110
 
111
 
112
  except Exception as e: