From 78d43439357c828300c20c8f33730da1a1ce6a05 Mon Sep 17 00:00:00 2001 From: Andrew Charneski Date: Wed, 11 Dec 2024 22:26:31 -0500 Subject: [PATCH] wip --- .../simiacryptus/skyenet/apps/plan/WebFetchAndTransformTask.kt | 2 +- .../com/simiacryptus/skyenet/apps/plan/tools/ForeachTask.kt | 2 +- .../simiacryptus/skyenet/apps/plan/tools/RunShellCommandTask.kt | 2 +- .../simiacryptus/skyenet/apps/plan/tools/SeleniumSessionTask.kt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/WebFetchAndTransformTask.kt b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/WebFetchAndTransformTask.kt index e4450783..76276954 100644 --- a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/WebFetchAndTransformTask.kt +++ b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/WebFetchAndTransformTask.kt @@ -2,6 +2,6 @@ package com.simiacryptus.skyenet.apps.plan import org.jsoup.nodes.Node -private fun Node.text(): String { +fun Node.text(): String { return this.childNodes().joinToString("") { it.text() } } diff --git a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/ForeachTask.kt b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/ForeachTask.kt index 483316d9..0a29a995 100644 --- a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/ForeachTask.kt +++ b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/ForeachTask.kt @@ -10,7 +10,7 @@ import org.slf4j.LoggerFactory class ForeachTask( planSettings: PlanSettings, planTask: ForeachTaskConfigData? -) : AbstractTask(planSettings, planTask) { +) : AbstractTask(planSettings, planTask) { class ForeachTaskConfigData( @Description("A list of items over which the ForEach task will iterate. (Only applicable for ForeachTask tasks) Can be used to process outputs from previous tasks.") diff --git a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/RunShellCommandTask.kt b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/RunShellCommandTask.kt index 8a2dfd9c..6a96e2d0 100644 --- a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/RunShellCommandTask.kt +++ b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/RunShellCommandTask.kt @@ -17,7 +17,7 @@ import kotlin.reflect.KClass class RunShellCommandTask( planSettings: PlanSettings, planTask: RunShellCommandTaskConfigData? -) : AbstractTask(planSettings, planTask) { +) : AbstractTask(planSettings, planTask) { class RunShellCommandTaskConfigData( @Description("The shell command to be executed") diff --git a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/SeleniumSessionTask.kt b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/SeleniumSessionTask.kt index 5cab5e38..7d4ff6c2 100644 --- a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/SeleniumSessionTask.kt +++ b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/tools/SeleniumSessionTask.kt @@ -4,6 +4,7 @@ import com.simiacryptus.jopenai.ChatClient import com.simiacryptus.jopenai.OpenAIClient import com.simiacryptus.jopenai.describe.Description import com.simiacryptus.skyenet.apps.plan.* +import com.simiacryptus.skyenet.apps.plan.tools.WebFetchAndTransformTask.Companion.scrubHtml import com.simiacryptus.skyenet.core.util.Selenium import com.simiacryptus.skyenet.util.MarkdownUtil import com.simiacryptus.skyenet.util.Selenium2S3