aurelio-labs/semantic-router

Dependency conflict with langchain-mistralai

Closed this issue · 3 comments

Getting a dependency conflict when trying to include langchain-mistralai:

poetry add langchain-mistralai                                                                                                                                                                            
Using version ^0.0.5 for langchain-mistralai

Updating dependencies
Resolving dependencies... (0.3s)

Because no versions of langchain-mistralai match >0.0.5,<0.0.6
 and langchain-mistralai (0.0.5) depends on mistralai (>=0.1,<0.2), langchain-mistralai (>=0.0.5,<0.0.6) requires mistralai (>=0.1,<0.2).
And because semantic-router (0.0.27) depends on mistralai (>=0.0.12,<0.0.13)
 and no versions of semantic-router match >0.0.27,<0.0.28, langchain-mistralai (>=0.0.5,<0.0.6) is incompatible with semantic-router (>=0.0.27,<0.0.28).
So, because vortex-python depends on both semantic-router (^0.0.27) and langchain-mistralai (^0.0.5), version solving failed.

I wonder if you can update the dependencies definition for mistralai.

This is my current setup for poetry:

python = ">=3.9,<3.13"
mlflow = "^2.10.2"
pydantic = ">=2.5.3,<3.0.0"
python-dotenv = "^1.0.1"
typing-extensions = "^4.9.0"
urllib3 = "^1.26.16"
dagster = "^1.6.6"
pandas = "^2.2.1"
langchain = "^0.1.9"
langchain-openai = "^0.0.8"
openai = "^1.12.0"
sqlalchemy = "^2.0.27"
psycopg2-binary = "^2.9.9"
bs4 = "^0.0.2"
dagster-webserver = "^1.6.6"
langchainhub = "^0.1.14"
selenium = "^4.18.1"
html2text = "^2024.2.26"
chromadb = "^0.4.24"
pymupdf = "^1.23.25"
wikipedia = "^1.4.0"
sendgrid = "^6.11.0"
fastapi = "^0.110.0"
uvicorn = "^0.27.1"
twilio = "^9.0.0"
python-decouple = "^3.8"
python-multipart = "^0.0.9"
pyngrok = "^7.1.3"
langchain-experimental = "^0.0.52"
langchain-community = "^0.0.24"
langchain-together = "^0.0.2.post1"
numexpr = "^2.9.0"
langchain-fireworks = "^0.1.1"
semantic-router = "^0.0.27"

@zahid-syed maybe something simple like more flexible versions (ie mistralai = "^0.0.2") — would should try to accomadate for #179 too

Well, it's not making the cut. I believe it's due to the difference in version ranges that semantic-router vs langchain-mistralai have for mistralai. I was able to install mistral using mistralai = "^0.0.12", since no version 0.0.2 even exists on pipy and the minimum requirement by semantic-router is such version, however, the installation of langchain is still unsuccessful. Notice this would happen the other way around (having installed langchain-mistralai + mistralai, and attempting to install semantic-router)

Having semantic-router installed and attempting to install langchain-mistralai
image

Having langchain-mistralai installed and attempting to install semantic-router
image

@broomva I believe this has been resolved (testing from 0.0.31):
image