Update app.py
Browse files220 unmodified lines221222223224224225226227220 unmodified lines context_str = "\n".join([doc.page_content for doc in relevant_docs]) prompt_val = ChatPromptTemplate.from_template(prompt) formatted_prompt = prompt_val.format(history=history_str, context=context_str, question=question) formatted_prompt = prompt_val.format(history=history_str, context=context_str if not web_search else "", question=question) answer = generate_chunked_response(model, formatted_prompt) answer = re.split(r'Question:|Current Question:', answer)[-1].strip()app.py+1-1