Skip to content

AttributeError: 'SentenceTransformer' object has no attribute 'embed_documents' #338

Answered by ritish20
ritish20 asked this question in Q&A
Discussion options

You must be logged in to vote

fixed it by give the offline model path directly in

loading offline instruction model-
change below code in Lib\site-packages\langchain\embeddings\huggingface.py file

        self.client = INSTRUCTOR(
            'self.model_name, cache_folder=self.cache_folder', **self.model_kwargs
        )
		
to 
            self.client = INSTRUCTOR(
            'C:/Users/pradrit/OneDrive - Deutsche Bank AG/Ritish/DataScience Project Folder/chatbot/llama_chatbot/bloke/localGPT/hkunlp/', **self.model_kwargs
        )

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ritish20
Comment options

You must be logged in to vote
3 replies
@Albert337
Comment options

@NowhereDuk
Comment options

@eternal-bug
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants