Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
65 |
-
|
66 |
-
|
|
|
|
|
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)
|