From 55394dbcea36aa0232cfd9ac5ea8b5099fa0d804 Mon Sep 17 00:00:00 2001 From: Andrew Charneski Date: Fri, 24 Nov 2023 01:59:37 -0500 Subject: [PATCH] misc --- .../simiacryptus/skyenet/core/actors/ImageActor.kt | 11 ++++------- .../core/actors/record/ImageActorInterceptor.kt | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/ImageActor.kt b/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/ImageActor.kt index 83195376..e3619288 100644 --- a/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/ImageActor.kt +++ b/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/ImageActor.kt @@ -1,19 +1,16 @@ package com.simiacryptus.skyenet.core.actors import com.simiacryptus.jopenai.API -import com.simiacryptus.jopenai.ApiModel -import com.simiacryptus.jopenai.ApiModel.* +import com.simiacryptus.jopenai.ApiModel.ChatMessage +import com.simiacryptus.jopenai.ApiModel.ImageGenerationRequest import com.simiacryptus.jopenai.OpenAIClient import com.simiacryptus.jopenai.models.ChatModels import com.simiacryptus.jopenai.models.ImageModels -import com.simiacryptus.jopenai.models.OpenAITextModel -import com.simiacryptus.jopenai.proxy.ChatProxy import java.awt.image.BufferedImage -import java.util.function.Function open class ImageActor( prompt: String = "Transform the user request into an image generation prompt that the user will like", - val action: String? = null, + name: String? = null, textModel: ChatModels = ChatModels.GPT35Turbo, val imageModel: ImageModels = ImageModels.DallE2, temperature: Double = 0.3, @@ -21,7 +18,7 @@ open class ImageActor( val height: Int = 1024, ) : BaseActor( prompt = prompt, - name = action, + name = name, model = textModel, temperature = temperature, ) { diff --git a/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/record/ImageActorInterceptor.kt b/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/record/ImageActorInterceptor.kt index bd062d8b..522d0e32 100644 --- a/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/record/ImageActorInterceptor.kt +++ b/core/src/main/kotlin/com/simiacryptus/skyenet/core/actors/record/ImageActorInterceptor.kt @@ -3,7 +3,6 @@ package com.simiacryptus.skyenet.core.actors.record import com.simiacryptus.jopenai.API import com.simiacryptus.jopenai.models.OpenAIModel import com.simiacryptus.skyenet.core.actors.ImageActor -import com.simiacryptus.skyenet.core.actors.ParsedResponse import com.simiacryptus.skyenet.core.util.FunctionWrapper class ImageActorInterceptor( @@ -11,7 +10,7 @@ class ImageActorInterceptor( private val functionInterceptor: FunctionWrapper, ) : ImageActor( prompt = inner.prompt, - action = inner.action, + name = inner.name, textModel = inner.model, imageModel = inner.imageModel, temperature = inner.temperature,