Skip to content

Commit

Permalink
Fuck me life, and fuck yours too
Browse files Browse the repository at this point in the history
  • Loading branch information
acharneski committed Nov 4, 2023
1 parent 80a2622 commit d6ce177
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ repositories {

val kotlin_version = "1.7.22"
val jetty_version = "11.0.15"
val slf4j_version = "2.0.5"
val skyenet_version = "1.0.18"
val slf4j_version = "2.0.9"
val skyenet_version = "1.0.20"
dependencies {

implementation(group = "com.simiacryptus", name = "joe-penai", version = "1.0.20")
implementation(group = "com.simiacryptus", name = "joe-penai", version = "1.0.23")

implementation(group = "com.simiacryptus.skyenet", name = "util", version = skyenet_version)
implementation(group = "com.simiacryptus.skyenet", name = "core", version = skyenet_version)
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version ("0.4.0")
}

//includeBuild("../joe-penai/")
//includeBuild("../SkyeNet/")
includeBuild("../joe-penai/")
includeBuild("../SkyeNet/")
//includeBuild("../AwsAgent/")


Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class AnalogueFileAction extends FileContextAction<AnalogueFileAction.Settings>
}

private ProjectFile generateFile(ProjectFile baseFile, String directive) {
def chatRequest = new ChatRequest()
def chatRequest = new com.simiacryptus.openai.OpenAIClient.ChatRequest.ChatRequest()
def model = AppSettingsState.instance.defaultChatModel()
chatRequest.model = model.modelName
chatRequest.max_tokens = model.maxTokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CreateFileAction extends FileContextAction<CreateFileAction.Settings> {
String basePath,
String directive
) {
def chatRequest = new ChatRequest()
def chatRequest = new com.simiacryptus.openai.OpenAIClient.ChatRequest.ChatRequest()
def model = AppSettingsState.instance.defaultChatModel()
chatRequest.model = model.modelName
chatRequest.max_tokens = model.maxTokens
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
package com.github.simiacryptus.aicoder.actions.dev

import com.github.simiacryptus.aicoder.config.AppSettingsState
import com.github.simiacryptus.aicoder.util.UITools
import com.intellij.openapi.project.Project
import com.simiacryptus.openai.OpenAIClient
import com.simiacryptus.skyenet.Heart
import com.simiacryptus.skyenet.body.*
import com.simiacryptus.skyenet.heart.WeakGroovyInterpreter
import org.eclipse.jetty.util.resource.Resource
import java.util.HashMap
import java.util.Map
import java.util.function.Supplier

class CodeChatServer(
val project: Project,
Expand Down Expand Up @@ -45,7 +39,7 @@ rootMessageTrail =
) {
override fun run(userMessage: String) {
var messageTrail = ChatSession.divInitializer()
send("""$messageTrail<div>$userMessage</div><div>$spinner</div>""")
send("""$messageTrail<div>$userMessage</div><div>${SkyenetSessionServerBase.spinner}</div>""")
messages += OpenAIClient.ChatMessage(OpenAIClient.ChatMessage.Role.user, userMessage)
val response = api.chat(chatRequest, model).choices.first()?.message?.content.orEmpty()
messages += OpenAIClient.ChatMessage(OpenAIClient.ChatMessage.Role.assistant, response)
Expand Down

0 comments on commit d6ce177

Please sign in to comment.