ArturG9 commited on
Commit
ed1f598
·
verified ·
1 Parent(s): 78b3277

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -167,20 +167,21 @@ def create_conversational_rag_chain(retriever):
167
  temperature=0.0,
168
  n_ctx=22000,
169
  n_batch=2000,
170
- max_tokens=200,
171
  repeat_penalty=1.7,
172
- last_n_tokens_size = 200,
173
  callback_manager=callback_manager,
174
  verbose=False,
175
  )
176
 
177
- template = """You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question in a natural language. If you don't know the answer, just say that you don't know. Use six sentences maximum and keep the answer concise.
 
 
 
 
178
 
179
- Question: {question}
180
 
181
- Context: {context}
182
 
183
- Answer:
184
  """
185
  prompt = ChatPromptTemplate.from_template(template)
186
 
 
167
  temperature=0.0,
168
  n_ctx=22000,
169
  n_batch=2000,
170
+ #max_tokens=200,
171
  repeat_penalty=1.7,
172
+ last_n_tokens_size = 500,
173
  callback_manager=callback_manager,
174
  verbose=False,
175
  )
176
 
177
+ template = """Answer the question in a natural language, based only on the following context:
178
+ {context}
179
+
180
+ Question: {question}
181
+
182
 
 
183
 
 
184
 
 
185
  """
186
  prompt = ChatPromptTemplate.from_template(template)
187