abhivsh commited on
Commit
8a2e58d
·
verified ·
1 Parent(s): 958792d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -61,9 +61,11 @@ def get_file(source_documents):
61
  def chat_query(question, history):
62
 
63
 
64
- query = f"""As an experienced Electrical Engineer, please provide an elaborate, precise, and pointwise answer politely to the question: {question}.
65
- Ensure that your response is detailed, accurate, and addresses each aspect of the question thoroughly.
66
- If the context of the question doesn't align with the chat history, please provide your response in a fresh manner. """
 
 
67
 
68
  #llm = ChatOpenAI(model=llm_name, temperature=0.1, api_key = OPENAI_API_KEY)
69
  llm = GoogleGenerativeAI(model="gemini-1.0-pro", google_api_key=GEMINI_API_KEY)
 
61
  def chat_query(question, history):
62
 
63
 
64
+ query = f"""As an experienced Electrical Engineer, please provide an elaborate, precise, and answer politely pointwise to the question: {question}.
65
+ Also, Please consider the provided chat history: {chat_history}
66
+ Ensure that your response is detailed, accurate, and addresses each aspect of the question thoroughly.
67
+ If the context of the question doesn't align with the chat history, please provide your response in a fresh manner.
68
+ If don't get the answer, feel free to reply from Internet."""
69
 
70
  #llm = ChatOpenAI(model=llm_name, temperature=0.1, api_key = OPENAI_API_KEY)
71
  llm = GoogleGenerativeAI(model="gemini-1.0-pro", google_api_key=GEMINI_API_KEY)