Skip to content

Commit 78abcd1

Browse files
Merge pull request #320 from dvonthenen/missing-extra-param
Add Missing Extra Param in Live Metadata Class
2 parents abf22e0 + 57e0d8f commit 78abcd1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

deepgram/clients/live/v1/response.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,18 @@ class Metadata:
104104
default=None, metadata=config(exclude=lambda f: f is None)
105105
)
106106
model_uuid: Optional[str] = ""
107+
extra: Optional[Dict[str, str]] = field(
108+
default=None, metadata=config(exclude=lambda f: f is None)
109+
)
107110

108111
def __getitem__(self, key):
109112
_dict = self.to_dict()
110113
if "model_info" in _dict:
111114
_dict["model_info"] = [
112115
ModelInfo.from_dict(model_info) for model_info in _dict["model_info"]
113116
]
117+
if "extra" in _dict:
118+
_dict["extra"] = [str(extra) for _, extra in _dict["extra"].items()]
114119
return _dict[key]
115120

116121
def __setitem__(self, key, val):

0 commit comments

Comments
 (0)