Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit da2cb6c

Browse files
authored
Merge pull request #146 from Chainlit/willy/eng-2113-support-pydantic
fix: correctly process lists
2 parents 4e67ed2 + 818475e commit da2cb6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

literalai/callback/langchain_callback.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ def process_content(self, content: Any, root=True):
154154
processed_value = self.process_content(value, root=False)
155155
processed_dict[key] = processed_value
156156
return processed_dict
157+
elif isinstance(content, list):
158+
return [self.process_content(item, root=False) for item in content]
157159
elif isinstance(content, str):
158160
if root:
159161
return {"content": content}

0 commit comments

Comments
 (0)