admin 管理员组

文章数量: 1184232

 langchain下用FAISS时报错,如下

ValueError: Encountered text corresponding to disallowed special token '<|endoftext|>'.
If you want this text to be encoded as a special token, pass it to `allowed_special`, e.g. `allowed_

If you want this text to be encoded as normal text, disable the check for this token by passing `dis

To disable this check for all special tokens, pass `disallowed_special=()`.

解决方法

把 embeddings = OpenAIEmbeddings() 

修改为 embeddings = OpenAIEmbeddings(disallowed_special=())

本文标签: text encountered ValueError disallowed endoftext