Skip to content

Commit 8551242

Browse files
committed
chore(llm-config): update LLM configuration and switch to jsonpathkt #271
- Replace JsonPath with jsonpathkt for JSON parsing. - Modify tests and dependencies to accommodate jsonpathkt.
1 parent f21ec5c commit 8551242

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ project(":core") {
433433

434434
implementation("org.yaml:snakeyaml:2.2")
435435

436-
// implementation("com.nfeld.jsonpathkt:jsonpathkt:2.0.1")
437-
implementation("com.jayway.jsonpath:json-path:2.9.0")
436+
implementation("com.nfeld.jsonpathkt:jsonpathkt:2.0.1")
438437

439438
implementation("org.jetbrains:markdown:0.6.1")
440439

core/src/main/kotlin/cc/unitmesh/devti/llm2/LLMProvider2.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import cc.unitmesh.devti.util.AutoDevCoroutineScope
1010
import com.intellij.openapi.diagnostic.Logger
1111
import com.intellij.openapi.diagnostic.logger
1212
import com.intellij.openapi.project.Project
13-
import com.jayway.jsonpath.JsonPath
13+
import com.nfeld.jsonpathkt.JsonPath
14+
import com.nfeld.jsonpathkt.extension.read
1415
import kotlinx.coroutines.*
1516
import kotlinx.coroutines.channels.awaitClose
1617
import kotlinx.coroutines.flow.Flow

core/src/main/kotlin/cc/unitmesh/devti/llms/custom/CustomSSEProcessor.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import com.fasterxml.jackson.databind.ObjectMapper
1212
import com.intellij.openapi.components.service
1313
import com.intellij.openapi.diagnostic.logger
1414
import com.intellij.openapi.project.Project
15-
import com.jayway.jsonpath.JsonPath
15+
import com.nfeld.jsonpathkt.JsonPath
16+
import com.nfeld.jsonpathkt.extension.read
1617
import io.reactivex.rxjava3.core.BackpressureStrategy
1718
import io.reactivex.rxjava3.core.Flowable
1819
import io.reactivex.rxjava3.core.FlowableEmitter

core/src/main/kotlin/cc/unitmesh/devti/llms/custom/JSONBodyResponseCallback.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cc.unitmesh.devti.llms.custom
22

3-
import com.jayway.jsonpath.JsonPath
3+
import com.nfeld.jsonpathkt.JsonPath
4+
import com.nfeld.jsonpathkt.extension.read
45
import kotlinx.coroutines.runBlocking
56
import okhttp3.Call
67
import okhttp3.Callback

core/src/test/kotlin/cc/unitmesh/devti/settings/LLMSettingComponentKtTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cc.unitmesh.devti.settings
22

3-
import com.jayway.jsonpath.JsonPath
3+
import com.nfeld.jsonpathkt.JsonPath
4+
import com.nfeld.jsonpathkt.extension.read
45
import org.junit.Assert.assertEquals
56
import org.junit.Test
67

0 commit comments

Comments
 (0)