【增加】AI 写作:支持撰写

This commit is contained in:
xiaoxin
2024-07-03 10:52:41 +08:00
parent aa4c1cb268
commit 77ead4859c
9 changed files with 207 additions and 27 deletions

View File

@ -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 对话异常!");
}

View File

@ -7,7 +7,7 @@ import lombok.Getter;
import java.util.Arrays;
/**
* AI 音乐状态的枚举
* AI 音乐生成模式的枚举
*
* @author xiaoxin
*/

View File

@ -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;
}
}