mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 23:45:08 +08:00
【增加】AI 写作:支持撰写
This commit is contained in:
@ -42,4 +42,9 @@ public interface ErrorCodeConstants {
|
||||
// ========== API 音乐 1-040-006-000 ==========
|
||||
ErrorCode MUSIC_NOT_EXISTS = new ErrorCode(1_022_006_000, "音乐不存在!");
|
||||
|
||||
|
||||
// ========== API 写作 1-022-007-000 ==========
|
||||
ErrorCode WRITE_NOT_EXISTS = new ErrorCode(1_022_007_000, "作文不存在!");
|
||||
ErrorCode WRITE_STREAM_ERROR = new ErrorCode(1_022_07_001, "Stream 对话异常!");
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import lombok.Getter;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* AI 音乐状态的枚举
|
||||
* AI 音乐生成模式的枚举
|
||||
*
|
||||
* @author xiaoxin
|
||||
*/
|
||||
|
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.ai.enums.write;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* AI 写作类型的枚举
|
||||
*
|
||||
* @author xiaoxin
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum AiWriteTypeEnum implements IntArrayValuable {
|
||||
|
||||
DESCRIPTION(1, "撰写"),
|
||||
LYRIC(2, "回复");
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 类型名
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AiWriteTypeEnum::getType).toArray();
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user