Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bburdiliak committed Sep 13, 2024
1 parent ba05aa7 commit 987d21b
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import io.cequence.openaiscala.domain.BaseMessage
import io.cequence.openaiscala.domain.response._
import io.cequence.openaiscala.domain.settings._
import io.cequence.openaiscala.service.{OpenAIChatCompletionService, OpenAIServiceConsts}
import io.cequence.wsclient.JsonUtil
import io.cequence.wsclient.ResponseImplicits._
import io.cequence.wsclient.service.WSClient
import io.cequence.wsclient.service.WSClientWithEngineTypes.WSClientWithEngine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import io.cequence.openaiscala.vertexai.service.VertexAIServiceFactory
import io.cequence.wsclient.domain.WsRequestContext

import scala.concurrent.ExecutionContext
import io.cequence.openaiscala.service.StreamedServiceTypes

object ChatCompletionProvider {
case class ProviderSettings(
Expand Down Expand Up @@ -60,12 +61,14 @@ object ChatCompletionProvider {
def vertexAI(
implicit ec: ExecutionContext,
m: Materializer
) = VertexAIServiceFactory.asOpenAI()
): StreamedServiceTypes.OpenAIChatCompletionStreamedService =
VertexAIServiceFactory.asOpenAI()

def anthropic(
implicit ec: ExecutionContext,
m: Materializer
) = AnthropicServiceFactory.asOpenAI()
): StreamedServiceTypes.OpenAIChatCompletionStreamedService =
AnthropicServiceFactory.asOpenAI()

object streamed {
def cerebras(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package io.cequence.openaiscala.examples.nonopenai
import akka.NotUsed
import akka.stream.scaladsl.{RestartSource, Sink, Source}
import io.cequence.openaiscala.OpenAIScalaClientException
import io.cequence.openaiscala.anthropic.service.AnthropicServiceFactory
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.domain.{NonOpenAIModelId, SystemMessage, UserMessage}
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.cequence.openaiscala.examples.nonopenai

import io.cequence.openaiscala.anthropic.service.AnthropicServiceFactory
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.domain.{NonOpenAIModelId, SystemMessage, UserMessage}
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ package io.cequence.openaiscala.examples.nonopenai
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionService,
OpenAIChatCompletionServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionService

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import akka.stream.scaladsl.Sink
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionStreamedServiceExtra,
OpenAIChatCompletionStreamedServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionStreamedServiceExtra

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ package io.cequence.openaiscala.examples.nonopenai
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionService,
OpenAIChatCompletionServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionService

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import akka.stream.scaladsl.Sink
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionStreamedServiceExtra,
OpenAIChatCompletionStreamedServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionStreamedServiceExtra

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ package io.cequence.openaiscala.examples.nonopenai
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionService,
OpenAIChatCompletionServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionService

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import akka.stream.scaladsl.Sink
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionStreamedServiceExtra,
OpenAIChatCompletionStreamedServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionStreamedServiceExtra

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ package io.cequence.openaiscala.examples.nonopenai
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionService,
OpenAIChatCompletionServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionService

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import akka.stream.scaladsl.Sink
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionStreamedServiceExtra,
OpenAIChatCompletionStreamedServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionStreamedServiceExtra

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ package io.cequence.openaiscala.examples.nonopenai
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionService,
OpenAIChatCompletionServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionService

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import akka.stream.scaladsl.Sink
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionStreamedServiceExtra,
OpenAIChatCompletionStreamedServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionStreamedServiceExtra

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ package io.cequence.openaiscala.examples.nonopenai
import io.cequence.openaiscala.domain._
import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.{
OpenAIChatCompletionService,
OpenAIChatCompletionServiceFactory
}
import io.cequence.wsclient.domain.WsRequestContext
import io.cequence.openaiscala.service.OpenAIChatCompletionService

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.cequence.openaiscala.domain.{NonOpenAIModelId, SystemMessage, UserMess
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.OpenAIChatCompletionService
import io.cequence.openaiscala.service.StreamedServiceTypes.OpenAIChatCompletionStreamedService
import io.cequence.openaiscala.vertexai.service.VertexAIServiceFactory

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import io.cequence.openaiscala.domain.settings.CreateChatCompletionSettings
import io.cequence.openaiscala.domain.{NonOpenAIModelId, SystemMessage, UserMessage}
import io.cequence.openaiscala.examples.{ChatCompletionProvider, ExampleBase}
import io.cequence.openaiscala.service.OpenAIChatCompletionService
import io.cequence.openaiscala.vertexai.service.VertexAIServiceFactory

import scala.concurrent.Future

Expand Down

0 comments on commit 987d21b

Please sign in to comment.