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

Using WTFSteroidChecker in OpenAI bot for request and response #98

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

ufian
Copy link
Contributor

@ufian ufian commented Mar 24, 2023

Problem
Many users are making requests to OpenAI bot with the reason to receive "wtf" response.

Solution
Using WTFSteroidChecker for checking request and response to OpenAI bot for "wtf". If it contains, then ban the user for 1 hour

Example
Screenshot 2023-03-24 at 2 44 09 PM

Issue #93

@coveralls
Copy link

coveralls commented Mar 24, 2023

Pull Request Test Coverage Report for Build 4556476474

  • 51 of 51 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 81.257%

Totals Coverage Status
Change from base Build 4547805015: 0.3%
Covered Lines: 2094
Relevant Lines: 2577

💛 - Coveralls

app/bot/openai.go Outdated Show resolved Hide resolved
@ufian
Copy link
Contributor Author

ufian commented Mar 24, 2023

In this PR I need to provide full msg object to checkRequest and checkResponse methods, but I used only User and Message ID fields.

If we'd support IsReply, then we won't need to provide Message Id inside this checks.

Question:
Do you know any good approach how to do universal generation of ban-responses?
I may define the lambda and put it as an argument in check functions

app/bot/openai.go Outdated Show resolved Hide resolved
app/bot/openai.go Outdated Show resolved Hide resolved
app/bot/openai.go Outdated Show resolved Hide resolved
app/bot/openai.go Outdated Show resolved Hide resolved
@ufian ufian requested a review from umputun March 28, 2023 22:33
app/bot/openai.go Outdated Show resolved Hide resolved
@ufian
Copy link
Contributor Author

ufian commented Mar 29, 2023

Should I squash?

@umputun
Copy link
Member

umputun commented Mar 29, 2023

Should I squash?

yes, pls

Using WTFSteroidChecker in OpenAI bot for request and response to prevent unreasonable using of Chat GPT
@umputun umputun merged commit 787ff21 into radio-t:master Mar 29, 2023
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.

3 participants