Sbnos commited on
Commit
66c3085
·
verified ·
1 Parent(s): 4cc5acb

mainfile cgpt 4

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -70,7 +70,7 @@ def create_conversational_qa_chain(retriever, condense_llm, answer_llm):
70
  ) | CONDENSE_QUESTION_PROMPT | condense_llm
71
 
72
  retrieval_chain = RunnableLambda(
73
- lambda x: {"standalone_question": x}
74
  ) | retriever | _combine_documents
75
 
76
  answer_chain = ANSWER_PROMPT | answer_llm
@@ -136,8 +136,8 @@ def app():
136
  "chat_history": chistory,
137
  }
138
  )
139
- st.write(response)
140
- message = {"role": "assistant", "content": response}
141
  st.session_state.messages.append(message)
142
 
143
  if __name__ == '__main__':
 
70
  ) | CONDENSE_QUESTION_PROMPT | condense_llm
71
 
72
  retrieval_chain = RunnableLambda(
73
+ lambda x: x['standalone_question']
74
  ) | retriever | _combine_documents
75
 
76
  answer_chain = ANSWER_PROMPT | answer_llm
 
136
  "chat_history": chistory,
137
  }
138
  )
139
+ st.write(response['generate_answer'])
140
+ message = {"role": "assistant", "content": response['generate_answer']}
141
  st.session_state.messages.append(message)
142
 
143
  if __name__ == '__main__':