diff --git a/docs/GithubAction+ChatGLM+Moss b/docs/GithubAction+ChatGLM+Moss index 85888e2..ece19d6 100644 --- a/docs/GithubAction+ChatGLM+Moss +++ b/docs/GithubAction+ChatGLM+Moss @@ -3,7 +3,7 @@ FROM nvidia/cuda:11.3.1-runtime-ubuntu20.04 ARG useProxyNetwork='' RUN apt-get update -RUN apt-get install -y curl proxychains curl +RUN apt-get install -y curl proxychains curl gcc RUN apt-get install -y git python python3 python-dev python3-dev --fix-missing @@ -21,12 +21,7 @@ RUN python3 -m pip install -r request_llm/requirements_moss.txt RUN python3 -m pip install -r request_llm/requirements_chatglm.txt RUN python3 -m pip install -r request_llm/requirements_newbing.txt -# # 预热CHATGLM参数(非必要 可选步骤) -# RUN echo ' \n\ -# from transformers import AutoModel, AutoTokenizer \n\ -# chatglm_tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True) \n\ -# chatglm_model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).float() ' >> warm_up_chatglm.py -# RUN python3 -u warm_up_chatglm.py + # 预热Tiktoken模块 RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' diff --git a/request_llm/bridge_chatglm.py b/request_llm/bridge_chatglm.py index 3300286..100783d 100644 --- a/request_llm/bridge_chatglm.py +++ b/request_llm/bridge_chatglm.py @@ -68,7 +68,8 @@ class GetGLMHandle(Process): # command = self.child.recv() # if command == '[Terminate]': break except: - self.child.send('[Local Message] Call ChatGLM fail.') + from toolbox import trimmed_format_exc + self.child.send('[Local Message] Call ChatGLM fail.' + '\n```\n' + trimmed_format_exc() + '\n```\n') # 请求处理结束,开始下一个循环 self.child.send('[Finish]')