[GH-ISSUE #7492] langchain-python-rag-document not working #4766

Open
opened 2026-04-12 15:42:28 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @gsportelli on GitHub (Nov 4, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7492

What is the issue?

I downloaded the example langchain-python-rag-document and tried to execute it using a fresh virtual environment and installing requirements.txt.

No matter the Python version I used (3.9, 3.10, 3.11 and 3.12), the installation with pip always produces the following error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
chromadb 0.4.5 requires pydantic<2.0,>=1.9, but you have pydantic 2.9.2 which is incompatible.
fastapi 0.99.1 requires pydantic!=1.8,!=1.8.1,<2.0.0,>=1.7.4, but you have pydantic 2.9.2 which is incompatible.
tensorflow-macos 2.13.0 requires typing-extensions<4.6.0,>=3.6.6, but you have typing-extensions 4.12.2 which is incompatible.

And if I try to execute the example, I get this error:

Traceback (most recent call last):
  File ".../main.py", line 33, in <module>
    vectorstore = Chroma.from_documents(documents=all_splits, embedding=GPT4AllEmbeddings())
  File ".../venv/lib/python3.9/site-packages/pydantic/main.py", line 212, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
  File ".../venv/lib/python3.9/site-packages/langchain_community/embeddings/gpt4all.py", line 40, in validate_environment
    values["client"] = Embed4All(
TypeError: __init__() got an unexpected keyword argument 'model_name'

Additionally, I get some warnings at execution time (before it raises the TypeError) saying that I should import from langchain_community instead of langchain.

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.3.14

Originally created by @gsportelli on GitHub (Nov 4, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7492 ### What is the issue? I downloaded the example [langchain-python-rag-document](https://github.com/ollama/ollama/tree/main/examples/langchain-python-rag-document) and tried to execute it using a fresh virtual environment and installing requirements.txt. No matter the Python version I used (3.9, 3.10, 3.11 and 3.12), the installation with pip always produces the following error: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. chromadb 0.4.5 requires pydantic<2.0,>=1.9, but you have pydantic 2.9.2 which is incompatible. fastapi 0.99.1 requires pydantic!=1.8,!=1.8.1,<2.0.0,>=1.7.4, but you have pydantic 2.9.2 which is incompatible. tensorflow-macos 2.13.0 requires typing-extensions<4.6.0,>=3.6.6, but you have typing-extensions 4.12.2 which is incompatible. ``` And if I try to execute the example, I get this error: ``` Traceback (most recent call last): File ".../main.py", line 33, in <module> vectorstore = Chroma.from_documents(documents=all_splits, embedding=GPT4AllEmbeddings()) File ".../venv/lib/python3.9/site-packages/pydantic/main.py", line 212, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File ".../venv/lib/python3.9/site-packages/langchain_community/embeddings/gpt4all.py", line 40, in validate_environment values["client"] = Embed4All( TypeError: __init__() got an unexpected keyword argument 'model_name' ``` Additionally, I get some warnings at execution time (before it raises the TypeError) saying that I should import from `langchain_community` instead of `langchain`. ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.3.14
GiteaMirror added the bug label 2026-04-12 15:42:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4766