Cleanup
This commit is contained in:
parent
cef750497b
commit
6a3caa84ce
2 changed files with 4 additions and 6 deletions
|
@ -77,7 +77,6 @@ class ChatGpt : ThreadedModule() {
|
|||
*/
|
||||
const val CHATGPT_API_KEY = "chatgpt-api-key"
|
||||
|
||||
|
||||
// ChatGPT command
|
||||
private const val CHATGPT_CMD = "chatgpt"
|
||||
|
||||
|
@ -113,8 +112,7 @@ class ChatGpt : ThreadedModule() {
|
|||
if (response.statusCode() == 200) {
|
||||
try {
|
||||
val jsonResponse = JSONObject(response.body())
|
||||
println(response.body());
|
||||
var choices = jsonResponse.getJSONArray("choices")
|
||||
val choices = jsonResponse.getJSONArray("choices")
|
||||
return choices.getJSONObject(0).getString("text").trim()
|
||||
} catch (e: JSONException) {
|
||||
throw ModuleException(
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#Generated by the Semver Plugin for Gradle
|
||||
#Sun Dec 04 16:10:05 PST 2022
|
||||
version.buildmeta=798
|
||||
#Sun Dec 04 17:34:43 PST 2022
|
||||
version.buildmeta=799
|
||||
version.major=0
|
||||
version.minor=8
|
||||
version.patch=0
|
||||
version.prerelease=rc
|
||||
version.project=mobibot
|
||||
version.semver=0.8.0-rc+798
|
||||
version.semver=0.8.0-rc+799
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue