Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,8 +27,9 @@ if 'requests' not in st.session_state:
|
|
| 27 |
|
| 28 |
if 'buffer_memory' not in st.session_state:
|
| 29 |
st.session_state.buffer_memory = ConversationBufferWindowMemory(k=3, return_messages=True)
|
|
|
|
| 30 |
|
| 31 |
-
llm = ChatGoogleGenerativeAI(model="gemini-pro",google_api_key=
|
| 32 |
|
| 33 |
system_msg_template = SystemMessagePromptTemplate.from_template(
|
| 34 |
template="""Answer the question as truthfully as possible using the provided context,
|
|
|
|
| 27 |
|
| 28 |
if 'buffer_memory' not in st.session_state:
|
| 29 |
st.session_state.buffer_memory = ConversationBufferWindowMemory(k=3, return_messages=True)
|
| 30 |
+
GOOGLE_API_KEY = os.getenv('Google_API_KEY')
|
| 31 |
|
| 32 |
+
llm = ChatGoogleGenerativeAI(model="gemini-pro",google_api_key=GOOGLE_API_KEY)
|
| 33 |
|
| 34 |
system_msg_template = SystemMessagePromptTemplate.from_template(
|
| 35 |
template="""Answer the question as truthfully as possible using the provided context,
|