1. 替换原始 code 签名
2. 服务与模块生成器,支持指定起始端口批量端口分配
(cherry picked from commit e99da38fd4)
This commit is contained in:
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* AI 模型类型的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication(exclude = {
|
||||
org.springframework.ai.autoconfigure.vectorstore.qdrant.QdrantVectorStoreAutoConfiguration.class,
|
||||
|
||||
@@ -15,7 +15,7 @@ import lombok.NoArgsConstructor;
|
||||
/**
|
||||
* AI API 秘钥 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("ai_api_key")
|
||||
@KeySequence("ai_chat_conversation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -15,7 +15,7 @@ import lombok.NoArgsConstructor;
|
||||
/**
|
||||
* AI 工具 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("ai_tool")
|
||||
@KeySequence("ai_tool_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* AI 聊天对话 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Mapper
|
||||
public interface AiChatConversationMapper extends BaseMapperX<AiChatConversationDO> {
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* AI API 密钥 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Mapper
|
||||
public interface AiApiKeyMapper extends BaseMapperX<AiApiKeyDO> {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* AI 工具 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Mapper
|
||||
public interface AiToolMapper extends BaseMapperX<AiToolDO> {
|
||||
|
||||
@@ -121,7 +121,7 @@ import static org.springframework.ai.retry.RetryUtils.DEFAULT_RETRY_TEMPLATE;
|
||||
/**
|
||||
* AI Model 模型工厂的实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class AiModelFactoryImpl implements AiModelFactory {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import reactor.core.publisher.Flux;
|
||||
/**
|
||||
* 百川 {@link ChatModel} 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 属于 ai 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
package cn.iocoder.yudao.module.ai.framework;
|
||||
|
||||
@@ -9,7 +9,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
/**
|
||||
* AI 知识库段落搜索 Request BO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class AiKnowledgeSegmentSearchReqBO {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* AI 知识库段落搜索 Response BO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class AiKnowledgeSegmentSearchRespBO {
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* AI API 密钥 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface AiApiKeyService {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.API_KEY_NOT_EX
|
||||
/**
|
||||
* AI API 密钥 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* AI 工具 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface AiToolService {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import static cn.iocoder.yudao.module.ai.enums.ErrorCodeConstants.TOOL_NOT_EXIST
|
||||
/**
|
||||
* AI 工具 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -24,7 +24,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* 工具:列出指定目录的文件列表
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component("directory_list")
|
||||
public class DirectoryListToolFunction implements Function<DirectoryListToolFunction.Request, DirectoryListToolFunction.Response> {
|
||||
|
||||
@@ -19,7 +19,7 @@ import static cn.hutool.core.date.DatePattern.NORM_DATETIME_PATTERN;
|
||||
/**
|
||||
* 工具:查询指定城市的天气信息
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component("weather_query")
|
||||
public class WeatherQueryToolFunction
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Set;
|
||||
/**
|
||||
* Spring AI 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class AiUtils {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import static org.springframework.ai.autoconfigure.azure.openai.AzureOpenAiChatP
|
||||
/**
|
||||
* {@link AzureOpenAiChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class AzureOpenAIChatModelTests {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link BaiChuanChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class BaiChuanChatModelTests {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
/**
|
||||
* 基于 {@link OpenAiChatModel} 集成 Coze 测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class CozeChatModelTests {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link DeepSeekChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class DeepSeekChatModelTests {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
/**
|
||||
* 基于 {@link OpenAiChatModel} 集成 Dify 测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class DifyChatModelTests {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link DouBaoChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class DouBaoChatModelTests {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
/**
|
||||
* 基于 {@link OpenAiChatModel} 集成 FastGPT 测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class FastGPTChatModelTests {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link HunYuanChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class HunYuanChatModelTests {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link OllamaChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class LlamaChatModelTests {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link MiniMaxChatModel} 的集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class MiniMaxChatModelTests {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link MoonshotChatModel} 的集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class MoonshotChatModelTests {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link OllamaChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class OllamaChatModelTests {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link OpenAiChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class OpenAIChatModelTests {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link SiliconFlowChatModel} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class SiliconFlowChatModelTests {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link ZhiPuAiChatModel} 的集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class ZhiPuAiChatModelTests {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link MidjourneyApi} 集成测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class MidjourneyApiTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user