Skip to content

Commit

Permalink
OpenAIServiceStreamedExtra - createChatCompletionStreamed adapted to …
Browse files Browse the repository at this point in the history
…the new BaseMessage hierarchy
  • Loading branch information
peterbanda committed Nov 14, 2023
1 parent c756e92 commit 019a553
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.cequence.openaiscala.service

import akka.NotUsed
import akka.stream.scaladsl.Source
import io.cequence.openaiscala.domain.MessageSpec
import io.cequence.openaiscala.domain.{BaseMessage, SystemMessage}
import io.cequence.openaiscala.domain.response.{
ChatCompletionChunkResponse,
FineTuneEvent,
Expand Down Expand Up @@ -48,7 +48,7 @@ trait OpenAIServiceStreamedExtra extends OpenAIServiceConsts {
* <a href="https://platform.openai.com/docs/api-reference/chat/create">OpenAI Doc</a>
*/
def createChatCompletionStreamed(
messages: Seq[MessageSpec],
messages: Seq[BaseMessage],
settings: CreateChatCompletionSettings = DefaultSettings.CreateChatCompletion
): Source[ChatCompletionChunkResponse, NotUsed]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import io.cequence.openaiscala.domain.settings._
import io.cequence.openaiscala.domain.response._
import io.cequence.openaiscala.service.ws.{Timeouts, WSStreamRequestHelper}
import io.cequence.openaiscala.OpenAIScalaClientException
import io.cequence.openaiscala.domain.MessageSpec
import io.cequence.openaiscala.domain.{BaseMessage, SystemMessage}
import play.api.libs.json.JsValue

import scala.concurrent.ExecutionContext
Expand Down Expand Up @@ -43,7 +43,7 @@ private trait OpenAIServiceStreamedExtraImpl
}

override def createChatCompletionStreamed(
messages: Seq[MessageSpec],
messages: Seq[BaseMessage],
settings: CreateChatCompletionSettings = DefaultSettings.CreateChatCompletion
): Source[ChatCompletionChunkResponse, NotUsed] =
execJsonStreamAux(
Expand Down

0 comments on commit 019a553

Please sign in to comment.