Closed monostere0 closed 1 year ago
Hello @monostere0!
The error does indicate that the WASM file is not bundled properly. If possible, a reproducible example would be great!
Hi @dqbd, thanks for your reply! Indeed, after drilling more into this issue, it seems like CDK doesn't allow for plugins configuration in its esbuild settings for lambdas. So basically there's no way of doing this with CDK out of the box, however I did find this package which promises to be a workaround. Didn't get the chance to use it yet though, I'll report back once I do.
I had the same problem. One solution that worked was to copy the webassembly into the lambda build directory as part of the deployment. Another was to use the pure JS implementation js-tiktoken
Thanks for the solutions @bmul!
I haven't managed to have it running, so I've resorted to using the openai npm package, which does what I need. Was getting pretty close with having the wasm package embedded into the bundle itself but I kept running into other issues so I swapped it. I guess this issue can be closed, thanks.
Couldn't find anything documented, that's why I'm opening an issue here
I'm thinking I'm maybe missing a lambda layer but I could only find one for Python. Any pointers would be greatly appreciated, thanks!