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

Missing Dependency langchain_ollama in rag-api-dev-lite #84

Open
sreevatsank1999 opened this issue Oct 4, 2024 · 2 comments · May be fixed by #85
Open

Missing Dependency langchain_ollama in rag-api-dev-lite #84

sreevatsank1999 opened this issue Oct 4, 2024 · 2 comments · May be fixed by #85
Assignees

Comments

@sreevatsank1999
Copy link

Running latest rag_api docker

FROM ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest

With the following .env file

#==================================================#
#                        RAG                       #
#==================================================#
# More info: https://www.librechat.ai/docs/configuration/rag_api

RAG_API_URL=http://127.0.0.1:8000
RAG_PORT=8000 
EMBEDDINGS_PROVIDER=ollama
OLLAMA_BASE_URL=http://xyz:11434
EMBEDDINGS_MODEL=nomic-embed-text

I get the following error:

Traceback (most recent call last):
  File "/app/main.py", line 46, in <module>
    from psql import PSQLDatabase, ensure_custom_id_index_on_embedding, pg_health_check
  File "/app/psql.py", line 3, in <module>
    from config import DSN, logger
  File "/app/config.py", line 252, in <module>
    embeddings = init_embeddings(EMBEDDINGS_PROVIDER, EMBEDDINGS_MODEL)
  File "/app/config.py", line 206, in init_embeddings
    from langchain_ollama import OllamaEmbeddings
ModuleNotFoundError: No module named 'langchain_ollama'

Possibly because of a missing dependency

langchain-ollama=0.2.0 in

langchain==0.3
langchain_community==0.3
langchain_openai==0.2.0
langchain_core==0.3.5
sqlalchemy==2.0.28
python-dotenv==1.0.1
fastapi==0.110.0
psycopg2-binary==2.9.9
pgvector==0.2.5
uvicorn==0.28.0
pypdf==4.1.0
unstructured==0.15.13
markdown==3.6
networkx==3.2.1
pandas==2.2.1
openpyxl==3.1.2
docx2txt==0.8
pypandoc==1.13
PyJWT==2.8.0
asyncpg==0.29.0
python-multipart==0.0.9
aiofiles==23.2.1
rapidocr-onnxruntime==1.3.24
opencv-python-headless==4.9.0.80
pymongo==4.6.3
langchain-mongodb==0.2.0
cryptography==42.0.7
python-magic==0.4.27
python-pptx==0.6.23
xlrd==2.0.1
langchain-aws==0.2.1
boto3==1.34.144

@danny-avila
Copy link
Owner

@ScarFX

@ScarFX ScarFX self-assigned this Oct 4, 2024
@ScarFX
Copy link
Collaborator

ScarFX commented Oct 4, 2024

Missing dependency of langchain-ollama=0.2.0 seems to be the reason. Thanks @sreevatsank1999 for pointing this out.

I added it to requirements.lite.txt #85

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

Successfully merging a pull request may close this issue.

3 participants