soyleyicicem commited on
Commit
7721a62
·
verified ·
1 Parent(s): bf030be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -221,7 +221,9 @@ def chat(question, manual, history, liked):
221
  retriever = retriever_db(db, CAR_ID)
222
 
223
  start_time = time.time()
224
- first_hop = f"""Soruyu cevaplarken:
 
 
225
  1- Önce soruyu düşün.
226
  2- Kullanıcının sorduğu sorunun konu başlıkları neler olabilir?
227
  3- Bu konu başlıkları kullanım kılavuzu içindekiler tablosu başlıkları ile alakalı mı?
@@ -233,17 +235,16 @@ def chat(question, manual, history, liked):
233
  {content}
234
 
235
  """
236
- # conv = [{"role": "system", "content": f"{first_hop}"}]
237
- # conv.append({"role": "system", "content": f"{first_hop}"})
238
- # first_hop_response = chat_gpt(prompt=f"Soru: {question}", history=conv, tools=retrieval_functions)
239
- # conv.append(first_hop_response.choices[-1].message)
240
-
241
- # conv.append({"role": "system", "content": f"{first_hop}"})
242
- first_hop_response = chat_gpt(prompt=f"Soru: {question}", history=conv, tools=retrieval_functions)
243
 
244
- tool_calls = first_hop_response.choices[-1].message.tool_calls
245
- arg_list = []
246
- for i in range(3):
 
 
247
 
248
  if tool_calls:
249
  for tool_call in tool_calls:
 
221
  retriever = retriever_db(db, CAR_ID)
222
 
223
  start_time = time.time()
224
+
225
+ for i in range(3):
226
+ first_hop = f"""Soruyu cevaplarken:
227
  1- Önce soruyu düşün.
228
  2- Kullanıcının sorduğu sorunun konu başlıkları neler olabilir?
229
  3- Bu konu başlıkları kullanım kılavuzu içindekiler tablosu başlıkları ile alakalı mı?
 
235
  {content}
236
 
237
  """
238
+ # conv = [{"role": "system", "content": f"{first_hop}"}]
239
+ # conv.append({"role": "system", "content": f"{first_hop}"})
240
+ # first_hop_response = chat_gpt(prompt=f"Soru: {question}", history=conv, tools=retrieval_functions)
241
+ # conv.append(first_hop_response.choices[-1].message)
 
 
 
242
 
243
+ # conv.append({"role": "system", "content": f"{first_hop}"})
244
+ first_hop_response = chat_gpt(prompt=f"Soru: {question}", history=conv, tools=retrieval_functions)
245
+
246
+ tool_calls = first_hop_response.choices[-1].message.tool_calls
247
+ arg_list = []
248
 
249
  if tool_calls:
250
  for tool_call in tool_calls: