diff --git a/langfuse/openai.py b/langfuse/openai.py index 59e7e6c2a..c3cfe707a 100644 --- a/langfuse/openai.py +++ b/langfuse/openai.py @@ -558,7 +558,7 @@ def _extract_streamed_openai_response(resource, chunks): ) if resource.type == "completion": - completion += choice.get("text", None) + completion += choice.get("text", "") def get_response_for_chat(): return (