ProfessorLeVesseur
commited on
Commit
•
709c686
1
Parent(s):
133af8f
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,10 @@ from langchain.chat_models import ChatOpenAI
|
|
12 |
from langsmith import Client
|
13 |
from langchain.smith import RunEvalConfig, run_on_dataset
|
14 |
|
|
|
|
|
|
|
|
|
15 |
# Fetch the OpenAI API key from Streamlit secrets
|
16 |
os.environ["OPENAI_API_KEY"] = st.secrets["OPENAI_API_KEY"]
|
17 |
# Retrieve the OpenAI API Key from environment variable
|
@@ -28,15 +32,19 @@ PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
|
|
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_API_KEY"] =
|
33 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
34 |
os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
|
35 |
os.environ["LANGCHAIN_PROJECT"] = "Inkqa"
|
36 |
# Retrieve the LangSmith API Key from environment variable
|
37 |
LANGCHAIN_API_KEY = os.getenv("LANGCHAIN_API_KEY")
|
38 |
# Initialize LangSmith Service
|
39 |
-
client = Client() #langsmith client
|
|
|
|
|
|
|
|
|
40 |
|
41 |
# # Define the name of the Pinecone index
|
42 |
index_name = 'mimtssinkqa'
|
|
|
12 |
from langsmith import Client
|
13 |
from langchain.smith import RunEvalConfig, run_on_dataset
|
14 |
|
15 |
+
#------------------------------------------------------------------------
|
16 |
+
# Load API Keys From the .env File, & OpenAI, Pinecone, and LangSmith Client
|
17 |
+
#------------------------------------------------------------------------
|
18 |
+
|
19 |
# Fetch the OpenAI API key from Streamlit secrets
|
20 |
os.environ["OPENAI_API_KEY"] = st.secrets["OPENAI_API_KEY"]
|
21 |
# Retrieve the OpenAI API Key from environment variable
|
|
|
32 |
pc = Pinecone(api_key=PINECONE_API_KEY)
|
33 |
|
34 |
# Fetch LangSmith API key from Streamlit secrets
|
35 |
+
# os.environ["LANGCHAIN_API_KEY"] = st.secrets["LANGCHAIN_API_KEY"]
|
36 |
+
os.environ["LANGCHAIN_API_KEY"] = "ls__1819fb2979e44f0a9e410688d81c6390"
|
37 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
38 |
os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
|
39 |
os.environ["LANGCHAIN_PROJECT"] = "Inkqa"
|
40 |
# Retrieve the LangSmith API Key from environment variable
|
41 |
LANGCHAIN_API_KEY = os.getenv("LANGCHAIN_API_KEY")
|
42 |
# Initialize LangSmith Service
|
43 |
+
client = Client(api_key=LANGCHAIN_API_KEY) #langsmith client
|
44 |
+
|
45 |
+
#------------------------------------------------------------------------
|
46 |
+
# Initialize
|
47 |
+
#------------------------------------------------------------------------
|
48 |
|
49 |
# # Define the name of the Pinecone index
|
50 |
index_name = 'mimtssinkqa'
|