diff --git a/pom.xml b/pom.xml
index a4e0575..512be76 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,6 +57,12 @@
1.2.0
compile
+
+ org.jetbrains.kotlin
+ kotlin-stdlib
+ 1.9.23
+ compile
+
org.jetbrains.kotlinx
kotlinx-coroutines-core
diff --git a/src/bld/java/net/thauvin/erik/MobibotBuild.java b/src/bld/java/net/thauvin/erik/MobibotBuild.java
index 56565b1..a5e5957 100644
--- a/src/bld/java/net/thauvin/erik/MobibotBuild.java
+++ b/src/bld/java/net/thauvin/erik/MobibotBuild.java
@@ -91,6 +91,7 @@ public class MobibotBuild extends Project {
.include(dependency("com.google.guava", "guava", "33.1.0-jre"))
.include(dependency("com.google.cloud", "google-cloud-vertexai", "1.2.0"))
// Kotlin
+ .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
.include(dependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.8.0"))
.include(dependency("org.jetbrains.kotlinx", "kotlinx-cli-jvm", "0.3.6"))
// Logging
diff --git a/src/test/kotlin/net/thauvin/erik/mobibot/modules/ChatGptTest.kt b/src/test/kotlin/net/thauvin/erik/mobibot/modules/ChatGptTest.kt
index e38e81b..c031295 100644
--- a/src/test/kotlin/net/thauvin/erik/mobibot/modules/ChatGptTest.kt
+++ b/src/test/kotlin/net/thauvin/erik/mobibot/modules/ChatGptTest.kt
@@ -47,6 +47,15 @@ class ChatGptTest : LocalProperties() {
.hasNoCause()
}
+ @Test
+ fun testChatOnCoverage() {
+ if (System.getenv("CI") == null || System.getenv("COVERAGE_SDK") != null) {
+ assertThat(
+ ChatGpt.chat("how do I encode a URL in java?", getProperty(ChatGpt.API_KEY_PROP), 60)
+ ).contains("URLEncoder")
+ }
+ }
+
@Test
@DisableOnCi
fun testChat() {
@@ -55,10 +64,6 @@ class ChatGptTest : LocalProperties() {
ChatGpt.chat("how do I make an HTTP request in Javascript?", apiKey, 100)
).contains("XMLHttpRequest")
- assertThat(
- ChatGpt.chat("how do I encode a URL in java?", apiKey, 60)
- ).contains("URLEncoder")
-
assertFailure { ChatGpt.chat("1 liter to gallon", apiKey, -1) }
.isInstanceOf(ModuleException::class.java)
}