mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-19 08:26:51 +00:00
feat: Check serialization for AWEL operator function
This commit is contained in:
@@ -94,6 +94,17 @@ class ProxyLLMClient(LLMClient):
|
||||
self.executor = executor or ThreadPoolExecutor()
|
||||
self.proxy_tokenizer = proxy_tokenizer or TiktokenProxyTokenizer()
|
||||
|
||||
def __getstate__(self):
|
||||
"""Customize the serialization of the object"""
|
||||
state = self.__dict__.copy()
|
||||
state.pop("executor")
|
||||
return state
|
||||
|
||||
def __setstate__(self, state):
|
||||
"""Customize the deserialization of the object"""
|
||||
self.__dict__.update(state)
|
||||
self.executor = ThreadPoolExecutor()
|
||||
|
||||
@classmethod
|
||||
@abstractmethod
|
||||
def new_client(
|
||||
|
Reference in New Issue
Block a user