Skip to content

Conversation

tmcdonnell2
Copy link
Contributor

@tmcdonnell2 tmcdonnell2 commented Mar 23, 2023

Some bare bone implementation of ChatGPT. The main class is the ChatGPTService Class which allows for interaction with the AI. Right now all it can do is accept a question via ask(String prompt). ChatGPTCommand allows for asking the AI in a simple manner through /chatgpt prompt:___ .

Release

Added config entry:

"openaiApiKey": "<check pins in #tjbot_discussion for the key>"

tmcdonnell2 added 2 commits March 22, 2023 18:11
…cate with API. Include bare bones ChatGPTCommand for future testing of integration.
…e Duration time out and maximum token amount to of ChatGPTService.
@tmcdonnell2 tmcdonnell2 requested review from a team as code owners March 23, 2023 20:37
Update to pass Code Smell of not having package-info.java.
@Zabuzard Zabuzard linked an issue Mar 24, 2023 that may be closed by this pull request
@Zabuzard Zabuzard added new command Add a new command or group of commands to the bot priority: major labels Mar 24, 2023
… text.

Variable name fixes throughout files.
@tmcdonnell2
Copy link
Contributor Author

I am getting a weird error now and I am not sure what the issue is:
There was an error using the OpenAI API: Incorrect API key provided: ***************************************. You can find your API key at https://platform.openai.com/account/api-keys. Code: invalid_api_key Type: invalid_request_error Status Code: 401
It shows the apiKey beginning and end but places stars in the middle. This is likely just to obfuscate the real key. I watched it in the debugger and it appears to be passed in and around correct. Did something happen to the key? Do I have the Config added in wrong?

@marko-radosavljevic
Copy link
Contributor

marko-radosavljevic commented Mar 24, 2023

Yup, because the key was leaked, it triggered automatic key rotation. ☺️

No worries though, we can pin it on discord or something similar.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard Zabuzard merged commit 23a97eb into develop Mar 25, 2023
@Zabuzard Zabuzard deleted the ChatGPT-Impl branch March 25, 2023 19:06
@Zabuzard
Copy link
Member

lets gooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new command Add a new command or group of commands to the bot priority: major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate ChatGPT
4 participants