iShare commited on
Commit
7257ca0
1 Parent(s): 0474d21

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -77,7 +77,11 @@ async def chat(chat_request: ChatRequest):
77
  print(cleaned_initial_ai_response)
78
  print()
79
 
80
- final_ai_response = cleaned_initial_ai_response.split('<|end|>')[0].strip().replace('\n\n', '\n').replace('<|end|>', '').replace('<|user|>', '').replace('<|system|>', '').replace('<|assistant|>', '')
 
 
 
 
81
  new_final_ai_response = final_ai_response.split('Unhelpful Answer:')[0].strip()
82
  final_result = new_final_ai_response.split('Note:')[0].strip()
83
 
 
77
  print(cleaned_initial_ai_response)
78
  print()
79
 
80
+ final_ai_response = cleaned_initial_ai_response.split('¿cuál e')[0].strip().replace('\n\n', '\n').replace('<|end|>', '').replace('<|user|>', '').replace('<|system|>', '').replace('<|assistant|>', '')
81
+ print("final_ai_response after cleaning/splitting/partitioning '¿cuál e'")
82
+ print(final_ai_response)
83
+ print()
84
+ final_ai_response = final_ai_response.split('<|end|>')[0].strip().replace('\n\n', '\n').replace('<|end|>', '').replace('<|user|>', '').replace('<|system|>', '').replace('<|assistant|>', '')
85
  new_final_ai_response = final_ai_response.split('Unhelpful Answer:')[0].strip()
86
  final_result = new_final_ai_response.split('Note:')[0].strip()
87