Skip to content

Commit

Permalink
Fix endpointing attribute in LiveOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dvonthenen committed Jul 9, 2024
1 parent 02f6705 commit caf02db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deepgram/clients/listen/v1/websocket/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ class LiveOptions(DataClassJsonMixin): # pylint: disable=too-many-instance-attr
encoding: Optional[str] = field(
default=None, metadata=dataclass_config(exclude=lambda f: f is None)
)
endpointing: Optional[str] = field(
# pylint: disable=W0511
# TODO: endpointing's current type previous was `Optional[str]` which is incorrect
# for backward compatibility we are keeping it as `Optional[Union[str, bool, int]]`
# since it gets translated to a string to be placed as a query parameter, will keep `str` for now
# but will change this to `Optional[Union[bool, int]]` in a future release
endpointing: Optional[Union[str, bool, int]] = field(
default=None, metadata=dataclass_config(exclude=lambda f: f is None)
)
# pylint: enable=W0511
extra: Optional[Union[List[str], str]] = field(
default=None, metadata=dataclass_config(exclude=lambda f: f is None)
)
Expand Down

0 comments on commit caf02db

Please sign in to comment.