@@ -5276,7 +5276,11 @@ async def __aexit__(
52765276 self , exc_type : type [BaseException ] | None , exc : BaseException | None , exc_tb : TracebackType | None
52775277 ) -> None :
52785278 if self .__connection is not None :
5279- await self .__connection .close ()
5279+ try :
5280+ await self .__connection .close ()
5281+ except BaseException :
5282+ if exc is None :
5283+ raise
52805284
52815285
52825286class ResponsesConnection (WebSocketConnectionBase ):
@@ -5690,7 +5694,11 @@ def __exit__(
56905694 self , exc_type : type [BaseException ] | None , exc : BaseException | None , exc_tb : TracebackType | None
56915695 ) -> None :
56925696 if self .__connection is not None :
5693- self .__connection .close ()
5697+ try :
5698+ self .__connection .close ()
5699+ except BaseException :
5700+ if exc is None :
5701+ raise
56945702
56955703
56965704class BaseResponsesConnectionResource :
@@ -5707,6 +5715,7 @@ def create(
57075715 context_management : Optional [Iterable [beta_responses_client_event_param .ResponseCreateContextManagement ]]
57085716 | Omit = omit ,
57095717 conversation : Optional [beta_responses_client_event_param .ResponseCreateConversation ] | Omit = omit ,
5718+ generate : bool | Omit = omit ,
57105719 include : Optional [List [BetaResponseIncludable ]] | Omit = omit ,
57115720 input : Union [str , BetaResponseInputParam ] | Omit = omit ,
57125721 instructions : Optional [str ] | Omit = omit ,
@@ -5873,6 +5882,7 @@ def create(
58735882 "background" : background ,
58745883 "context_management" : context_management ,
58755884 "conversation" : conversation ,
5885+ "generate" : generate ,
58765886 "include" : include ,
58775887 "input" : input ,
58785888 "instructions" : instructions ,
@@ -5965,6 +5975,7 @@ async def create(
59655975 context_management : Optional [Iterable [beta_responses_client_event_param .ResponseCreateContextManagement ]]
59665976 | Omit = omit ,
59675977 conversation : Optional [beta_responses_client_event_param .ResponseCreateConversation ] | Omit = omit ,
5978+ generate : bool | Omit = omit ,
59685979 include : Optional [List [BetaResponseIncludable ]] | Omit = omit ,
59695980 input : Union [str , BetaResponseInputParam ] | Omit = omit ,
59705981 instructions : Optional [str ] | Omit = omit ,
@@ -6131,6 +6142,7 @@ async def create(
61316142 "background" : background ,
61326143 "context_management" : context_management ,
61336144 "conversation" : conversation ,
6145+ "generate" : generate ,
61346146 "include" : include ,
61356147 "input" : input ,
61366148 "instructions" : instructions ,
0 commit comments