Compare commits

..

No commits in common. "4f9ff1b64137402e82542c53212d4a00672fa2d6" and "0405c69d987be5bf80db9cf56cb2debf0dc8ac6b" have entirely different histories.

4 changed files with 5 additions and 17 deletions

View file

@ -57,12 +57,6 @@
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.9.23</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>

View file

@ -91,7 +91,6 @@ 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

View file

@ -42,7 +42,7 @@ import org.junit.jupiter.api.extension.ExtensionContext
*/
class DisableOnCiCondition : ExecutionCondition {
override fun evaluateExecutionCondition(context: ExtensionContext): ConditionEvaluationResult {
return if (System.getenv("CI") != null) {
return if (System.getenv("CI") != null && System.getenv("COVERAGE_SDK") == null) {
ConditionEvaluationResult.disabled("Test disabled on CI")
} else {
ConditionEvaluationResult.enabled("Test enabled")

View file

@ -47,15 +47,6 @@ 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() {
@ -64,6 +55,10 @@ 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)
}