![JAR search and dependency download from the Maven repository](/logo.png)
cc.unitmesh.prompt.executor.strategy.RepeatExecuteStrategy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prompt-script Show documentation
Show all versions of prompt-script Show documentation
Chocolate Factory is a cutting-edge LLM toolkit designed to empower you in creating your very own AI assistant.
package cc.unitmesh.prompt.executor.strategy
import cc.unitmesh.prompt.executor.base.SingleJobExecuteStrategy
import cc.unitmesh.prompt.model.Job
import cc.unitmesh.prompt.model.JobStrategy
import java.nio.file.Path
class RepeatExecuteStrategy(
override val jobName: String,
override val job: Job,
override val basePath: Path,
private val strategy: JobStrategy.Repeat,
) : SingleJobExecuteStrategy(jobName, job, basePath) {
override fun execute() {
repeat(strategy.value) { index ->
log.info("execute job: $jobName, strategy: repeat, times: ${index}/${strategy.value}")
val llmResult = execSingleJob(jobName, job)
handleJobResult(jobName, job, llmResult)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy