soyleyicicem commited on
Commit
f63d7ba
·
verified ·
1 Parent(s): e2fe64b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -191,7 +191,8 @@ def chat(question, manual, history, liked):
191
  history = history or []
192
 
193
  conv = format_chat_prompt(history)
194
-
 
195
  manual_list = {"Toyota_Corolla_2024_TR": -8580416610875007536,
196
  "Renault_Clio_2024_TR":-5514489544983735006,
197
  "Fiat_Egea_2024_TR":-2026113796962100812}
@@ -335,11 +336,13 @@ def chat(question, manual, history, liked):
335
  final_response = chat_gpt_nofn(prompt=prompt, history=conv)
336
 
337
  partial_response = ""
 
 
338
  for chunk in final_response:
339
  try:
340
  if chunk.choices[0].delta.content is not None:
341
  partial_response += chunk.choices[0].delta.content
342
- print("Answer:--- %s seconds ---" % (time.time() - start_time))
343
  yield partial_response, history + [(question, partial_response)]
344
  except:
345
  pass
 
191
  history = history or []
192
 
193
  conv = format_chat_prompt(history)
194
+ print("History: ", history)
195
+ print("CONV: ", conv)
196
  manual_list = {"Toyota_Corolla_2024_TR": -8580416610875007536,
197
  "Renault_Clio_2024_TR":-5514489544983735006,
198
  "Fiat_Egea_2024_TR":-2026113796962100812}
 
336
  final_response = chat_gpt_nofn(prompt=prompt, history=conv)
337
 
338
  partial_response = ""
339
+ print("Answer:--- %s seconds ---" % (time.time() - start_time))
340
+
341
  for chunk in final_response:
342
  try:
343
  if chunk.choices[0].delta.content is not None:
344
  partial_response += chunk.choices[0].delta.content
345
+
346
  yield partial_response, history + [(question, partial_response)]
347
  except:
348
  pass