Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use langsmith env vars #373

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

baskaryan
Copy link
Contributor

@baskaryan baskaryan commented Jul 29, 2024

Updates:

LANGCHAIN_TRACING_V2 -> LANGSMITH_TRACING
LANGCHAIN_PROJECT    -> LANGSMITH_PROJECT
LANGCHAIN_API_KEY    -> LANGSMITH_API_KEY
LANGCHAIN_ENDPOINT   -> LANGSMITH_ENDPOINT

not sure all of these actually work across py and js

Copy link

vercel bot commented Jul 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langsmith-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 10:56pm

@baskaryan
Copy link
Contributor Author

pr doesn't touch:

LANGCHAIN_TEST_TRACKING
LANGCHAIN_TEST_CACHE
LANGCHAIN_HUB_API_KEY
LANGCHAIN_HIDE_INPUTS
LANGCHAIN_HIDE_OUTPUTS
LANGCHAIN_TRACING_SAMPLING_RATE
LANGCHAIN_HUB_API_URL

imo these should also be updated to use LANGSMITH prefix but seems like bigger change?

@@ -88,8 +88,8 @@ for input_prompt, output_answer in example_inputs:
)`),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to update old docs, not sure when support was added anyway

@@ -26,9 +26,9 @@ If you are using LangChain (either Python or JS/TS), you can skip this section a
LangSmith makes it easy to log traces with minimal changes to your existing code with the `@traceable` decorator in Python and `traceable` function in TypeScript.

:::note
The `LANGCHAIN_TRACING_V2` environment variable must be set to `'true'` in order for traces to be logged to LangSmith, even when using `@traceable` or `traceable`. This allows you to toggle tracing on and off without changing your code.
The `LANGSMITH_TRACING` environment variable must be set to `'true'` in order for traces to be logged to LangSmith, even when using `@traceable` or `traceable`. This allows you to toggle tracing on and off without changing your code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bearing in mind recent feedback about things changing without warning - can we add a callout documenting that the old variables will still work?

@jacoblee93
Copy link
Contributor

It looks like LANGSMITH_ENDPOINT, LANGSMITH_API_KEY, and LANGSMITH_PROJECT aren't in JS 😬

LANGSMITH_TRACING is at least.

@agola11
Copy link
Contributor

agola11 commented Jul 30, 2024

I would change in the SDK first, let it bake a while, then change docs later

@agola11
Copy link
Contributor

agola11 commented Jul 30, 2024

The changes in the SDK should bw-compat, the older env vars should still be respected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants