Skip to content

Commit

Permalink
Merge pull request #429 from dvonthenen/fix-endpointing-type
Browse files Browse the repository at this point in the history
Fix endpointing type
  • Loading branch information
davidvonthenen authored Jul 9, 2024
2 parents 86f3c49 + caf02db commit f294397
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 f294397

Please sign in to comment.