Skip to content

Commit

Permalink
fix(js): Add LANGSMITH_ env vars to metadata (#1243)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Nov 21, 2024
1 parent 09ab56b commit 4ef9789
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langsmith",
"version": "0.2.6",
"version": "0.2.7",
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
"packageManager": "[email protected]",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export { RunTree, type RunTreeConfig } from "./run_trees.js";
export { overrideFetchImplementation } from "./singletons/fetch.js";

// Update using yarn bump-version
export const __version__ = "0.2.6";
export const __version__ = "0.2.7";
7 changes: 6 additions & 1 deletion js/src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,16 @@ export function getLangChainEnvVarsMetadata(): Record<string, string> {
"LANGCHAIN_TRACING_V2",
"LANGCHAIN_PROJECT",
"LANGCHAIN_SESSION",
"LANGSMITH_API_KEY",
"LANGSMITH_ENDPOINT",
"LANGSMITH_TRACING_V2",
"LANGSMITH_PROJECT",
"LANGSMITH_SESSION",
];

for (const [key, value] of Object.entries(allEnvVars)) {
if (
key.startsWith("LANGCHAIN_") &&
(key.startsWith("LANGCHAIN_") || key.startsWith("LANGSMITH_")) &&
typeof value === "string" &&
!excluded.includes(key) &&
!key.toLowerCase().includes("key") &&
Expand Down

0 comments on commit 4ef9789

Please sign in to comment.