Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionRefusedError When try to do embedding in RAG #8

Open
mengyulu0521 opened this issue Jul 10, 2024 · 0 comments
Open

ConnectionRefusedError When try to do embedding in RAG #8

mengyulu0521 opened this issue Jul 10, 2024 · 0 comments

Comments

@mengyulu0521
Copy link

mengyulu0521 commented Jul 10, 2024

2024/gemma2_local_rag/indexer.py
when it comes to Chroma.from_documents, I get the following error:

File "/rag/indexer.py", line 47, in
vectorstore = Chroma.from_documents(
File "/opt/conda/lib/python3.10/site-packages/langchain_community/vectorstores/chroma.py", line 790, in from_documents
return cls.from_texts(
File "/opt/conda/lib/python3.10/site-packages/langchain_community/vectorstores/chroma.py", line 754, in from_texts
chroma_collection.add_texts(texts=texts, metadatas=metadatas, ids=ids)
File "/opt/conda/lib/python3.10/site-packages/langchain_community/vectorstores/chroma.py", line 276, in add_texts
embeddings = self._embedding_function.embed_documents(texts)
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 211, in embed_documents
embeddings = self._embed(instruction_pairs)
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 199, in _embed
return [self.process_emb_response(prompt) for prompt in iter]
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 199, in
return [self.process_emb_response(prompt) for prompt in iter]
File "/opt/conda/lib/python3.10/site-packages/langchain_community/embeddings/ollama.py", line 170, in _process_emb_response
raise ValueError(f"Error raised by inference endpoint: {e}")
ValueError: Error raised by inference endpoint: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/embeddings (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f97338b0d30>: Failed to establish a new connection: [Errno 111] Connection refused'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant