ProfessorLeVesseur commited on
Commit
61934cf
·
verified ·
1 Parent(s): e056b25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -7
app.py CHANGED
@@ -31,16 +31,28 @@ PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
31
  # from pinecone import Pinecone
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
 
31
  # from pinecone import Pinecone
32
  pc = Pinecone(api_key=PINECONE_API_KEY)
33
 
34
+ ###NEW
35
+ # Retrieve the LangSmith API Key from environment variable
36
+ LANGCHAIN_API_KEY = os.getenv("LANGCHAIN_API_KEY")
37
+ os.environ["LANGCHAIN_API_KEY"] = str(os.getenv("LANGCHAIN_API_KEY"))
38
  os.environ["LANGCHAIN_TRACING_V2"] = "true"
39
  os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
40
  os.environ["LANGCHAIN_PROJECT"] = "Inkqa"
41
+
42
+ # Initialize the Langsmith client/services with API key
43
+ # client = Client(api_key=LANGCHAIN_API_KEY)
44
+ client = Client()
45
+
46
+ # # Fetch LangSmith API key from Streamlit secrets
47
+ # os.environ["LANGCHAIN_API_KEY"] = st.secrets["LANGCHAIN_API_KEY"]
48
+ # # os.environ["LANGCHAIN_API_KEY"] = "ls__1819fb2979e44f0a9e410688d81c6390"
49
+ # os.environ["LANGCHAIN_TRACING_V2"] = "true"
50
+ # os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
51
+ # os.environ["LANGCHAIN_PROJECT"] = "Inkqa"
52
+ # # Retrieve the LangSmith API Key from environment variable
53
+ # LANGCHAIN_API_KEY = os.getenv("LANGCHAIN_API_KEY")
54
+ # # Initialize LangSmith Service
55
+ # client = Client(api_key=LANGCHAIN_API_KEY) #langsmith client
56
 
57
  #------------------------------------------------------------------------
58
  # Initialize