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

This commit is contained in:
Krrish Dholakia 2023-12-05 12:26:10 -08:00
parent d5f67a0a25
commit ef7795add6

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