Hi,
I am trying to implement Langsmith in my streamlit cloud repo. The local run of this app works just fine with langsmith and I can see the update in my langsmith dashboard. But i cant make it work on st cloud,
Here is what i did so far
- Put the secrets in TOML
LANGSMITH_TRACING="true"
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGSMITH_API_KEY="lsv2_pt_"
LANGSMITH_PROJECT="re"
then tried
LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGSMITH_API_KEY="lsv2_pt_"
LANGSMITH_PROJECT="re"
- Calling the secrets in the page where the LLM call is made (not on the streamlit_app.py file). These lines are on the top
from dotenv import load_dotenv
import os
import streamlit as st
load_dotenv()
langsmith_tracing = os.environ.get("LANGSMITH_TRACING") or st.secrets.get("LANGSMITH_TRACING")
langsmith_endpoint = os.environ.get("LANGSMITH_ENDPOINT") or st.secrets.get("LANGSMITH_ENDPOINT")
langsmith_key = os.environ.get("LANGSMITH_API_KEY") or st.secrets.get("LANGSMITH_API_KEY")
langsmith_project = os.environ.get("LANGSMITH_PROJECT") or st.secrets.get("LANGSMITH_PROJECT")
Is there something im doing wrong?