Skip to content

Commit

Permalink
Move fs2 package
Browse files Browse the repository at this point in the history
  • Loading branch information
DybekK committed Nov 7, 2023
1 parent 9f7b82e commit f712e28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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))
}

0 comments on commit f712e28

Please sign in to comment.