Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion langfuse/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def default(self, obj: Any):
return f"{type(obj).__name__}: {str(obj)}"

# LlamaIndex StreamingAgentChatResponse and StreamingResponse is not serializable by default as it is a generator
# LlamaIndex CompletionResponse is also not serializable by default
# Attention: These LlamaIndex objects are a also a dataclasses, so check for it first
if "Streaming" in type(obj).__name__:
if "Streaming" in type(obj).__name__ or "CompletionResponse" == type(obj).__name__:
return str(obj)

if isinstance(obj, enum.Enum):
Expand Down