Skip to content

Commit d811af4

Browse files
committed
fix createChatCompletion and createCompletion error
1 parent 5021a52 commit d811af4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import com.github.breadmoirai.githubreleaseplugin.GithubReleaseTask
22

33
group = "com.cjcrafter"
4-
version = "1.3.1"
4+
version = "1.3.2"
55

66
plugins {
77
`java-library`

src/main/kotlin/com/cjcrafter/openai/OpenAI.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ open class OpenAI @JvmOverloads constructor(
9797
try {
9898
val httpResponse = client.newCall(httpRequest).execute()
9999
lateinit var response: CompletionResponse
100-
OpenAICallback(true, { throw it }) {
100+
OpenAICallback(false, { throw it }) {
101101
response = gson.fromJson(it, CompletionResponse::class.java)
102102
}.onResponse(httpResponse)
103103

@@ -247,7 +247,7 @@ open class OpenAI @JvmOverloads constructor(
247247
try {
248248
val httpResponse = client.newCall(httpRequest).execute()
249249
lateinit var response: ChatResponse
250-
OpenAICallback(true, { throw it }) {
250+
OpenAICallback(false, { throw it }) {
251251
response = gson.fromJson(it, ChatResponse::class.java)
252252
}.onResponse(httpResponse)
253253

0 commit comments

Comments
 (0)