Update app.py
Browse files
app.py
CHANGED
@@ -10,14 +10,11 @@ openai.api_key = st.secrets["OPENAI_API_KEY"]
|
|
10 |
|
11 |
# # Fetch Pinecone API key and environment from Streamlit secrets
|
12 |
PINECONE_API_KEY = st.secrets["PINECONE_API_KEY"]
|
13 |
-
# # pinecone_api_key = '555c0e70-331d-4b43-aac7-5b3aac5078d6'
|
14 |
-
|
15 |
# # AUTHENTICATE/INITIALIZE PINCONE SERVICE
|
16 |
from pinecone import Pinecone
|
17 |
-
PINECONE_API_KEY = "555c0e70-331d-4b43-aac7-5b3aac5078d6"
|
18 |
pc = Pinecone(api_key=PINECONE_API_KEY)
|
19 |
|
20 |
-
|
21 |
# # Define the name of the Pinecone index
|
22 |
index_name = 'mimtssinkqa'
|
23 |
|
@@ -43,7 +40,12 @@ def ask_with_memory(vector_store, query, chat_history=[]):
|
|
43 |
memory = ConversationBufferMemory(memory_key='chat_history', return_messages=True)
|
44 |
|
45 |
system_template = r'''
|
46 |
-
Use the following pieces of context to answer the user's question.
|
|
|
|
|
|
|
|
|
|
|
47 |
----------------
|
48 |
Context: ```{context}```
|
49 |
'''
|
|
|
10 |
|
11 |
# # Fetch Pinecone API key and environment from Streamlit secrets
|
12 |
PINECONE_API_KEY = st.secrets["PINECONE_API_KEY"]
|
|
|
|
|
13 |
# # AUTHENTICATE/INITIALIZE PINCONE SERVICE
|
14 |
from pinecone import Pinecone
|
15 |
+
# PINECONE_API_KEY = "555c0e70-331d-4b43-aac7-5b3aac5078d6"
|
16 |
pc = Pinecone(api_key=PINECONE_API_KEY)
|
17 |
|
|
|
18 |
# # Define the name of the Pinecone index
|
19 |
index_name = 'mimtssinkqa'
|
20 |
|
|
|
40 |
memory = ConversationBufferMemory(memory_key='chat_history', return_messages=True)
|
41 |
|
42 |
system_template = r'''
|
43 |
+
Use the following pieces of context to answer the user's question.
|
44 |
+
The title of the article is Intensifying literacy Instruction: Essential Practices.
|
45 |
+
Do not mention the Header unless asked.
|
46 |
+
Provide a thorough and descriptive answer.
|
47 |
+
You are an experienced educator with extensive knowledge regarding the Simple View of Reading, SWPBIS, and SEL.
|
48 |
+
Your audience are teachers and administrators.
|
49 |
----------------
|
50 |
Context: ```{context}```
|
51 |
'''
|