crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[FEATURE] upgrade to langchain v0.3.1

Open Seven2Nine opened this issue 1 year ago • 5 comments

Feature Area

Other (please specify in additional context)

Is your feature request related to a an existing bug? Please link it here.

NA

Describe the solution you'd like

upgrade to langchain v0.3.1

Describe alternatives you've considered

No response

Additional context

Description Are there any plans to upgrade to langchain v0.3? Otherwise any tips on how to solve dependency conflicts as crewai required langchain<0.3?

issue langchain-community 0.3.1 depends on langchain<0.4.0 and >=0.3.1 crewai 0.63.6 depends on langchain<0.3.0 and >=0.2.16

Willingness to Contribute

No, I'm just suggesting the idea

Seven2Nine avatar Sep 26 '24 02:09 Seven2Nine

I think we should be able to upgrade pretty easily now, will give it a try

joaomdmoura avatar Sep 26 '24 02:09 joaomdmoura

@joaomdmoura Did you get a chance to release an update on the langchain v0.3.1?

llFireHawkll avatar Sep 27 '24 07:09 llFireHawkll

after v0.60 bump and #1333 and overall migration to LiteLLM it would be nice to remove langchain constraint at
https://github.com/crewAIInc/crewAI/blob/main/pyproject.toml#L17

feels this is in the way:

Because embedchain (0.1.122) depends on langchain (>0.2,<=0.3) and no versions of embedchain match >0.1.122,<0.2.0, embedchain (>=0.1.122,<0.2.0) requires langchain (>0.2,<=0.3). So, because crewai depends on both langchain (^0.3.1) and embedchain (^0.1.122), version solving failed.

cause of this https://github.com/mem0ai/mem0/blob/main/embedchain/pyproject.toml#L96

motobob avatar Oct 01 '24 09:10 motobob

embedchain was updated.

so the follwojng for both crewAi and CrewAI-tools would close the issue and add sanity to deps.

langchain = "^0.3.1"
embedchain = "^0.1.123"

motobob avatar Oct 04 '24 09:10 motobob

sending here a PR here with poetry.toml

langchain = "^0.3.1" 
crewai-tools = { version = "^0.12.2", optional = true }
embedchain = "^0.1.123"

should close the issue and bring sanity to deps.

@joaomdmoura would appreciate some assistance with finishing this one up. Thank you

motobob avatar Oct 04 '24 10:10 motobob

Hi all - we're interested in this as well so we can pull in CrewAI as we update our langchain dependency. Are there any blockers that would delay this getting in for some time?

jordanrfrazier avatar Oct 07 '24 18:10 jordanrfrazier

Just bumping this to check if there's any further assistance needed to finish this up, happy to help if so. Thanks all!

erichare avatar Oct 16 '24 21:10 erichare

~~Not sure if this is exactly the right path forward, but bumping these deps as you described @motobob. Maybe this will get traction. https://github.com/crewAIInc/crewAI/pull/1459~~

dbubel avatar Oct 17 '24 02:10 dbubel

suggest closing this as 0.74.2 of crewAI and 0.13.2 of crewAI-tools now allow coexistence with langchain 0.3.4. validated in my project.

tnx @erichare @joaomdmoura

motobob avatar Oct 21 '24 14:10 motobob