Just added @netlify/functions to my project to use for calling OpenAI, but getting an error when using the 2nd example from the docs here - Lambda compatibility for Functions | Netlify Docs
Checked netllify/functions/dist/lib/stream in node modules and don’t see awslambda being imported?
api | /Users/hamishirving/Documents/Personal/Projects/CareBridge/care-bridge-rw/node_modules/@netlify/functions/dist/lib/stream.js:39
api | const stream = (handler) => awslambda.streamifyResponse(async (event, responseStream, context) => {
api | ^
api |
api | ReferenceError: awslambda is not defined
api | at stream (/Users/hamishirving/Documents/Personal/Projects/CareBridge/care-bridge-rw/node_modules/@netlify/functions/dist/lib/stream.js:39:39)
api | at Object.<anonymous> (/Users/hamishirving/Documents/Personal/Projects/CareBridge/care-bridge-rw/api/src/functions/chat/chat.js:31:19)
api | at Module._compile (node:internal/modules/cjs/loader:1241:14)
api | at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
api | at Module.load (node:internal/modules/cjs/loader:1091:32)
api | at Module._load (node:internal/modules/cjs/loader:938:12)
api | at Module.require (node:internal/modules/cjs/loader:1115:19)
api | at require (node:internal/modules/helpers:130:18)
api | at /Users/hamishirving/Documents/Personal/Projects/CareBridge/care-bridge-rw/node_modules/@redwoodjs/api-server/dist/plugins/lambdaLoader.js:35:11
api | at new Promise (<anonymous>)
api |
api | Node.js v20.9.0