feat: publish v1.0.0-rc.36-custom.1
This commit is contained in:
commit
3a7e8f3b54
2381 files changed
+551494
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package constant
|
||||
|
||||
type TaskPlatform string
|
||||
|
||||
const (
|
||||
TaskPlatformSuno TaskPlatform = "suno"
|
||||
TaskPlatformMidjourney = "mj"
|
||||
)
|
||||
|
||||
const (
|
||||
TaskActionImageToVideo = "image_to_video"
|
||||
TaskActionTextToVideo = "text_to_video"
|
||||
TaskActionFirstTailToVideo = "first_tail_to_video"
|
||||
TaskActionReferenceToVideo = "reference_to_video"
|
||||
TaskActionRemix = "remix"
|
||||
)
|
||||
|
||||
var legacyTaskActionAliases = map[string]string{
|
||||
"generate": TaskActionImageToVideo,
|
||||
"textGenerate": TaskActionTextToVideo,
|
||||
"firstTailGenerate": TaskActionFirstTailToVideo,
|
||||
"referenceGenerate": TaskActionReferenceToVideo,
|
||||
"remixGenerate": TaskActionRemix,
|
||||
}
|
||||
|
||||
// TaskPluginEnabled is the master switch for the whole task-plugin system.
|
||||
// When disabled, factory and override plugins both stop serving.
|
||||
var TaskPluginEnabled = true
|
||||
|
||||
// NormalizeTaskAction maps persisted legacy action names to the canonical task
|
||||
// action vocabulary. Unknown platform-specific actions pass through unchanged.
|
||||
func NormalizeTaskAction(action string) string {
|
||||
if canonical, ok := legacyTaskActionAliases[action]; ok {
|
||||
return canonical
|
||||
}
|
||||
return action
|
||||
}
|
||||
Reference in new issue
Block a user