()
totalApiDescriptionLength.addAndGet(apiDescription.length)
- val response = run(request)
+ val response = chat(request)
val codeBlocks = extractCodeBlocks(response)
return Pair(response, codeBlocks)
}
- private fun run(request: ChatRequest): String {
+ private fun chat(request: ChatRequest): String {
request.model = model.modelName
request.temperature = temperature
val json = toJson(request)
diff --git a/gradle.properties b/gradle.properties
index 3287e7db..1be5e1bc 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,6 +1,6 @@
# Gradle Releases -> https://github.com/gradle/gradle/releases
libraryGroup = com.simiacryptus.skyenet
-libraryVersion = 1.0.21
+libraryVersion = 1.0.22
gradleVersion = 7.6.1
# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
diff --git a/util/src/main/kotlin/com/simiacryptus/skyenet/util/AgentDemoBase.kt b/util/src/main/kotlin/com/simiacryptus/skyenet/util/AgentDemoBase.kt
index 8a555905..42eadb67 100644
--- a/util/src/main/kotlin/com/simiacryptus/skyenet/util/AgentDemoBase.kt
+++ b/util/src/main/kotlin/com/simiacryptus/skyenet/util/AgentDemoBase.kt
@@ -19,7 +19,7 @@ abstract class AgentDemoBase {
val heart = heart(hands)
val brain = Brain(
api = OpenAIClient(OpenAIClient.keyTxt),
- hands = hands,
+ symbols = hands,
language = heart.getLanguage(),
)
brain.model = OpenAIClient.Models.GPT35Turbo
diff --git a/webui/src/main/kotlin/com/simiacryptus/skyenet/body/SkyenetCodingSession.kt b/webui/src/main/kotlin/com/simiacryptus/skyenet/body/SkyenetCodingSession.kt
index 8ae6c926..5928a820 100644
--- a/webui/src/main/kotlin/com/simiacryptus/skyenet/body/SkyenetCodingSession.kt
+++ b/webui/src/main/kotlin/com/simiacryptus/skyenet/body/SkyenetCodingSession.kt
@@ -23,20 +23,20 @@ open class SkyenetCodingSession(
open val brain by lazy {
object : Brain(
api = parent.api,
- hands = hands,
+ symbols = hands,
language = heart.getLanguage(),
- yamlDescriber = parent.typeDescriber,
+ describer = parent.typeDescriber,
model = parent.model
) {
- override fun getChatMessages(apiDescription: String) =
+ override fun getChatSystemMessages(apiDescription: String) =
if (parent.useHistory) {
- super.getChatMessages(apiDescription) + SessionServerUtil.getHistory(
+ super.getChatSystemMessages(apiDescription) + SessionServerUtil.getHistory(
history.values,
10,
parent.maxHistoryCharacters
)
} else {
- super.getChatMessages(apiDescription)
+ super.getChatSystemMessages(apiDescription)
}
}
@@ -176,7 +176,7 @@ open class SkyenetCodingSession(
buffer.append("""${codedInstruction}
${ex.message}
""")
send("""$messageTrail$buffer${SkyenetSessionServerBase.spinner}""")
val respondWithCode =
- brain.fixCommand(describedInstruction, codedInstruction, ex, status.resultOutput)
+ brain.fixCommand(codedInstruction, ex, status.resultOutput, describedInstruction)
renderedResponse = SessionServerUtil.getRenderedResponse(respondWithCode.second)
codedInstruction = SessionServerUtil.getCode(language, respondWithCode.second)
buffer.append("""${renderedResponse}
""")
@@ -201,7 +201,7 @@ open class SkyenetCodingSession(
//language=HTML
send("""$messageTrailNew Code:
${SkyenetSessionServerBase.spinner}""")
val respondWithCode =
- brain.fixCommand(describedInstruction, codedInstruction, e, status.resultOutput)
+ brain.fixCommand(codedInstruction, e, status.resultOutput, describedInstruction)
val renderedResponse = SessionServerUtil.getRenderedResponse(respondWithCode.second)
val newCode = SessionServerUtil.getCode(language, respondWithCode.second)
logger.debug("$sessionId - Response: $renderedResponse")