Skip to content
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

Defer saving new message(question) in ChatGPTAPI.sendMessage #503

Closed
2 tasks done
189 opened this issue Mar 28, 2023 · 1 comment
Closed
2 tasks done

Defer saving new message(question) in ChatGPTAPI.sendMessage #503

189 opened this issue Mar 28, 2023 · 1 comment

Comments

@189
Copy link
Contributor

189 commented Mar 28, 2023

Verify latest release

  • I verified that the issue exists in the latest chatgpt release

Verify webapp is working

  • I verify that the ChatGPT webapp is working properly for this account.

Environment details

Nodejs 16.17.0
Windows 11

Describe the Bug

Saving the new message/question before receive response from openAI will cause something unexpected.

For some reasons (bad network, rate-limit, or user cancel or withdraw the request, so on), the request send to api.openai.com will be failed/abort, and the result will not be saved. But the user's message(user's question) has been saved before request sent, make it become orphan in database, no parentMessageId will point to it。If we query all message according conversationId from database, the orphan message will be received, it's redundant

@transitive-bullshit
Copy link
Owner

merged #504 – thanks @189 🙏

new release will be published shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants