@@ -18,18 +18,22 @@ class PeerOptionsVapi:
1818 Attributes:
1919 api_key (str): VAPI API key
2020 call_id (str): VAPI call ID
21+ auto_close (bool | Unset): Ends the VAPI call when the last participant leaves the room Default: False.
2122 subscribe_mode (SubscribeMode | Unset): Configuration of peer's subscribing policy
2223 """
2324
2425 api_key : str
2526 call_id : str
27+ auto_close : bool | Unset = False
2628 subscribe_mode : SubscribeMode | Unset = UNSET
2729
2830 def to_dict (self ) -> dict [str , Any ]:
2931 api_key = self .api_key
3032
3133 call_id = self .call_id
3234
35+ auto_close = self .auto_close
36+
3337 subscribe_mode : str | Unset = UNSET
3438 if not isinstance (self .subscribe_mode , Unset ):
3539 subscribe_mode = self .subscribe_mode .value
@@ -40,6 +44,8 @@ def to_dict(self) -> dict[str, Any]:
4044 "apiKey" : api_key ,
4145 "callId" : call_id ,
4246 })
47+ if auto_close is not UNSET :
48+ field_dict ["autoClose" ] = auto_close
4349 if subscribe_mode is not UNSET :
4450 field_dict ["subscribeMode" ] = subscribe_mode
4551
@@ -52,6 +58,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
5258
5359 call_id = d .pop ("callId" )
5460
61+ auto_close = d .pop ("autoClose" , UNSET )
62+
5563 _subscribe_mode = d .pop ("subscribeMode" , UNSET )
5664 subscribe_mode : SubscribeMode | Unset
5765 if isinstance (_subscribe_mode , Unset ):
@@ -62,6 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
6270 peer_options_vapi = cls (
6371 api_key = api_key ,
6472 call_id = call_id ,
73+ auto_close = auto_close ,
6574 subscribe_mode = subscribe_mode ,
6675 )
6776
0 commit comments