Update app.py
Browse files
app.py
CHANGED
@@ -188,7 +188,6 @@ pinecone_environment = st.secrets["pinecone_environment"]
|
|
188 |
from pinecone import Pinecone
|
189 |
pc = Pinecone(api_key=pinecone_api_key)
|
190 |
|
191 |
-
|
192 |
# Define the name of the Pinecone index
|
193 |
index_name = 'mimtssinkqa'
|
194 |
|
@@ -198,7 +197,8 @@ embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)
|
|
198 |
|
199 |
# LOAD VECTOR STORE FROM EXISTING INDEX
|
200 |
from langchain_community.vectorstores import Pinecone
|
201 |
-
|
|
|
202 |
|
203 |
# def ask_with_memory(vector_store, query, chat_history=[]):
|
204 |
# from langchain_openai import ChatOpenAI
|
|
|
188 |
from pinecone import Pinecone
|
189 |
pc = Pinecone(api_key=pinecone_api_key)
|
190 |
|
|
|
191 |
# Define the name of the Pinecone index
|
192 |
index_name = 'mimtssinkqa'
|
193 |
|
|
|
197 |
|
198 |
# LOAD VECTOR STORE FROM EXISTING INDEX
|
199 |
from langchain_community.vectorstores import Pinecone
|
200 |
+
pc = pinecone.Pinecone()
|
201 |
+
vector_store = Pinecone.from_existing_index(index_name='mimtssinkqa', embedding=embeddings)
|
202 |
|
203 |
# def ask_with_memory(vector_store, query, chat_history=[]):
|
204 |
# from langchain_openai import ChatOpenAI
|