Spaces:
Sleeping
Sleeping
ProfessorLeVesseur
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -19,14 +19,6 @@ OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
|
19 |
# Initialize OpenAI Service
|
20 |
openai.api_key = OPENAI_API_KEY
|
21 |
|
22 |
-
# Fetch Pinecone API key from Streamlit secrets
|
23 |
-
os.environ["PINECONE_API_KEY"] = st.secrets["PINECONE_API_KEY"]
|
24 |
-
# Retrieve the Pinecone API Key from environment variable
|
25 |
-
PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
|
26 |
-
# Initialize Pinecone Service
|
27 |
-
from pinecone import Pinecone
|
28 |
-
pc = Pinecone(api_key=PINECONE_API_KEY)
|
29 |
-
|
30 |
# Fetch Pinecone API key from Streamlit secrets
|
31 |
os.environ["PINECONE_API_KEY"] = st.secrets["PINECONE_API_KEY"]
|
32 |
# Retrieve the Pinecone API Key from environment variable
|
@@ -35,6 +27,15 @@ PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
|
|
35 |
# from pinecone import Pinecone
|
36 |
pc = Pinecone(api_key=PINECONE_API_KEY)
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
# # Define the name of the Pinecone index
|
40 |
index_name = 'mimtssinkqa'
|
|
|
19 |
# Initialize OpenAI Service
|
20 |
openai.api_key = OPENAI_API_KEY
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# Fetch Pinecone API key from Streamlit secrets
|
23 |
os.environ["PINECONE_API_KEY"] = st.secrets["PINECONE_API_KEY"]
|
24 |
# Retrieve the Pinecone API Key from environment variable
|
|
|
27 |
# from pinecone import Pinecone
|
28 |
pc = Pinecone(api_key=PINECONE_API_KEY)
|
29 |
|
30 |
+
# Fetch LangSmith API key from Streamlit secrets
|
31 |
+
os.environ["LANGCHAIN_API_KEY"] = st.secrets["LANGCHAIN_API_KEY"]
|
32 |
+
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
33 |
+
os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
|
34 |
+
os.environ["LANGCHAIN_PROJECT"] = "Inkqa"
|
35 |
+
# Retrieve the LangSmith API Key from environment variable
|
36 |
+
LANGCHAIN_API_KEY = os.getenv("LANGCHAIN_API_KEY")
|
37 |
+
# Initialize LangSmith Service
|
38 |
+
client = Client() #langsmith client
|
39 |
|
40 |
# # Define the name of the Pinecone index
|
41 |
index_name = 'mimtssinkqa'
|