Spaces:
Running
Running
MVPilgrim
commited on
Commit
·
9281fb6
1
Parent(s):
d4616d9
debug
Browse files
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 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
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.")
|