JohnSmith9982 commited on
Commit
ba12340
1 Parent(s): c6333ba

修复粘贴APIKey Error的问题

Browse files
Files changed (1) hide show
  1. modules/models.py +0 -7
modules/models.py CHANGED
@@ -102,13 +102,6 @@ class OpenAIClient(BaseLLMModel):
102
  def set_token_upper_limit(self, new_upper_limit):
103
  pass
104
 
105
- def set_key(self, new_access_key):
106
- self.api_key = new_access_key.strip()
107
- self._refresh_header()
108
- msg = i18n("API密钥更改为了") + f"{hide_middle_chars(self.api_key)}"
109
- logging.info(msg)
110
- return msg
111
-
112
  @shared.state.switching_api_key # 在不开启多账号模式的时候,这个装饰器不会起作用
113
  def _get_response(self, stream=False):
114
  openai_api_key = self.api_key
 
102
  def set_token_upper_limit(self, new_upper_limit):
103
  pass
104
 
 
 
 
 
 
 
 
105
  @shared.state.switching_api_key # 在不开启多账号模式的时候,这个装饰器不会起作用
106
  def _get_response(self, stream=False):
107
  openai_api_key = self.api_key