-
Notifications
You must be signed in to change notification settings - Fork 19
fix: pagination and tracing #83
Conversation
| ]; | ||
|
|
||
| // Return true unless explicitly disabled | ||
| return !tracingVars.some((val) => val === "false" || val === "False"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For in-mem server wouldn't it be opt-in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic is the same as how we do it in python server. tracing is only disabled if you explicitly set langsmith_tracing or any of the variants to false or if you dont have an api key defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's opt-in:
TRACING = (
env("LANGCHAIN_TRACING_V2", cast=bool, default=None)
or env("LANGCHAIN_TRACING", cast=bool, default=None)
or env("LANGSMITH_TRACING_V2", cast=bool, default=None)
or env("LANGSMITH_TRACING", cast=bool, default=None)
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless i'm misreading (which happens a lot)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic is admittedly a bit hard to reason about but in the block above that we do:
if (
LANGSMITH_API_KEY
and not getenv("LANGCHAIN_TRACING_V2")
and not getenv("LANGCHAIN_TRACING")
and not getenv("LANGSMITH_TRACING_V2")
and not getenv("LANGSMITH_TRACING")
):
environ["LANGCHAIN_TRACING_V2"] = "true"
so if they have not set a value for langsmith_tracing but have an api key, it gets set to true
This PR does a few things:
x-pagination-totalheaderall these are supported in the python server