fix(utils.py): set text if empty string

This commit is contained in:
Krrish Dholakia 2023-12-05 12:26:10 -08:00
parent 7ba22141ed
commit 733b1d87a7

View file

@ -414,7 +414,7 @@ class TextChoices(OpenAIObject):
else: else:
self.finish_reason = "stop" self.finish_reason = "stop"
self.index = index self.index = index
if text: if text is not None:
self.text = text self.text = text
else: else:
self.text = None self.text = None