Skip to content

Commit

Permalink
remove unneeded default
Browse files Browse the repository at this point in the history
  • Loading branch information
lievan committed Jan 24, 2025
1 parent 713f2e7 commit 3e6a796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ddtrace/contrib/internal/openai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _extract_token_chunk(self, chunk):
"""Attempt to extract the token chunk (last chunk in the stream) from the streamed response."""
if not self._dd_span._get_ctx_item("_dd.auto_extract_token_chunk"):
return
choices = getattr(chunk, "choices", None)
choices = getattr(chunk, "choices")
if not choices:
return
choice = choices[0]
Expand Down Expand Up @@ -155,7 +155,7 @@ async def _extract_token_chunk(self, chunk):
"""Attempt to extract the token chunk (last chunk in the stream) from the streamed response."""
if not self._dd_span._get_ctx_item("_dd.auto_extract_token_chunk"):
return
choices = getattr(chunk, "choices", None)
choices = getattr(chunk, "choices")
if not choices:
return
choice = choices[0]
Expand Down

0 comments on commit 3e6a796

Please sign in to comment.