-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[js] Support LangSmith-prefixed env vars (#929)
- Loading branch information
Showing
7 changed files
with
43 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "langsmith", | ||
"version": "0.1.41", | ||
"version": "0.1.42", | ||
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.", | ||
"packageManager": "[email protected]", | ||
"files": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import { getEnvironmentVariable } from "./utils/env.js"; | ||
import { getLangSmithEnvironmentVariable } from "./utils/env.js"; | ||
|
||
export const isTracingEnabled = (tracingEnabled?: boolean): boolean => { | ||
if (tracingEnabled !== undefined) { | ||
return tracingEnabled; | ||
} | ||
const envVars = [ | ||
"LANGSMITH_TRACING_V2", | ||
"LANGCHAIN_TRACING_V2", | ||
"LANGSMITH_TRACING", | ||
"LANGCHAIN_TRACING", | ||
]; | ||
return !!envVars.find((envVar) => getEnvironmentVariable(envVar) === "true"); | ||
const envVars = ["TRACING_V2", "TRACING"]; | ||
return !!envVars.find( | ||
(envVar) => getLangSmithEnvironmentVariable(envVar) === "true" | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters