mavinsao commited on
Commit
1f92133
·
verified ·
1 Parent(s): 8b0ce8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -46,7 +46,7 @@ Recommendation:
46
 
47
  PROMPT = PromptTemplate(
48
  template=prompt_template,
49
- input_variables=["chat_history", "query", "context"]
50
  )
51
 
52
  # Initialize the language model
@@ -86,8 +86,8 @@ if prompt := st.chat_input("What are you looking to learn?"):
86
 
87
  # Assistant response generation with streaming effect
88
  with st.chat_message("assistant"):
89
- response = qa_chain({"query": prompt})
90
- response_text = response["response"]
91
 
92
  # Stream the response word by word
93
  for accumulated_response in response_text:
 
46
 
47
  PROMPT = PromptTemplate(
48
  template=prompt_template,
49
+ input_variables=["chat_history", "question", "context"]
50
  )
51
 
52
  # Initialize the language model
 
86
 
87
  # Assistant response generation with streaming effect
88
  with st.chat_message("assistant"):
89
+ response = qa_chain({"question": prompt})
90
+ response_text = response["answer"]
91
 
92
  # Stream the response word by word
93
  for accumulated_response in response_text: