Spaces:
Running
Running
MVPilgrim
commited on
Commit
·
cfe0c9e
1
Parent(s):
6f49ec6
debug
Browse files
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 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
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.")
|