MVPilgrim commited on
Commit
cfe0c9e
·
1 Parent(s): 6f49ec6
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -502,7 +502,7 @@ try:
502
  # + "MAINPROMPT: " + pprompt + " " \
503
  # + "ADDITIONALCONTEXT: " + ragPrompt
504
  userPrompt = "<prompt>" \
505
- + "Answer the following question or carry out the following instruction and supplement " \
506
  + "the LLM processing of the question or instruction using the retrieved information from the knowledge base. " \
507
  + "Question or Instruction: " + pprompt + "\n" \
508
  + "Retrieve the relevant information from the knowledge base: " \
@@ -514,14 +514,13 @@ try:
514
  else:
515
  #userPrompt = st.session_state.sysTA + " " + pprompt
516
  userPrompt = pprompt
517
- #prompt = f""" <s> [INST] <<SYS>> {systemTextArea.value} </SYS>> Q: {userPrompt} A: [/INST]"""
518
- #fullPrompt = [
519
- # {"role": "system", "content": st.session_state.sysTA},
520
- # {
521
- # "role": "user",
522
- # "content": userPrompt
523
- # }
524
- #]
525
  fullPrompt = userPrompt
526
  logger.info(f"### userPrompt: {userPrompt}")
527
  logger.info("setPrompt exited.")
 
502
  # + "MAINPROMPT: " + pprompt + " " \
503
  # + "ADDITIONALCONTEXT: " + ragPrompt
504
  userPrompt = "<prompt>" \
505
+ + "Answer the following question or carry out the following instruction and also supplement " \
506
  + "the LLM processing of the question or instruction using the retrieved information from the knowledge base. " \
507
  + "Question or Instruction: " + pprompt + "\n" \
508
  + "Retrieve the relevant information from the knowledge base: " \
 
514
  else:
515
  #userPrompt = st.session_state.sysTA + " " + pprompt
516
  userPrompt = pprompt
517
+ fullPrompt = [
518
+ {"role": "system", "content": st.session_state.sysTA},
519
+ {
520
+ "role": "user",
521
+ "content": userPrompt
522
+ }
523
+ ]
 
524
  fullPrompt = userPrompt
525
  logger.info(f"### userPrompt: {userPrompt}")
526
  logger.info("setPrompt exited.")