Skip to content

Commit f8b98c9

Browse files
committed
fix failing test
1 parent 05bbf8c commit f8b98c9

File tree

1 file changed

+3
-2
lines changed
  • src/langtrace_python_sdk/instrumentation/langchain_core

1 file changed

+3
-2
lines changed

src/langtrace_python_sdk/instrumentation/langchain_core/patch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@ def clean_empty(d):
248248
elif isinstance(val, object):
249249
# some langchain objects have a text attribute
250250
val = getattr(val, "text", None)
251-
if val is not None and val.strip() != "":
252-
result[k] = val.strip()
251+
if val is not None and isinstance(val, str):
252+
if val.strip() != "":
253+
result[k] = val.strip()
253254
return result
254255

255256

0 commit comments

Comments
 (0)