MVPilgrim commited on
Commit
9281fb6
·
1 Parent(s): d4616d9
Files changed (1) hide show
  1. app.py +6 -14
app.py CHANGED
@@ -510,8 +510,8 @@ try:
510
  if ragFlag:
511
  ragPrompt = getRagData(pprompt)
512
  st.session_state.ragpTA = ragPrompt
513
- userPrompt = pprompt + " " + ragPrompt
514
- prompt = userPrompt
515
  #userPrompt = "<prompt>" \
516
  # + "Answer the following question or carry out the following instruction and also supplement " \
517
  # + "the LLM processing of the question or instruction using the retrieved information from the knowledge base. " \
@@ -531,18 +531,10 @@ try:
531
  else:
532
  userPrompt = pprompt
533
 
534
- #fullPrompt = [
535
- # {"role": "system", "content": st.session_state.sysTA},
536
- # {
537
- # "role": "user",
538
- # "content": userPrompt
539
- # }
540
- #]
541
-
542
- fullPrompt = {
543
- "prompt": userPrompt,
544
- "system_prompt": st.session_state.sysTA
545
- }
546
 
547
  logger.debug(f"### userPrompt: {userPrompt}")
548
  logger.info("setPrompt exited.")
 
510
  if ragFlag:
511
  ragPrompt = getRagData(pprompt)
512
  st.session_state.ragpTA = ragPrompt
513
+ #userPrompt = pprompt + " " + ragPrompt
514
+ #prompt = userPrompt
515
  #userPrompt = "<prompt>" \
516
  # + "Answer the following question or carry out the following instruction and also supplement " \
517
  # + "the LLM processing of the question or instruction using the retrieved information from the knowledge base. " \
 
531
  else:
532
  userPrompt = pprompt
533
 
534
+ fullPrompt = [
535
+ {"role": "system", "content": st.session_state.sysTA},
536
+ {"role": "user", "content": userPrompt}
537
+ ]
 
 
 
 
 
 
 
 
538
 
539
  logger.debug(f"### userPrompt: {userPrompt}")
540
  logger.info("setPrompt exited.")