From 818475e66809799460b2c7ba75ca4818ccab24ca Mon Sep 17 00:00:00 2001 From: Willy Douhard Date: Wed, 13 Nov 2024 13:57:19 +0100 Subject: [PATCH] fix: correctly process lists --- literalai/callback/langchain_callback.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/literalai/callback/langchain_callback.py b/literalai/callback/langchain_callback.py index 1c31f92..5589759 100644 --- a/literalai/callback/langchain_callback.py +++ b/literalai/callback/langchain_callback.py @@ -154,6 +154,8 @@ def process_content(self, content: Any, root=True): processed_value = self.process_content(value, root=False) processed_dict[key] = processed_value return processed_dict + elif isinstance(content, list): + return [self.process_content(item, root=False) for item in content] elif isinstance(content, str): if root: return {"content": content}