getOrCreate(String cacheName);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/core/enums/ConversationStatusEnum.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.core.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 会话状态枚举
8 | *
9 | * @author fxz
10 | * @date 2025-10-18
11 | */
12 | @Getter
13 | @AllArgsConstructor
14 | public enum ConversationStatusEnum {
15 |
16 | /**
17 | * 活跃中
18 | */
19 | ACTIVE("active", "活跃中"),
20 |
21 | /**
22 | * 已归档
23 | */
24 | ARCHIVED("archived", "已归档"),
25 |
26 | /**
27 | * 已删除
28 | */
29 | DELETED("deleted", "已删除");
30 |
31 | /**
32 | * 状态码
33 | */
34 | private final String code;
35 |
36 | /**
37 | * 状态描述
38 | */
39 | private final String desc;
40 |
41 | /**
42 | * 根据code获取枚举
43 | * @param code 状态码
44 | * @return 枚举
45 | */
46 | public static ConversationStatusEnum fromCode(String code) {
47 | for (ConversationStatusEnum status : values()) {
48 | if (status.getCode().equals(code)) {
49 | return status;
50 | }
51 | }
52 | throw new IllegalArgumentException("Unknown conversation status code: " + code);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/service/model/runtime/protocol/ModelProtocolHandler.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.service.model.runtime.protocol;
2 |
3 | import com.art.ai.core.constants.AiModelCapability;
4 | import com.art.ai.service.model.support.AiModelInvokeOptions;
5 | import com.art.ai.service.model.support.AiModelRuntimeContext;
6 | import dev.langchain4j.model.chat.ChatModel;
7 | import dev.langchain4j.model.embedding.EmbeddingModel;
8 |
9 | /**
10 | * 模型协议处理器
11 | *
12 | * @author fxz
13 | */
14 | public interface ModelProtocolHandler {
15 |
16 | boolean supports(AiModelRuntimeContext context, AiModelCapability capability);
17 |
18 | default ChatModel createChatModel(AiModelRuntimeContext context, AiModelInvokeOptions options) {
19 | throw new UnsupportedOperationException("ChatModel creation is not supported by this handler");
20 | }
21 |
22 | default EmbeddingModel createEmbeddingModel(AiModelRuntimeContext context, AiModelInvokeOptions options) {
23 | throw new UnsupportedOperationException("EmbeddingModel creation is not supported by this handler");
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/core/dto/AiWorkflowsDTO.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.core.dto;
2 |
3 | import com.art.mybatis.common.base.BaseCreateEntity;
4 | import io.swagger.v3.oas.annotations.media.Schema;
5 | import lombok.Data;
6 |
7 | /**
8 | * @author fxz
9 | * @date 2025-07-31
10 | */
11 | @Schema(title = "")
12 | @Data
13 | public class AiWorkflowsDTO extends BaseCreateEntity {
14 |
15 | private static final long serialVersionUID = -1L;
16 |
17 | @Schema(description = "主键")
18 | private Long id;
19 |
20 | @Schema(description = "应用id")
21 | private Long appId;
22 |
23 | @Schema(description = "流程类型")
24 | private String type;
25 |
26 | @Schema(description = "流程版本")
27 | private String version;
28 |
29 | @Schema(description = "图信息")
30 | private String graph;
31 |
32 | @Schema(description = "流程配置")
33 | private String features;
34 |
35 | @Schema(description = "环境变量")
36 | private String environmentVariables;
37 |
38 | @Schema(description = "会话变量")
39 | private String conversationVariables;
40 |
41 | @Schema(description = "租户id")
42 | private Long tenantId;
43 |
44 | }
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/service/model/runtime/protocol/StreamingModelProtocolHandler.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.service.model.runtime.protocol;
2 |
3 | import com.art.ai.core.constants.AiModelCapability;
4 | import com.art.ai.service.model.support.AiModelInvokeOptions;
5 | import com.art.ai.service.model.support.AiModelRuntimeContext;
6 | import dev.langchain4j.model.chat.StreamingChatModel;
7 |
8 | /**
9 | * Streaming 模型协议处理器
10 | *
11 | *
12 | * 用于在运行时根据模型协议创建 {@link StreamingChatModel}。
13 | *
14 | *
15 | * @author fxz
16 | */
17 | public interface StreamingModelProtocolHandler {
18 |
19 | /**
20 | * 判断当前处理器是否支持给定能力的上下文。
21 | * @param context 模型运行时上下文
22 | * @param capability 模型能力
23 | * @return 是否支持
24 | */
25 | boolean supports(AiModelRuntimeContext context, AiModelCapability capability);
26 |
27 | /**
28 | * 创建流式聊天模型。
29 | * @param context 模型运行时上下文
30 | * @param options 调用参数
31 | * @return {@link StreamingChatModel}
32 | */
33 | StreamingChatModel createStreamingChatModel(AiModelRuntimeContext context, AiModelInvokeOptions options);
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/art-framework/art-framework-job/art-job-sdk-quartz/src/main/java/com/art/job/sdk/job/ArtJob.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.job.sdk.job;
18 |
19 | /**
20 | * 干活的
21 | *
22 | * @author Fxz
23 | * @version 0.0.1
24 | * @date 2022/12/7 11:51
25 | */
26 | public interface ArtJob {
27 |
28 | /**
29 | * 任务逻辑
30 | * @param parameter 方法执行所需参数
31 | */
32 | void execute(String parameter);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/art-server/art-server-z-demos/src/test/java/com/art/demos/mapstruct/vo/ArtVO.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.demos.mapstruct.vo;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * @author Fxz
23 | * @version 0.0.1
24 | * @date 2022/11/22 21:15
25 | */
26 | @Data
27 | public class ArtVO {
28 |
29 | private Long userId;
30 |
31 | private String userName;
32 |
33 | private String value;
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/art-framework/art-spring-boot-starter-sequence/src/main/java/com/art/common/sequence/exception/SeqException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.common.sequence.exception;
18 |
19 | /**
20 | * @author Fxz
21 | * @version 0.0.1
22 | * @date 2022/5/23 09:40
23 | */
24 | public class SeqException extends RuntimeException {
25 |
26 | public SeqException(String message) {
27 | super(message);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/core/convert/AiWorkflowRuntimeConvert.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.core.convert;
2 |
3 | import com.art.ai.core.dto.AiWorkflowRuntimeDTO;
4 | import com.art.ai.core.dto.AiWorkflowsDTO;
5 | import com.art.ai.dao.dataobject.AiWorkflowRuntimeDO;
6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 | import org.mapstruct.Mapper;
8 | import org.mapstruct.factory.Mappers;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | * @author fxz
14 | * @date 2025-08-09
15 | */
16 | @Mapper
17 | public interface AiWorkflowRuntimeConvert {
18 |
19 | AiWorkflowRuntimeConvert INSTANCE = Mappers.getMapper(AiWorkflowRuntimeConvert.class);
20 |
21 | Page convertPage(Page aiWorkflowRuntimeDO);
22 |
23 | List convertList(List aiWorkflowRuntimeDO);
24 |
25 | AiWorkflowRuntimeDTO convert(AiWorkflowRuntimeDO aiWorkflowRuntimeDO);
26 |
27 | AiWorkflowRuntimeDTO convert(AiWorkflowsDTO aiWorkflowsDTO);
28 |
29 | AiWorkflowRuntimeDO convert(AiWorkflowRuntimeDTO aiWorkflowRuntimeDTO);
30 |
31 | }
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/core/dto/AiWorkflowRuntimeDTO.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.core.dto;
2 |
3 | import com.art.ai.service.workflow.runtime.WorkFlowStatus;
4 | import com.art.mybatis.common.base.BaseCreateEntity;
5 | import io.swagger.v3.oas.annotations.media.Schema;
6 | import lombok.Data;
7 |
8 | import java.io.Serial;
9 |
10 | /**
11 | * @author fxz
12 | * @date 2025-08-09
13 | */
14 | @Schema(title = "")
15 | @Data
16 | public class AiWorkflowRuntimeDTO extends BaseCreateEntity {
17 |
18 | @Serial
19 | private static final long serialVersionUID = -1L;
20 |
21 | @Schema(description = "主键")
22 | private Long id;
23 |
24 | @Schema(description = "应用id")
25 | private Long appId;
26 |
27 | @Schema(description = "工作流主键")
28 | private Long workflowId;
29 |
30 | @Schema(description = "流程入参")
31 | private String input;
32 |
33 | @Schema(description = "流程出参")
34 | private String output;
35 |
36 | @Schema(description = "执行状态")
37 | private Integer status = WorkFlowStatus.WORKFLOW_PROCESS_STATUS_CREATE;
38 |
39 | @Schema(description = "状态描述")
40 | private String statusRemark;
41 |
42 | }
--------------------------------------------------------------------------------
/art-server/art-server-generate/src/main/resources/codegen/template/java/service.java.vm:
--------------------------------------------------------------------------------
1 | package com.art.${module}.service;
2 |
3 | import com.baomidou.mybatisplus.core.metadata.IPage;
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 | import com.baomidou.mybatisplus.extension.service.IService;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * ${comments}
11 | * @author ${author}
12 | * @date ${datetime}
13 | */
14 | public interface ${className}Service {
15 |
16 | /**
17 | * 添加
18 | */
19 | Boolean add${className}(${className}DTO ${classname}DTO);
20 |
21 | /**
22 | * 修改
23 | */
24 | Boolean update${className}(${className}DTO ${classname}DTO);
25 |
26 | /**
27 | * 分页
28 | */
29 | IPage<${className}DTO> page${className}(${className}PageDTO ${classname}PageDTO);
30 |
31 | /**
32 | * 获取单条
33 | */
34 | ${className}DTO findById(Long id);
35 |
36 | /**
37 | * 获取全部
38 | */
39 | List<${className}DTO> findAll();
40 |
41 | /**
42 | * 删除
43 | */
44 | Boolean delete${className}(Long id);
45 |
46 | }
--------------------------------------------------------------------------------
/art-framework/art-framework-message-queue/art-message-queue-sdk-hazelcast/src/main/java/com/art/mq/sdk/support/group/HazelcastGroupMessage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.mq.sdk.support.group;
18 |
19 | import com.art.mq.common.message.AbstractGroupMessage;
20 |
21 | /**
22 | * Hazelcast 消费组消息 抽象类
23 | *
24 | * @author fxz
25 | */
26 | public abstract class HazelcastGroupMessage extends AbstractGroupMessage {
27 |
28 | }
--------------------------------------------------------------------------------
/art-framework/art-framework-message-queue/art-message-queue-sdk-redis/src/main/java/com/art/mq/sdk/support/group/RedisGroupMessage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.mq.sdk.support.group;
18 |
19 | import com.art.mq.common.message.AbstractGroupMessage;
20 |
21 | /**
22 | * Redis Stream Message 抽象类
23 | *
24 | * @author fxz
25 | */
26 | public abstract class RedisGroupMessage extends AbstractGroupMessage {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/NodeReferenceParameter.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.service.workflow.domain.node;
2 |
3 | import com.art.ai.service.workflow.variable.VariableType;
4 |
5 | /**
6 | * @author fxz
7 | * @since 2025/8/11 22:36
8 | */
9 | public record NodeReferenceParameter(String nodeId, String parameterName, VariableType variableType) {
10 |
11 | public NodeReferenceParameter {
12 | if (nodeId == null || nodeId.isBlank()) {
13 | throw new IllegalArgumentException("Node ID cannot be null or blank");
14 | }
15 | if (parameterName == null || parameterName.isBlank()) {
16 | throw new IllegalArgumentException("Parameter name cannot be null or blank");
17 | }
18 | }
19 |
20 | /**
21 | * 格式化变量名
22 | */
23 | public String formatVariableName() {
24 | String type = variableType.getType();
25 | String paramName = parameterName;
26 | if (variableType == VariableType.NODE_OUTPUT) {
27 | return String.format("%s_%s_%s", type, nodeId, paramName);
28 | }
29 | else {
30 | return String.format("%s_%s_%s", type, type, paramName);
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/art-framework/art-base-core/art-core/src/main/java/com/art/core/common/constant/CityTypeEnum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.core.common.constant;
18 |
19 | /**
20 | * @author Fxz
21 | * @version 0.0.1
22 | * @date 2022/5/14 15:30
23 | */
24 | public enum CityTypeEnum {
25 |
26 | /**
27 | * 省
28 | */
29 | PROVINCE,
30 |
31 | /**
32 | * 市
33 | */
34 | CITY,
35 |
36 | /**
37 | * 区
38 | */
39 | AREA
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/core/constants/AiModelCapability.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.core.constants;
2 |
3 | import java.util.Arrays;
4 |
5 | /**
6 | * 模型类型
7 | *
8 | * @author fxz
9 | */
10 | public enum AiModelCapability {
11 |
12 | /**
13 | * 聊天或文本生成模型
14 | */
15 | CHAT,
16 |
17 | /**
18 | * 向量嵌入模型
19 | */
20 | EMBEDDING,
21 |
22 | /**
23 | * 重排序模型
24 | */
25 | RERANK,
26 |
27 | /**
28 | * 图像生成模型
29 | */
30 | IMAGE,
31 |
32 | /**
33 | * 音频模型
34 | */
35 | AUDIO;
36 |
37 | public static AiModelCapability fromCode(String code) {
38 | if (code == null) {
39 | return CHAT;
40 | }
41 |
42 | final String normalized = code.trim().toLowerCase();
43 | return Arrays.stream(values())
44 | .filter(item -> item.name().equalsIgnoreCase(normalized) || item.alias().equals(normalized))
45 | .findFirst()
46 | .orElse(CHAT);
47 | }
48 |
49 | private String alias() {
50 | return switch (this) {
51 | case CHAT -> "llm";
52 | case EMBEDDING -> "vector";
53 | case RERANK -> "rerank";
54 | case IMAGE -> "image";
55 | case AUDIO -> "audio";
56 | };
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/art-server/art-server-system/src/main/java/com/art/system/core/ThirdTypeEnums.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.system.core;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Getter;
21 |
22 | /**
23 | * @author fxz
24 | * @version 0.0.1
25 | * @date 2023/4/17 11:44
26 | */
27 | @AllArgsConstructor
28 | public enum ThirdTypeEnums {
29 |
30 | GITEE("gitee");
31 |
32 | @Getter
33 | private String value;
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/art-framework/art-framework-message-queue/art-message-queue-sdk-redis/src/main/java/com/art/mq/sdk/interceptor/RedisMessageInterceptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * COPYRIGHT (C) 2023 Art AUTHORS(fxzcloud@gmail.com). ALL RIGHTS RESERVED.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.art.mq.sdk.interceptor;
18 |
19 | import com.art.mq.common.support.MessageQueueInterceptor;
20 |
21 | /**
22 | * @author Fxz
23 | * @version 0.0.1
24 | * @date 2022/6/30 16:12
25 | */
26 | public interface RedisMessageInterceptor extends MessageQueueInterceptor {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentResponseRoute.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.service.agent.runtime;
2 |
3 | import com.art.ai.core.constants.ModelFeature;
4 | import com.art.ai.dao.dataobject.AiModelDO;
5 | import com.art.ai.service.workflow.domain.node.llm.strategy.StructuredOutputStrategy;
6 | import com.art.ai.service.workflow.domain.node.llm.strategy.StructuredOutputStrategySelector;
7 | import lombok.Getter;
8 |
9 | /**
10 | * Agent 输出路由
11 | *
12 | * @author fxz
13 | */
14 | @Getter
15 | public enum AgentResponseRoute {
16 |
17 | FUNCTION_CALL,
18 |
19 | STRUCTURED,
20 |
21 | JSON_MODE,
22 |
23 | PROMPT_JSON;
24 |
25 | public static AgentResponseRoute select(AiModelDO model) {
26 | if (model == null) {
27 | return PROMPT_JSON;
28 | }
29 | if (model.hasFeature(ModelFeature.FUNCTION_CALL)) {
30 | return FUNCTION_CALL;
31 | }
32 | StructuredOutputStrategy strategy = StructuredOutputStrategySelector.select(model);
33 | return switch (strategy) {
34 | case NATIVE -> STRUCTURED;
35 | case JSON_MODE -> JSON_MODE;
36 | case PROMPT -> PROMPT_JSON;
37 | };
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/NodeConstants.java:
--------------------------------------------------------------------------------
1 | package com.art.ai.service.workflow.domain.node;
2 |
3 | /**
4 | * @author fxz
5 | * @since 2025/8/10 14:55
6 | */
7 | public interface NodeConstants {
8 |
9 | /**
10 | * 开始节点
11 | */
12 | String START_NODE = "start";
13 |
14 | /**
15 | * 模版渲染节点
16 | */
17 | String TEMPLATE_RENDER_NODE = "template";
18 |
19 | /**
20 | * LLM 节点
21 | */
22 | String LLM_NODE = "llm";
23 |
24 | /**
25 | * 大模型答案节点
26 | */
27 | String LLM_ANSWER_NODE = "llm_answer";
28 |
29 | /**
30 | * 代码执行节点
31 | */
32 | String CODE_NODE = "code";
33 |
34 | /**
35 | * 条件判断节点
36 | */
37 | String CONDITION_NODE = "condition";
38 |
39 | /**
40 | * 结束节点
41 | */
42 | String OUTPUT_NODE = "output";
43 |
44 | /**
45 | * 直接回复节点
46 | */
47 | String DIRECT_REPLY = "direct_reply";
48 |
49 | /**
50 | * HTTP 请求节点
51 | */
52 | String HTTP_NODE = "http";
53 |
54 | /**
55 | * 知识库检索节点
56 | */
57 | String KNOWLEDGE_RETRIEVAL_NODE = "knowledge";
58 |
59 | /**
60 | * 变量替换
61 | */
62 | String VARIABLE_REPLACE_NODE = "variable";
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/art-server/art-server-generate/src/main/resources/codegen/template/vue3/index.ts.vm:
--------------------------------------------------------------------------------
1 | import {defHttp} from '/@/utils/http/axios'
2 | import {PageResult} from '/#/axios'
3 | import {${className}DTO} from './types'
4 |
5 | /**
6 | * 分页
7 | */
8 | export function page(params) {
9 | return defHttp.get>({
10 | url: '${classname}/page',
11 | params,
12 | })
13 | }
14 |
15 | /**
16 | * 获取单条
17 | */
18 | export function get(id) {
19 | return defHttp.get<${className}DTO>({
20 | url: '${classname}/findById',
21 | params: { id },
22 | })
23 | }
24 |
25 | /**
26 | * 修改
27 | */
28 | export function update(data: ${className}DTO) {
29 | return defHttp.post<${className}DTO>({
30 | url: '${classname}/update',
31 | data,
32 | })
33 | }
34 |
35 | /**
36 | * 保存
37 | */
38 | export function add(data: ${className}DTO) {
39 | return defHttp.post<${className}DTO>({
40 | url: '${classname}/add',
41 | data,
42 | })
43 | }
44 |
45 | /**
46 | * 删除
47 | */
48 | export function del(id) {
49 | return defHttp.delete<${className}DTO>({
50 | url: `${classname}/delete?id=${id}`,
51 | })
52 | }
--------------------------------------------------------------------------------