Closed romeshsithumina closed 5 months ago
This issue was happening due to the use of vercel edge functions to stream the ChatGPT API responses. It appears that mongoose does not support it. To resolve the issue, Prisma accelerate was used by replacing mongoose for the database operations.
Encountering an error with the following details:
[TypeError: _database_message_model__WEBPACK_IMPORTED_MODULE_2__.default.create is not a function] ... TypeError: mongoose__WEBPACK_IMPORTED_MODULE_0___default(...).set is not a function ... Error: aborted ...
This issue seems to be related to the usage of create and set functions in mongoose. This error happens when trying to save the streaming response from OpenAI to mongodb.
Steps to Reproduce: