-
Notifications
You must be signed in to change notification settings - Fork 55
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
Using google-cloud/vertexai in edge environments #82
Comments
You can use a bundler to remove |
@sararob thanks for the quick answer. I've tried removing next.config.js (for reference)/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, { isServer, webpack }) => {
config.plugins.push(
new webpack.IgnorePlugin({ resourceRegExp: /https-proxy-agent/ }),
);
config.resolve.fallback = {
buffer: false,
crypto: false,
events: false,
fs: false,
http: false,
https: false,
net: false,
os: false,
path: false,
querystring: false,
stream: false,
tty: false,
util: false,
zlib: false,
child_process: false,
tls: false,
};
return config;
},
};
module.exports = nextConfig; error (for reference)
|
Try using |
@alexander-fenster thanks - I've given it a try, but ran into other issues as well and ended up needing to disable more items, which eventually led to the route not being available. We have implemented a solution with the generative ai sdk in the meantime, which works on the edge. Abandoned PR for reference: https://github.com/vercel/ai/pull/863/files |
Environment details
Background
I'm implementing Gemini support for the Vercel AI SDK ( https://github.com/vercel/ai/pull/863/files ). However, when I set the runtime to 'edge', I run into the error below. My investigation showed that the auth library has several dependencies that are not supported in edge environments. Are there any guides on how to use the Vertex library in an edge environment, e.g. for streaming AI responses?
Steps to reproduce
The text was updated successfully, but these errors were encountered: