Skip to content

Commit d363188

Browse files
committed
wip
1 parent e52d3af commit d363188

File tree

2 files changed

+19
-29
lines changed

2 files changed

+19
-29
lines changed

webui/src/main/kotlin/com/simiacryptus/skyenet/apps/general/AutoPlanChatApp.kt

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.simiacryptus.jopenai.models.ChatModel
88
import com.simiacryptus.skyenet.TabbedDisplay
99
import com.simiacryptus.skyenet.apps.plan.*
1010
import com.simiacryptus.skyenet.apps.plan.tools.file.FileModificationTask.FileModificationTaskConfigData
11+
import com.simiacryptus.skyenet.core.actors.CodingActor.Companion.indent
1112
import com.simiacryptus.skyenet.core.actors.ParsedActor
1213
import com.simiacryptus.skyenet.core.platform.Session
1314
import com.simiacryptus.skyenet.core.platform.model.User
@@ -386,42 +387,31 @@ open class AutoPlanChatApp(
386387
)
387388
).toMutableList()
388389
),
389-
prompt = """
390-
Given the following input, choose up to ${maxTasksPerIteration} tasks to execute. Do not create a full plan, just select the most appropriate task types for the given input.
391-
Available task types:
392-
393-
${
394-
TaskType.getAvailableTaskTypes(coordinator.planSettings).joinToString("\n") { taskType ->
395-
"* ${TaskType.getImpl(coordinator.planSettings, taskType).promptSegment()}"
396-
}
397-
}
398-
399-
Choose the most suitable task types and provide details of how they should be executed.
400-
""".trimIndent(),
390+
prompt = buildString {
391+
append("Given the following input, choose up to ")
392+
append(maxTasksPerIteration)
393+
append("tasks to execute. Do not create a full plan, just select the most appropriate task types for the given input and note any required/important details.\n")
394+
append("Available task types:\n")
395+
append(TaskType.getAvailableTaskTypes(coordinator.planSettings).joinToString("\n\n") { taskType ->
396+
"* ${TaskType.getImpl(coordinator.planSettings, taskType).promptSegment().trim().trimIndent().indent(" ")}"
397+
})
398+
append("\nChoose the most suitable task types and provide details of how they should be executed.")
399+
},
401400
model = coordinator.planSettings.defaultModel,
402401
parsingModel = coordinator.planSettings.parsingModel,
403402
temperature = coordinator.planSettings.temperature,
404403
describer = describer1,
405-
parserPrompt = """
406-
Task Subtype Schema:
407-
408-
${
409-
TaskType.getAvailableTaskTypes(coordinator.planSettings).joinToString("\n\n") { taskType ->
410-
"""
411-
${taskType.name}:
412-
${describer1.describe(taskType.taskDataClass).replace("\n", "\n ")}
413-
""".trim()
414-
}
415-
}
416-
""".trimIndent()
404+
parserPrompt = ("Task Subtype Schema:\n" + TaskType.getAvailableTaskTypes(coordinator.planSettings).joinToString("\n\n") { taskType ->
405+
"${taskType.name}:\n ${describer1.describe(taskType.taskDataClass).trim().trimIndent().indent(" ")}".trim()
406+
})
417407
).answer(
418408
listOf(userMessage) + contextData() +
419409
listOf(
420410
"""
421-
Current thinking status: ${formatThinkingStatus(thinkingStatus!!)}
422-
Please choose the next single task to execute based on the current status.
423-
If there are no tasks to execute, return {}.
424-
""".trimIndent()
411+
Current thinking status: ${formatThinkingStatus(thinkingStatus!!)}
412+
Please choose the next single task to execute based on the current status.
413+
If there are no tasks to execute, return {}.
414+
""".trimIndent()
425415
)
426416
+ formatEvalRecords(session = session), api
427417
).obj.tasks?.map { task ->

webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/TaskType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ class TaskType<out T : TaskConfigBase, out U : TaskSettingsBase>(
452452
registerConstructor(CommandSession) { settings, task -> CommandSessionTask(settings, task) }
453453
}
454454

455-
private fun <T : TaskConfigBase, U : TaskSettingsBase> registerConstructor(
455+
fun <T : TaskConfigBase, U : TaskSettingsBase> registerConstructor(
456456
taskType: TaskType<T, U>,
457457
constructor: (PlanSettings, T?) -> AbstractTask<T>
458458
) {

0 commit comments

Comments
 (0)