MVPilgrim commited on
Commit
ee5fc0e
·
1 Parent(s): 26fb834
Files changed (1) hide show
  1. app.py +7 -18
app.py CHANGED
@@ -518,24 +518,13 @@ try:
518
  if ragFlag:
519
  ragPrompt = getRagData(pprompt)
520
  st.session_state.ragpTA = ragPrompt
521
- #userPrompt = pprompt + " " + ragPrompt
522
- #prompt = userPrompt
523
- #userPrompt = "<prompt>" \
524
- # + "Answer the following question or carry out the following instruction and also supplement " \
525
- # + "the LLM processing of the question or instruction using the retrieved information from the knowledge base. " \
526
- # + "Question or Instruction: " \
527
- # + pprompt + 7" " \
528
- # + "Retrieve the relevant information from the knowledge base: " \
529
- # + "<knowledge_base>" \
530
- # + ragPrompt \
531
- # + "</knowledge_base>" \
532
- # + "</prompt>"
533
-
534
- userPrompt = pprompt + " " \
535
- + "Also, combine the following information with information in the LLM itself. " \
536
- + "Use the combined information to generate the response. " \
537
- + ragPrompt + " "
538
-
539
  else:
540
  userPrompt = pprompt
541
 
 
518
  if ragFlag:
519
  ragPrompt = getRagData(pprompt)
520
  st.session_state.ragpTA = ragPrompt
521
+ if ragFlag != "None found.":
522
+ userPrompt = pprompt + " " \
523
+ + "Also, combine the following information with information in the LLM itself. " \
524
+ + "Use the combined information to generate the response. " \
525
+ + ragPrompt + " "
526
+ else:
527
+ userPrompt = pprompt
 
 
 
 
 
 
 
 
 
 
 
528
  else:
529
  userPrompt = pprompt
530