Skip to content

Commit b7131a8

Browse files
Update config.py
1 parent f398923 commit b7131a8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/chatbot/config.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,15 @@
2929

3030
if any(config is None for config in required_configs):
3131
raise ValueError("Missing required configuration in config.json")
32+
33+
# Set LangChain tracing and API key from the config file
34+
os.environ["LANGCHAIN_TRACING_V2"] = "true"
35+
os.environ["LANGCHAIN_PROJECT"] = "Indian-Tax-Advisor"
36+
37+
# Retrieve and validate the API key from the environment variables
38+
langchain_api_key = os.getenv("LANGCHAIN_API_KEY")
39+
if langchain_api_key is None:
40+
raise ValueError("LANGCHAIN_API_KEY is not set in the environment variables.")
41+
42+
os.environ["LANGCHAIN_API_KEY"] = langchain_api_key
43+

0 commit comments

Comments
 (0)