X-D-Lab / LangChain-ChatGLM-Webui

基于LangChain和ChatGLM-6B等系列LLM的针对本地知识库的自动问答
Apache License 2.0
3.14k stars 474 forks source link

本地embedding模型一直No sentence-transformers model found #106

Closed pihang closed 1 year ago

pihang commented 1 year ago

self.embeddings = HuggingFaceEmbeddings( model_name=embedding_model_dict[embedding_model], )这里本地绝对路径和相对路径试了都不行(chatglm模型是没问题加载) 往里走sentence_transformers.SentenceTransformer->

  if os.path.exists(os.path.join(model_path, 'modules.json')):    #Load as SentenceTransformer model
      modules = self._load_sbert_model(model_path)
  else:   #Load with AutoModel
      modules = self._load_auto_model(model_path)

这里就走到else里面报错: image