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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move lanchain skills to langchain handler. #8711

Merged
merged 8 commits into from
Feb 2, 2024
Merged

Conversation

hamishfagg
Copy link
Contributor

Description

This fixes an issue that has caused our base docker image to grow from ~500MB to 3GB.
A dependency. of the langchain skills was added that eventually requires torch. The goal is for our base image to not require torch and be a lot smaller as a result.

This PR moves the skills code into the langchain handler, which can then not be installed by default. The langchain handler is the only handler that uses this code at present.

Type of change

(Please delete options that are not relevant)

  • 馃悰 Bug fix (non-breaking change which fixes an issue)

@hamishfagg
Copy link
Contributor Author

@ea-rus @paxcema I've asked for your reviews as I don't understand the langchain skills and I don't know how to test my changes. They are deployed to https://alpha.dev.mindsdb.com now if you could take a look please :)

@paxcema
Copy link
Member

paxcema commented Jan 31, 2024

Looping in @tmichaeldb as well. Code changes look good to me, though it's possible we may want to bring these back into interfaces/skills if/once ML engines other than Langchain can be used as agents.

For that, it'd be important to understand what is using torch here. I may be mistaken but my reading is that we're not directly using it in any of the skill_tool imports, so there may be a way to refactor this so that we can move tools back to their original place without needing torch.

@ea-rus
Copy link
Contributor

ea-rus commented Feb 1, 2024

@paxcema, skill_tool.py uses langchain handler. When we return it to skills controller it should be set of functions used by langchain handler (but not dependent on langchain)

@hamishfagg hamishfagg merged commit e45ca9f into staging Feb 2, 2024
10 checks passed
@hamishfagg hamishfagg deleted the move_lanchain_skills branch February 2, 2024 01:29
@StpMax StpMax mentioned this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants