diff --git a/streaming/fs2/src/main/scala/sttp/openai/streaming/Fs2OpenAI.scala b/streaming/fs2/src/main/scala/sttp/openai/streaming/fs2/package.scala similarity index 100% rename from streaming/fs2/src/main/scala/sttp/openai/streaming/Fs2OpenAI.scala rename to streaming/fs2/src/main/scala/sttp/openai/streaming/fs2/package.scala diff --git a/streaming/fs2/src/test/scala/sttp/openai/streaming/fs2/Fs2ClientSpec.scala b/streaming/fs2/src/test/scala/sttp/openai/streaming/fs2/Fs2ClientSpec.scala index caeac79f..ef6d0376 100644 --- a/streaming/fs2/src/test/scala/sttp/openai/streaming/fs2/Fs2ClientSpec.scala +++ b/streaming/fs2/src/test/scala/sttp/openai/streaming/fs2/Fs2ClientSpec.scala @@ -5,7 +5,7 @@ import org.scalatest.flatspec.AsyncFlatSpec import cats.effect.testing.scalatest.AsyncIOSpec import org.scalatest.matchers.should.Matchers import cats.effect.IO -import _root_.fs2.{text, Stream} +import fs2.{Stream, text} import sttp.client4.DeserializationException import sttp.client4.httpclient.fs2.HttpClientFs2Backend import sttp.client4.testing.RawStream @@ -16,7 +16,7 @@ import sttp.openai.json.SnakePickle._ import sttp.openai.requests.completions.chat.ChatChunkRequestResponseData.ChatChunkResponse import sttp.openai.requests.completions.chat.ChatChunkRequestResponseData.ChatChunkResponse.DoneEventMessage import sttp.openai.requests.completions.chat.ChatRequestBody.{ChatBody, ChatCompletionModel} -import sttp.openai.streaming.fs2._ +import sttp.openai.utils.JsonUtils.compactJson class Fs2ClientSpec extends AsyncFlatSpec with AsyncIOSpec with Matchers with EitherValues { for ((statusCode, expectedError) <- ErrorFixture.testData) @@ -106,6 +106,4 @@ class Fs2ClientSpec extends AsyncFlatSpec with AsyncIOSpec with Matchers with Ei val expectedResponse = chatChunks.map(read[ChatChunkResponse](_)) response.asserting(_ shouldBe expectedResponse) } - - private def compactJson(json: String): String = write(read[ujson.Value](json)) }