vercel-langchain icon indicating copy to clipboard operation
vercel-langchain copied to clipboard

The env with the installed requirements > 100mb

Open rebelmachina opened this issue 2 years ago • 5 comments

This doesn't work anymore, because flask+langchain+openai deps are well over 50mb. How did everyone else make it work ?

rebelmachina avatar Apr 11 '23 06:04 rebelmachina

This doesn't work anymore, because flask+langchain+openai deps are well over 50mb. How did everyone else make it work ?

Still works for me, what issues are you facing?

homanp avatar Apr 11 '23 06:04 homanp

I have the same issue as @rebelzion , I'm receiving this error after running vercel dev

> Ready! Available at http://localhost:3000
> Building @vercel/python:api/index.py
Installing required dependencies...
LambdaSizeExceededError: The lambda function size (65.64mb) exceeds the maximum size limit (50mb).
    at executeBuild (/Users/asd/.nvm/versions/node/v16.16.0/lib/node_modules/vercel/dist/index.js:204076:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at DevServer.triggerBuild (/Users/asd/.nvm/versions/node/v16.16.0/lib/node_modules/vercel/dist/index.js:206245:13)
    at DevServer.serveProjectAsNowV2 (/Users/asd/.nvm/versions/node/v16.16.0/lib/node_modules/vercel/dist/index.js:205307:17)
    at Server.DevServer.devServerHandler (/Users/asd/.nvm/versions/node/v16.16.0/lib/node_modules/vercel/dist/index.js:204867:17) {
  code: 'MAX_LAMBDA_SIZE_EXCEEDED',
  meta: { size: 68833438, maxLambdaSize: 52428800 }
}

EmaSuriano avatar Apr 19 '23 07:04 EmaSuriano

Did anyone managed to solved the problem?

DanielhCarranza avatar May 25 '23 20:05 DanielhCarranza

@EmaSuriano getting the exact same issue. The docs in LangChain are super outdated. Anyone managed to solve it?

mohsin2596 avatar Sep 12 '23 09:09 mohsin2596

@EmaSuriano getting the exact same issue. The docs in LangChain are super outdated. Anyone managed to solve it?

Issue currently is the size of the function. Best bet is to use the LangChain JS package or Vercel AI sdk, bothe of these are JavaScript based though.

homanp avatar Sep 12 '23 09:09 homanp