-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support serverless environments #633
Comments
In the same vein, Deno functions that were once working for me (v0.0.36) are now erroring out with: When attempting to import: import { VectorStore } from 'https://esm.sh/langchain@0.0.36/vectorstores';
import { Document } from 'https://esm.sh/langchain@0.0.36/document';
import type { SupabaseClient } from 'https://esm.sh/@supabase/supabase-js@2.12.0';
import type { Embeddings } from 'https://esm.sh/langchain@0.0.36/embeddings';
Seems like the next step here is building an edge specific build. |
Any update on this now ? |
I'm trying this on Vercel: |
I believe @nfcampos is working on creating a separate env build for edge. Would need to disable all nodejs stubs such as |
Could you try with the latest version? It worked for me when used inside Supabase edge functions, which is deno
|
@nfcampos I can confirm v0.0.50 solves my supabase edge functions issues (deno importing of langchain). |
Hi, edge/browser support has been published as a prerelease, you can install the prerelease with See upgrade instructions here https://langchainjs-docs-git-nc-test-exports-cf-langchain.vercel.app/docs/getting-started/install you'll need to update import paths, see the link for more details If you test it let me know any issues! |
@nfcampos I'm getting:
when importing in a supabase function |
Intersting I don't get that, can you confirm this is when running |
v1.40.1 and v1.50.1 and on |
@leerobert cool let me know how you get on. we also have this template, which might help https://github.com/langchain-ai/langchain-template-supabase |
I set up this project locally starting completely fresh and installed according to your README and got:
Similar error that I'm seeing on my side of the house as well. |
This works for me with
Can you confirm yours? |
Can confirm when I update the
Then it works. Supbase' latest CLI must corrupt things. Might want to lock in teh supabase CLI for the time being |
Ah I see, I'll pin it and pick it up with supabase, hopefully they can get it fixed |
Summary
Would be great if this package could support serverless environments such as NextJS route handlers. Specifically the streaming part.
Being able to have langchain and the UI of an application on the same infra saves a lot of time and complexity.
References
vercel/next.js#9965 (comment)
#378
#62
The text was updated successfully, but these errors were encountered: