Resolve super class invokation error. (#5337)

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-02-25 17:42:29 +08:00 committed by GitHub
parent 93b2e80eb8
commit 955801db2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -265,7 +265,7 @@ class QWenChat(Base):
def chat(self, system, history, gen_conf): def chat(self, system, history, gen_conf):
if self.model_name.lower().find("deepseek") >= 0: if self.model_name.lower().find("deepseek") >= 0:
return super.chat(system, history, gen_conf) return super().chat(system, history, gen_conf)
stream_flag = str(os.environ.get('QWEN_CHAT_BY_STREAM', 'true')).lower() == 'true' stream_flag = str(os.environ.get('QWEN_CHAT_BY_STREAM', 'true')).lower() == 'true'
if not stream_flag: if not stream_flag:
@ -335,7 +335,7 @@ class QWenChat(Base):
def chat_streamly(self, system, history, gen_conf): def chat_streamly(self, system, history, gen_conf):
if self.model_name.lower().find("deepseek") >= 0: if self.model_name.lower().find("deepseek") >= 0:
return super.chat_streamly(system, history, gen_conf) return super().chat_streamly(system, history, gen_conf)
return self._chat_streamly(system, history, gen_conf) return self._chat_streamly(system, history, gen_conf)