Langchain-Chatchat
Langchain-Chatchat copied to clipboard
model_kwargs extra fields not permitted (type=value_error.extra)
大家好,请问这个有遇到的么,?
ERROR 2023-05-17 03:31:15,122-1d: 1 validation error for HuggingFaceEmbeddings model_kwargs extra fields not permitted (type=value_error.extra) INFO 2023-05-17 03:31:15,123-1d: 模型未成功加载,请到页面左上角"模型配置"选项卡中重新选择后点击"加载模型"按钮 Running on local URL: http://0.0.0.0:7860
操作系统:
镜像: PyTorch 2.0.0 Python 3.8(ubuntu20.04) Cuda 11.8 GPU:RTX 3090(24GB) * 1 CPU:14 vCPU Intel(R) Xeon(R) Gold 6330 CPU @ 2.00GHz 内存:80GB
操作步骤如下:
1、requirements.txt中langchain==0.0.146、 gradio==3.28.3安装失败,去掉了版本号进行安装
2、从https://huggingface.co/THUDM/chatglm-6b/tree/main下载的全量包
3、/root/langchain-ChatGLM/configs/model_config.py 路径已修改
embedding_model_dict = { "ernie-tiny": "nghuyong/ernie-3.0-nano-zh", "ernie-base": "nghuyong/ernie-3.0-base-zh", "text2vec-base": "shibing624/text2vec-base-chinese", "text2vec": "/root/langchain-ChatGLM/text2vec", }
llm_model_dict = { "chatyuan": "ClueAI/ChatYuan-large-v2", "chatglm-6b-int4-qe": "THUDM/chatglm-6b-int4-qe", "chatglm-6b-int4": "THUDM/chatglm-6b-int4", "chatglm-6b-int8": "THUDM/chatglm-6b-int8", "chatglm-6b": "/root/langchain-ChatGLM/model/chatglm-6b", "moss": "fnlp/moss-moon-003-sft", }
embeddings = HuggingFaceEmbeddings( model_name="GanymedeNil/text2vec-large-chinese", # model_kwargs={'device': 'cuda'} )
刚遇到,按照报错提示理解,就是指定了多余的参数,注释掉这个参数就行了!也不知道是不是因为版本的问题,没有深究!
请问出现这个问题的langchain版本是?
langchain 0.0.142
我的是这个
这个参数是在0.0.146版本后引入的,所以才会在requirements中提出版本要求
试了一下确实是!感谢大佬指点
model_name让我写成了mode_name 被自己蠢死。。