![JAR search and dependency download from the Maven repository](/logo.png)
cc.unitmesh.prompt.model.JobStrategy.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.model
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
/**
* JobStrategy is the job's strategy config, which will be used for [cc.unitmesh.prompt.model.Job].
* The strategy can be a connection config or a repeat config or others.
* For example:
* ```yaml
* strategy:
* - type: connection
* value:
* - type: range
* key: temperature
* range: 0.7~1.0
* step: 0.1
* - type: repeat
* value: 3
* ```
*/
@Serializable
sealed class JobStrategy {
/**
* Connection is a config of [cc.unitmesh.connection.ConnectionConfig],
* which will be used for [cc.unitmesh.openai.LlmProvider]
* like temperature, top-p, top-k, presence_penalty, frequency_penalty, stop etc.
* for example:
*
*```yaml
* - type: connection
* value:
* - type: range
* key: temperature
* range: 0.7~1.0
* step: 0.1
*```
*
*/
@SerialName("connection")
@Serializable
data class Connection(val value: List) : JobStrategy()
/**
* Repeat is a config of repeat times.
* for example:
*
*```yaml
* - type: repeat
* value: 3
*```
*/
@SerialName("repeat")
@Serializable
data class Repeat(val value: Int) : JobStrategy()
/**
* Represents a collection of data sources.
*
*```yaml
* - type: datasource-collection
* value:
*```
*/
@SerialName("datasource-collection")
@Serializable
data class DatasourceCollection(val value: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy