Update app.py
Browse files41 unmodified lines4243444546474816 unmodified lines6566676869707141 unmodified linesasync def rephrase_query(query, context, model):# Log the original query for debugginglogging.info(f"Original query: {query}")prompt = f"""You are a highly intelligent conversational chatbot. Your task is to analyze the given context and new query, then decide whether to rephrase the query with or without incorporating the context. Follow these steps:1. Determine if the new query is a continuation of the previous conversation or an entirely new topic.2. If it's a continuation, rephrase the query by incorporating relevant information from the context to make it more specific and contextual.16 unmodified linestemperature=0.2,)# The response should be the rephrased query as per your promptrephrased_query = response.strip()# Log the rephrased query41 unmodified lines4243444546474816 unmodified lines6566676869707141 unmodified linesasync def rephrase_query(query, context, model):# Log the original query for debugginglogging.info(f"Original query: {query}")prompt = f"""You are a highly intelligent conversational chatbot. Your task is to analyze the given context and new query, then decide whether to rephrase the query with or without incorporating the context. Follow these steps:1. Determine if the new query is a continuation of the previous conversation or an entirely new topic.2. If it's a continuation, rephrase the query by incorporating relevant information from the context to make it more specific and contextual.16 unmodified linestemperature=0.2,)# Extract the rephrased queryrephrased_query = response.strip()# Log the rephrased query
app.py+2-2