This commit is contained in:
Erik C. Thauvin 2022-12-04 17:38:59 -08:00
parent cef750497b
commit 6a3caa84ce
2 changed files with 4 additions and 6 deletions

View file

@ -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(

View file

@ -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