File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
libs/e2e-tests/e2e_tests/test_utils Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
import logging
2
+ import os
2
3
import time
3
4
from typing import Callable
4
5
5
6
from langsmith import Client
6
7
7
- LANGSMITH_CLIENT = Client ()
8
+ LANGSMITH_CLIENT = Client () if os . getenv ( "LANGCHAIN_TRACING_V2" , "" ) == "true" else None
8
9
9
10
10
11
def record_langsmith_sharelink (
11
12
run_id : str , record_property : Callable , tries : int = 6
12
13
) -> None :
13
14
try :
14
- sharelink = LANGSMITH_CLIENT .share_run (run_id )
15
+ sharelink = (
16
+ LANGSMITH_CLIENT .share_run (run_id ) if LANGSMITH_CLIENT else "deactivated"
17
+ )
15
18
record_property ("langsmith_url" , sharelink )
16
19
logging .info ("recorded langsmith link: %s" , sharelink )
17
20
except Exception :
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- export LANGCHAIN_TRACING_V2=true
3
+ # export LANGCHAIN_TRACING_V2=true
4
4
export LANGCHAIN_ENDPOINT=" https://api.smith.langchain.com"
5
5
export LANGCHAIN_PROJECT=" ragstack-ci"
You can’t perform that action at this time.
0 commit comments