Skip to content

Commit

Permalink
Deactivate LangSmith
Browse files Browse the repository at this point in the history
  • Loading branch information
cbornet committed Jul 23, 2024
1 parent 146f987 commit 27866d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions libs/e2e-tests/e2e_tests/test_utils/tracing.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import logging
import os
import time
from typing import Callable

from langsmith import Client

LANGSMITH_CLIENT = Client()
LANGSMITH_CLIENT = Client() if os.getenv("LANGCHAIN_TRACING_V2", "") == "true" else None


def record_langsmith_sharelink(
run_id: str, record_property: Callable, tries: int = 6
) -> None:
try:
sharelink = LANGSMITH_CLIENT.share_run(run_id)
sharelink = (
LANGSMITH_CLIENT.share_run(run_id) if LANGSMITH_CLIENT else "deactivated"
)
record_property("langsmith_url", sharelink)
logging.info("recorded langsmith link: %s", sharelink)
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-common-env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

export LANGCHAIN_TRACING_V2=true
#export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
export LANGCHAIN_PROJECT="ragstack-ci"

0 comments on commit 27866d8

Please sign in to comment.