输入的是你好,私聊和群聊都试过了,但是只有私聊会报错,群聊只会显示接收到消息,但是glm的窗口没反应
这是私聊时,glm的报错:
query: 你好
Exception on /msg [POST]
Traceback (most recent call last):
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\flask\app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "G:\ChatGLM\Ice-chan-main\web_chatglm.py", line 129, in msg
response = bot.chat(query)
File "G:\ChatGLM\Ice-chan-main\web_chatglm.py", line 78, in chat
response, _ = self._model.chat(self._tokenizer, query, history=self._history)
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\asus/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 1253, in chat
outputs = self.generate(**inputs, **gen_kwargs)
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\transformers\generation\utils.py", line 1437, in generate
return self.sample(
File "G:\anaconda3\envs\ChatGLM\lib\site-packages\transformers\generation\utils.py", line 2440, in sample
model_inputs = self.prepare_inputs_for_generation(input_ids, **model_kwargs)
File "C:\Users\asus/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 1120, in prepare_inputs_for_generation
logger.warning_once(f"The dtype of attention mask ({attention_mask.dtype}) is not bool")
AttributeError: 'Logger' object has no attribute 'warning_once'
127.0.0.1 - - [16/Apr/2023 17:28:57] "POST /msg HTTP/1.1" 500 -
私聊时icqq的报错(但是为什么这一段是html啊):
<!doctype html>
<title>500 Internal Server Error</title>
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.