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

Fix: clear context to avoid [belongerr] when Spark return [error] #638

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samanhappy
Copy link
Contributor

This PR aims to address the [belongerr] issue of SparkBot in #633

The reason to clear context is Spark will make the current conversation unusable for sensitive message
WX20231125-160349@2x

so I choose to clear context whenever encoutering this situation

@sunner
Copy link
Owner

sunner commented Nov 25, 2023

Thank you.

I have a concern. Clearing the context, or reporting an error and requiring creating a new chat. Which solution is better? I have no idea now.

@samanhappy
Copy link
Contributor Author

I agree with you that finding a perfect solution is tricky, here is what I think:

  • clearing the context directly is user-transparent, but Spark may block us for creating too many conversations too quickly

  • requiring creating a new chat gives user control, but it might be inconvenient if they are using multiple bots, because we can only start a new chat that includes all selected bots if I understand correctly. If we choose this solution, can we or should we just creating a new chat for bots with error like Spark?

@sunner
Copy link
Owner

sunner commented Nov 26, 2023

Inspired by your reply. I have the answer now.

Any error should be exposed to users as is. Only the user can determine what to do next. There has been code that does not follow this rule and I will modify them.

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

Successfully merging this pull request may close these issues.

None yet

2 participants