Customize deserialization to re-create the client objects. This method is called by pickle when loading the object's state.
(self, state)
| 101 | return state |
| 102 | |
| 103 | def __setstate__(self, state): |
| 104 | """ |
| 105 | Customize deserialization to re-create the client objects. |
| 106 | This method is called by pickle when loading the object's state. |
| 107 | """ |
| 108 | self.__dict__.update(state) |
| 109 | # Re-initialize the clients after unpickling |
| 110 | self.sync_client = self.init_sync_client() |
| 111 | self.async_client = None # It will be lazily initialized when acall is used |
| 112 | |
| 113 | def init_sync_client(self): |
| 114 | """Initialize the synchronous AWS Bedrock client.""" |
nothing calls this directly
no test coverage detected