-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Chat gpt attempt questions #865
Conversation
…iting on time per user. Include modal when no option is included for formatting question to ChatGPT.
- Variable name clean up - Command now only uses modal - Remove optional s from string
- CACHE_DURATION -> COMMAND_COOLDOWN - Unwind if statement
… allow for correct path to indicate to users that something went wrong.
…question. So far, all the system does is read the title and attempt to answer the question. More refinements to come.
…ould come from and if it's asked at all. Code has an error on line 143 of HelpSystemHelper.java.
This reverts commit 9851358.
…atGptCommand.java." This reverts commit 62ca7b0.
This reverts commit 9f842e4.
…sage if possible OR use the title and a shortened version of the message. Appending tags still possible. - Increase to ChatGptService timeout time. Otherwise, responses would just fail for even slightly complex questions. Also change temperature, which should create more strictly technical answers. - Tags are only appended if the question is still less than the maximum length. - Also included info log test to determine what the final question asked is. - Changed thrown error to mentioning slash command to users instead of silently failing. - Minor string edits.
- Create method to return information on /chatgpt, used if no useful response or error from AI. - Improve substring clipping to include space for question construction.
… checking if string contains desired sequence.
- Remove need for question mark in title requirement.
- Pull out question preparation code into own function - Use orElseThrow() instead of get() - Use toLowerCase(Locale.US) - Update StringBuilder variable name to questionBuilder. - Remove potentially erroneous comment
- Change from 'member' to 'human' - Refactor 'questionFirstMessage' to 'originalQuestion' - Refactor code for creating question to improve readability in case of adding question text versus remaining characters for question. - Include new tagBuilder StringBuilder to decrease insert calls down to one. - Remove throw block which housed logic.
- Limit length of question string moved to creation of question string - Remove test for bad AI answer (produces false negatives)
- Remove * imports
- Increase of timeout time to two minutes. - Initialize and send setup message to AI per query to restrict answers to limit. ChatGptServiceTest - Include new testing suite. - Include tests to check response time and functioning of error detection. - Test for length of response from AI to be less than 2000 characters. ChatGptCommand - Creation of local variables for better flexibility and readability. HelpSystemHelper - Rename variable to better describe use.
- Refactoring to accommodate above change in other classes amd methods. - Refactor HelpThreadCreatedListener to make creating AI response its own method. - Refactor HelpSystemHelper.constructChatGptAttempt() to place all required messages from AI response into embeds when answering a question.
…y to only break up by new lines and try not to be in code when doing so. - Change messages sent from ChatGPT from embeds into plain messages.
- Add ChatGptServiceTest.java for testing AI responses of different length - Add response.txt which contains test AI responses (just one for now). - Refactor ChatGptService to not include response parsing/break up. Moved to new util class AIResponseParser
…chatGPT-attempt-questions
Kudos, SonarCloud Quality Gate passed! |
When this is pulled, is it possible to have it running on the test server? I am sure there is some edge cases that will come up with more testing/questions. The only thing might be to add a way to save the response from the AI so we can test it again (given that AI usually don't give the same responses twice). |
@Together-Java/moderators |
application/src/main/java/org/togetherjava/tjbot/features/chaptgpt/ChatGptService.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/chaptgpt/ChatGptService.java
Outdated
Show resolved
Hide resolved
* Update chatgpt package name and refactoring due to change.
can I ask why this literally deletes the website? |
I was trying to merge with develop to keep the branch up to date. I think they removed the website from this repository and gave the website its own repository. I am just trying to merge the changes. I ultimately regret trying haha. |
ah ok, but couldnt you not just fetch/pull from develop again, so yours is up-to-date? |
it also shows that your pr is adding the JShell stuff which is simply not true |
I believe I have. A lot of merge conflicts emerge that despite fixing can't be merged into the branch? I am very confused. We are trying to reconstruct this branch in another branch. I am wondering if a roll back would be better? |
Again - because I am trying to merge in from the develop branch. I was just trying to keep it updated with the main branch. Not trying to get credit or anything like that. I thought keeping the branch as updated with the main branch was a good idea? Or is that not the way to go? |
I am not sure how to revert this in the best way, but fetch/pull from develop should update your branch so stuff like the website folder remove or JShell feature add will automatically be in your branch as well |
yeah I wasnt saying that you want credits for that lol
I think you would even need to fetch/pull new updates before being able to merge |
yeah the PR is fudged so my advice is to create a new branch and recreate the PR |
is it possible that you save your progress and completely roll back your branch + fetch/pull and then add your stuff to it |
* Refactor AIResponseParserTest to use ints instead of strings for test parameters.
…ong responses from ChatGPT for testing.
New and improved version of ChatGPT posting to Discord:
Longer wait time before timeoutAlso attempts questions posted in the question forum (attempts due to fear of timeouts and the classic "I'm sorry, as a LLM I can't...")
Resolves /issues/814,
Resolves /issues/839,Resolves /issues/840