We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05bbf8c commit f8b98c9Copy full SHA for f8b98c9
src/langtrace_python_sdk/instrumentation/langchain_core/patch.py
@@ -248,8 +248,9 @@ def clean_empty(d):
248
elif isinstance(val, object):
249
# some langchain objects have a text attribute
250
val = getattr(val, "text", None)
251
- if val is not None and val.strip() != "":
252
- result[k] = val.strip()
+ if val is not None and isinstance(val, str):
+ if val.strip() != "":
253
+ result[k] = val.strip()
254
return result
255
256
0 commit comments