-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ChatOpenAI breaks edge streaming on Vercel Edge functions. #3092
Comments
What bundler are you using? Have noticed this warning in our tests but we use this live in production with Webpack + Next pretty frequently, so I assumed the bundler was smart enough to filter it out: |
Next.js with Webpack, but I have this custom config - not sure if it matters:
|
CC @rattrayalex is it possible to remove references like this? |
Hey @jacoblee93 , thanks for the ping. We don't actually call that at runtime on that platform, so I'd consider it a bug/problem with the import tracer… but I can see if I can move that code into another file to make this easier. |
Ah, I see the user is on Also, I'm a bit surprised to see |
Yes, definitely a bundler/chunking issue. Ok will try bumping the version! Thanks for the look. |
Please reopen if this persists past the next release (0.0.180) |
ChatOpenAI breaks edge streaming on Vercel Edge functions.
Error:
Import trace for requested module:
...
The import causing the error:
import { ChatOpenAI } from 'langchain/chat_models/openai';
Potential Solution:
If the native OpenAI library doesn't support edge streaming / functions, then LangChain should implement that chat module via a native fetch.
The text was updated successfully, but these errors were encountered: