-
Notifications
You must be signed in to change notification settings - Fork 584
ref(langchain): Remove set_data_normalized for primitive attributes
#5510
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -389,7 +389,7 @@ def on_llm_start( | |
|
|
||
| for key, attribute in DATA_FIELDS.items(): | ||
| if key in all_params and all_params[key] is not None: | ||
| set_data_normalized(span, attribute, all_params[key], unpack=False) | ||
| span.set_data(attribute, all_params[key]) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The change in Suggested FixThe logic should be updated to selectively apply Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
|
|
||
| _set_tools_on_span(span, all_params.get("tools")) | ||
|
|
||
|
|
||
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.
Unnormalized tool call data on spans
Medium Severity
Replacing
set_data_normalizedwithspan.set_datafor allDATA_FIELDScan store non-primitive values (notablyfunction_call/tool_calls) without JSON normalization. This can yield inconsistent encoding versus other paths that still useset_data_normalized, and may break span serialization or downstream consumers expecting a JSON string forSPANDATA.GEN_AI_RESPONSE_TOOL_CALLS.