Skip to content

Commit

Permalink
fix(openai): revert default stream option setting (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
hassiebp authored Nov 5, 2024
1 parent 0a82e20 commit 708be97
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions langfuse/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,6 @@ def get_langfuse_args(self):
return {**self.args, **self.kwargs}

def get_openai_args(self):
# OpenAI returns streaming usage not by default but only if stream_options has include_usage set
if self.kwargs.get("stream") and "stream_options" not in self.kwargs:
self.kwargs["stream_options"] = {"include_usage": True}

if (
self.kwargs.get("stream")
and "stream_options" in self.kwargs
and "include_usage" not in self.kwargs["stream_options"]
):
self.kwargs["stream_options"]["include_usage"] = True

return self.kwargs


Expand Down

0 comments on commit 708be97

Please sign in to comment.