J266501 commited on
Commit
67c0eca
·
verified ·
1 Parent(s): 1214e80
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -95,11 +95,12 @@ if llm and retriever: # Only build the chain if both LLM and retriever were succ
95
 
96
  # 修改 Prompt Template
97
  prompt = ChatPromptTemplate.from_messages([
98
- ("system", answer_prompt),
99
- ("user", "Context: {context}\n\nQuestion: {question}"),
100
  ])
101
  print("Prompt Template build success.")
102
 
 
103
  rag_chain = (
104
  {
105
  "context": retriever | format_docs,
 
95
 
96
  # 修改 Prompt Template
97
  prompt = ChatPromptTemplate.from_messages([
98
+ ("system", answer_prompt + "\n\nContext:\n{context}"),
99
+ ("user", "{question}"),
100
  ])
101
  print("Prompt Template build success.")
102
 
103
+
104
  rag_chain = (
105
  {
106
  "context": retriever | format_docs,