From 3bce7a387781100f4816603fa91936d174c1a051 Mon Sep 17 00:00:00 2001 From: ReBlast Date: Thu, 7 Nov 2024 15:36:48 +0500 Subject: [PATCH] fix: resolve build errors --- src/commonMain/kotlin/io/github/vyfor/groqkt/GroqClient.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commonMain/kotlin/io/github/vyfor/groqkt/GroqClient.kt b/src/commonMain/kotlin/io/github/vyfor/groqkt/GroqClient.kt index 421eba1..3245241 100644 --- a/src/commonMain/kotlin/io/github/vyfor/groqkt/GroqClient.kt +++ b/src/commonMain/kotlin/io/github/vyfor/groqkt/GroqClient.kt @@ -23,11 +23,9 @@ import io.ktor.client.request.* import io.ktor.client.request.forms.* import io.ktor.client.statement.* import io.ktor.http.* -import io.ktor.http.content.* import io.ktor.serialization.kotlinx.json.* import io.ktor.utils.io.* import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.IO import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flowOn @@ -136,7 +134,7 @@ class GroqClient( emit(Result.success(chunk)) } } - }.flowOn(Dispatchers.IO).catch { e -> emit(Result.failure(e)) } + }.flowOn(Dispatchers.Default).catch { e -> emit(Result.failure(e)) } ) } @@ -164,7 +162,7 @@ class GroqClient( emit(Result.success(chunk)) } } - }.flowOn(Dispatchers.IO).catch { e -> emit(Result.failure(e)) } + }.flowOn(Dispatchers.Default).catch { e -> emit(Result.failure(e)) } ) }