├── _other ├── db │ └── README.md └── docker │ ├── README.md │ └── optional │ ├── pgvector │ └── docker-compose.yml │ ├── minio │ └── docker-compose.yml │ └── neo4j │ └── docker-compose.yml ├── art-auth ├── src │ └── test │ │ └── java │ │ └── com │ │ └── art │ │ └── auth │ │ └── FxzAuthApplicationTests.java └── Dockerfile ├── art-gateway ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── art │ │ │ └── gateway │ │ │ └── FxzGatewayApplicationTests.java │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── art │ │ └── gateway │ │ └── listener │ │ ├── RouteMessage.java │ │ └── RouteConfDTO.java └── Dockerfile ├── art-server ├── art-server-generate │ └── src │ │ └── main │ │ ├── resources │ │ ├── generator.yml │ │ ├── codegen │ │ │ └── template │ │ │ │ ├── vue3 │ │ │ │ ├── types.ts.vm │ │ │ │ └── index.ts.vm │ │ │ │ ├── java │ │ │ │ ├── mapper.java.vm │ │ │ │ ├── entity.java.vm │ │ │ │ ├── dto.java.vm │ │ │ │ ├── convert.java.vm │ │ │ │ ├── page.java.vm │ │ │ │ └── service.java.vm │ │ │ │ └── vue2 │ │ │ │ └── template.js.vm │ │ ├── application.yml │ │ └── mapper │ │ │ └── DatasourceConfMapper.xml │ │ └── java │ │ └── com │ │ └── art │ │ └── gen │ │ └── core │ │ └── dto │ │ └── DataBaseTablePageDTO.java ├── art-server-z-demos │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── art │ │ │ │ └── demos │ │ │ │ └── core │ │ │ │ └── http │ │ │ │ └── feign │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── com │ │ └── art │ │ └── demos │ │ └── mapstruct │ │ └── vo │ │ └── ArtVO.java ├── art-ai │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── art │ │ │ └── ai │ │ │ ├── service │ │ │ ├── workflow │ │ │ │ ├── Workflow.java │ │ │ │ ├── variable │ │ │ │ │ ├── ConversationVariableWriteMode.java │ │ │ │ │ ├── VariableDataType.java │ │ │ │ │ ├── SystemVariableKey.java │ │ │ │ │ └── VariableType.java │ │ │ │ ├── domain │ │ │ │ │ ├── edge │ │ │ │ │ │ ├── EdgeValue.java │ │ │ │ │ │ └── EdgeMapping.java │ │ │ │ │ └── node │ │ │ │ │ │ ├── variable │ │ │ │ │ │ ├── AssignmentSourceType.java │ │ │ │ │ │ ├── AssignmentSource.java │ │ │ │ │ │ └── ConversationVariableAssignment.java │ │ │ │ │ │ ├── NodeInputVariable.java │ │ │ │ │ │ ├── reply │ │ │ │ │ │ └── DirectReplyNodeConfig.java │ │ │ │ │ │ ├── code │ │ │ │ │ │ └── CodeNodeConfig.java │ │ │ │ │ │ ├── llm │ │ │ │ │ │ ├── config │ │ │ │ │ │ │ ├── JsonSchemaConfig.java │ │ │ │ │ │ │ ├── WindowConfig.java │ │ │ │ │ │ │ ├── StructuredOutputConfig.java │ │ │ │ │ │ │ └── MemoryConfig.java │ │ │ │ │ │ └── strategy │ │ │ │ │ │ │ └── StructuredOutputStrategy.java │ │ │ │ │ │ ├── NodeConfig.java │ │ │ │ │ │ ├── start │ │ │ │ │ │ ├── StartNodeConfig.java │ │ │ │ │ │ └── StartNodeDataProcessor.java │ │ │ │ │ │ ├── output │ │ │ │ │ │ └── OutputNodeConfig.java │ │ │ │ │ │ ├── NodeStatus.java │ │ │ │ │ │ ├── NodeOutputVariable.java │ │ │ │ │ │ ├── condition │ │ │ │ │ │ └── ConditionNodeConfig.java │ │ │ │ │ │ ├── knowledge │ │ │ │ │ │ └── KnowledgeNodeConfig.java │ │ │ │ │ │ ├── NodeProcessResult.java │ │ │ │ │ │ ├── NodeReferenceParameter.java │ │ │ │ │ │ └── NodeConstants.java │ │ │ │ ├── callback │ │ │ │ │ ├── Callback.java │ │ │ │ │ ├── CallbackResult.java │ │ │ │ │ └── CallbackData.java │ │ │ │ ├── runtime │ │ │ │ │ ├── WorkFlowStatus.java │ │ │ │ │ └── WorkflowRuntimeService.java │ │ │ │ ├── NodeState.java │ │ │ │ ├── dsl │ │ │ │ │ └── GraphDSL.java │ │ │ │ └── WorkFlowContext.java │ │ │ ├── dataset │ │ │ │ └── rag │ │ │ │ │ ├── constant │ │ │ │ │ ├── EmbedStoreTypeConstants.java │ │ │ │ │ ├── KnowledgeConstants.java │ │ │ │ │ ├── GraphStatusEnum.java │ │ │ │ │ └── EmbeddingStatusEnum.java │ │ │ │ │ ├── graph │ │ │ │ │ ├── entity │ │ │ │ │ │ ├── GraphEntityDesc.java │ │ │ │ │ │ ├── GraphExtractionInfo.java │ │ │ │ │ │ ├── GraphEdgeAddInfo.java │ │ │ │ │ │ ├── GraphEdgeEditInfo.java │ │ │ │ │ │ ├── GraphEntityRelation.java │ │ │ │ │ │ ├── GraphExtraction.java │ │ │ │ │ │ ├── GraphVertexUpdateInfo.java │ │ │ │ │ │ ├── GraphSearchCondition.java │ │ │ │ │ │ ├── GraphEdgeSearch.java │ │ │ │ │ │ ├── GraphVertex.java │ │ │ │ │ │ ├── GraphVertexSearch.java │ │ │ │ │ │ └── GraphEdge.java │ │ │ │ │ └── store │ │ │ │ │ │ └── config │ │ │ │ │ │ ├── Neo4jProperties.java │ │ │ │ │ │ └── Neo4jConfiguration.java │ │ │ │ │ ├── embedding │ │ │ │ │ └── entity │ │ │ │ │ │ ├── EmbeddingStoreConfig.java │ │ │ │ │ │ ├── EmbeddingModelConfig.java │ │ │ │ │ │ ├── DocumentSplitterConfig.java │ │ │ │ │ │ └── EmbeddingIngestParam.java │ │ │ │ │ ├── pipeline │ │ │ │ │ └── RetrievalPipeline.java │ │ │ │ │ ├── ner │ │ │ │ │ ├── RecognizedEntity.java │ │ │ │ │ └── EntitySource.java │ │ │ │ │ ├── fusion │ │ │ │ │ └── FusionService.java │ │ │ │ │ ├── rerank │ │ │ │ │ ├── Reranker.java │ │ │ │ │ └── RerankerFactory.java │ │ │ │ │ └── retrieval │ │ │ │ │ └── entity │ │ │ │ │ ├── RetrievalResult.java │ │ │ │ │ ├── RetrievalResponse.java │ │ │ │ │ └── RetrievalRequest.java │ │ │ ├── agent │ │ │ │ ├── runtime │ │ │ │ │ ├── dto │ │ │ │ │ │ ├── AgentControlPayload.java │ │ │ │ │ │ ├── AgentToolCallPayload.java │ │ │ │ │ │ ├── AgentPlanFunctionPayload.java │ │ │ │ │ │ ├── AgentPlanItemPayload.java │ │ │ │ │ │ ├── AgentPlanDecisionPayload.java │ │ │ │ │ │ ├── AgentFinalFunctionPayload.java │ │ │ │ │ │ ├── AgentToolDecisionPayload.java │ │ │ │ │ │ └── AgentFinalDecisionPayload.java │ │ │ │ │ ├── AgentPlanItemType.java │ │ │ │ │ ├── AgentPlanItemStatus.java │ │ │ │ │ ├── AgentPlanStatus.java │ │ │ │ │ ├── AgentToolCall.java │ │ │ │ │ ├── AgentUserInputException.java │ │ │ │ │ ├── AgentRuntimeException.java │ │ │ │ │ ├── AgentProgressCallback.java │ │ │ │ │ ├── AgentPlanItem.java │ │ │ │ │ ├── strategy │ │ │ │ │ │ └── AgentStrategy.java │ │ │ │ │ ├── AgentRunResult.java │ │ │ │ │ ├── AgentRunRequest.java │ │ │ │ │ ├── AgentStep.java │ │ │ │ │ ├── AgentToolSpecificationMapper.java │ │ │ │ │ ├── AgentProgressMessage.java │ │ │ │ │ └── AgentResponseRoute.java │ │ │ │ ├── tool │ │ │ │ │ ├── AgentTool.java │ │ │ │ │ ├── ToolArgumentDescriptor.java │ │ │ │ │ ├── AgentToolException.java │ │ │ │ │ ├── AgentToolRequest.java │ │ │ │ │ ├── AgentToolContext.java │ │ │ │ │ ├── AgentToolResult.java │ │ │ │ │ ├── ToolArgumentBinding.java │ │ │ │ │ └── AgentToolDefinition.java │ │ │ │ ├── spec │ │ │ │ │ └── AgentVersionGenerator.java │ │ │ │ └── AgentService.java │ │ │ ├── conversation │ │ │ │ └── variable │ │ │ │ │ └── ConversationVariableSnapshot.java │ │ │ ├── app │ │ │ │ └── AiAppService.java │ │ │ └── model │ │ │ │ ├── AiModelService.java │ │ │ │ ├── AiModelPlatformService.java │ │ │ │ └── runtime │ │ │ │ └── protocol │ │ │ │ ├── ModelProtocolRegistry.java │ │ │ │ ├── ModelProtocolHandler.java │ │ │ │ └── StreamingModelProtocolHandler.java │ │ │ ├── core │ │ │ ├── constants │ │ │ │ ├── DatasetsDataSourceConstants.java │ │ │ │ ├── DatasetsIndexTypeConstants.java │ │ │ │ ├── DatasetsPermissionConstants.java │ │ │ │ ├── AiQASourceTypeConstants.java │ │ │ │ ├── DocumentConstants.java │ │ │ │ ├── ModelFeature.java │ │ │ │ ├── ModelProtocolType.java │ │ │ │ └── AiModelCapability.java │ │ │ ├── dto │ │ │ │ ├── document │ │ │ │ │ ├── AiDocumentIndexDTO.java │ │ │ │ │ └── AiDocumentSegmentPageDTO.java │ │ │ │ ├── WorkflowRunDTO.java │ │ │ │ ├── conversation │ │ │ │ │ ├── SendMsgDTO.java │ │ │ │ │ ├── MessageQueryDTO.java │ │ │ │ │ ├── ConversationCreateDTO.java │ │ │ │ │ ├── ConversationQueryDTO.java │ │ │ │ │ ├── ConversationUpdateDTO.java │ │ │ │ │ └── AgentRunDTO.java │ │ │ │ ├── qa │ │ │ │ │ ├── AiQaSimilarQuestionDTO.java │ │ │ │ │ └── AiQaPairsPageDTO.java │ │ │ │ ├── AiAppDTO.java │ │ │ │ ├── dataset │ │ │ │ │ ├── AiDatasetsUploadDocDTO.java │ │ │ │ │ └── AiDocumentSegmentDTO.java │ │ │ │ ├── AiAgentPageDTO.java │ │ │ │ ├── AiAgentDTO.java │ │ │ │ ├── AiModelPlatformDTO.java │ │ │ │ ├── AiAppPageDTO.java │ │ │ │ ├── AiModelDTO.java │ │ │ │ ├── AiWorkflowsDTO.java │ │ │ │ └── AiWorkflowRuntimeDTO.java │ │ │ ├── sse │ │ │ │ └── SSEEventNameConstants.java │ │ │ ├── convert │ │ │ │ ├── KnowledgeRetrievalConvert.java │ │ │ │ ├── AiAppConvert.java │ │ │ │ ├── AiModelConvert.java │ │ │ │ ├── AiAgentConvert.java │ │ │ │ ├── AiQaSimilarQuestionConvert.java │ │ │ │ ├── AiQaPairsConvert.java │ │ │ │ ├── AiDatasetsConvert.java │ │ │ │ ├── AiWorkflowsConvert.java │ │ │ │ ├── AiDocumentsConvert.java │ │ │ │ ├── AiModelPlatformConvert.java │ │ │ │ ├── AiDocumentSegmentConvert.java │ │ │ │ ├── AiMessageConvert.java │ │ │ │ ├── AiConversationConvert.java │ │ │ │ └── AiWorkflowRuntimeConvert.java │ │ │ └── enums │ │ │ │ ├── MessageStatusEnum.java │ │ │ │ ├── MessageRoleEnum.java │ │ │ │ └── ConversationStatusEnum.java │ │ │ ├── dao │ │ │ ├── mysql │ │ │ │ ├── AiAppMapper.java │ │ │ │ ├── AiModelMapper.java │ │ │ │ ├── AiDatasetsMapper.java │ │ │ │ ├── AiDocumentsMapper.java │ │ │ │ ├── AiWorkflowsMapper.java │ │ │ │ ├── AiModelPlatformMapper.java │ │ │ │ ├── AiAgentMapper.java │ │ │ │ ├── AiDocumentSegmentMapper.java │ │ │ │ ├── AiQaPairsMapper.java │ │ │ │ ├── AiWorkflowRuntimeMapper.java │ │ │ │ ├── AiQaHitLogsMapper.java │ │ │ │ ├── AiConversationStateMapper.java │ │ │ │ ├── AiMessageMapper.java │ │ │ │ ├── AiQaSimilarQuestionsMapper.java │ │ │ │ └── AiConversationMapper.java │ │ │ └── dataobject │ │ │ │ ├── AiAppDO.java │ │ │ │ ├── AiConversationStateDO.java │ │ │ │ ├── AiDocumentSegmentDO.java │ │ │ │ ├── AiAgentDO.java │ │ │ │ └── AiWorkflowRuntimeDO.java │ │ │ ├── ArtAiApplication.java │ │ │ └── manager │ │ │ └── AiQaHitLogsManager.java │ │ └── resources │ │ ├── mapper │ │ ├── agent │ │ │ └── AiAgentMapper.xml │ │ └── conversation │ │ │ ├── AiConversationMapper.xml │ │ │ └── AiMessageMapper.xml │ │ └── application.yml ├── art-server-system │ ├── Dockerfile │ └── src │ │ └── main │ │ ├── resources │ │ ├── application.yml │ │ ├── mapper │ │ │ └── useRole │ │ │ │ └── UserRoleMapper.xml │ │ └── ValidationMessages.properties │ │ └── java │ │ └── com │ │ └── art │ │ └── system │ │ ├── service │ │ ├── UserRoleService.java │ │ └── RoleMenuService.java │ │ ├── dao │ │ └── mysql │ │ │ └── UserRoleMapper.java │ │ └── core │ │ └── ThirdTypeEnums.java └── art-server-scheduled │ └── src │ └── main │ └── resources │ └── application.yml ├── lombok.config ├── art-framework ├── art-framework-mybatis │ ├── art-spring-boot-starter-mp-encrypt │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── art-spring-boot-starter-mp │ │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-log │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-xss │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-doc │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-sequence │ └── src │ │ └── main │ │ ├── resources │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── java │ │ └── com │ │ └── art │ │ └── common │ │ └── sequence │ │ └── exception │ │ └── SeqException.java ├── art-spring-boot-starter-feign │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-file │ └── src │ │ └── main │ │ ├── resources │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── java │ │ └── com │ │ └── art │ │ └── common │ │ └── file │ │ └── core │ │ └── client │ │ └── local │ │ └── LocalProperties.java ├── art-spring-boot-starter-idempotent │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-tenant │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-framework-job │ ├── art-spring-boot-starter-job-xxl-job │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── art-spring-boot-starter-job-quartz │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── art-job-sdk-quartz │ │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── art │ │ └── job │ │ └── sdk │ │ └── job │ │ └── ArtJob.java ├── art-framework-json │ └── art-spring-boot-starter-jackson │ │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-framework-cache │ ├── art-spring-boot-starter-cache-redis │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── art-spring-boot-starter-cache-hazelcast │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── art-spring-boot-starter-cache-multi │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── art-cache-sdk-multi │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── art │ │ │ └── cache │ │ │ └── sdk │ │ │ └── package-info.java │ └── art-cache │ │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── art │ │ └── cache │ │ └── common │ │ └── DistributedCacheProvider.java ├── art-framework-redis │ ├── art-spring-boot-starter-redis │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── art-spring-boot-starter-redis-template │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── art-redis │ │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── art │ │ └── redis │ │ └── common │ │ └── event │ │ └── package-info.java ├── art-framework-message-queue │ ├── art-spring-boot-starter-message-queue-redis │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── art-spring-boot-starter-message-queue-hazelcast │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── art-message-queue-sdk-redis │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── art │ │ │ └── mq │ │ │ └── sdk │ │ │ ├── package-info.java │ │ │ ├── support │ │ │ └── group │ │ │ │ └── RedisGroupMessage.java │ │ │ └── interceptor │ │ │ └── RedisMessageInterceptor.java │ ├── art-message-queue-sdk-hazelcast │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── art │ │ │ └── mq │ │ │ └── sdk │ │ │ ├── package-info.java │ │ │ └── support │ │ │ └── group │ │ │ └── HazelcastGroupMessage.java │ └── art-message-queue │ │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── art │ │ └── mq │ │ └── common │ │ └── message │ │ └── AbstractMessage.java ├── art-framework-encrypt │ ├── art-spring-boot-starter-api-encrypt │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── art-api-sdk-encrypt │ │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── art │ │ └── api │ │ └── encrypt │ │ └── sdk │ │ └── constants │ │ └── EncryptType.java ├── art-framework-transactional │ └── art-spring-boot-starter-seata │ │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-framework-captcha │ ├── art-captcha-sdk-aj │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── images │ │ │ ├── pic-click │ │ │ │ ├── bg1.png │ │ │ │ ├── bg2.png │ │ │ │ ├── bg3.png │ │ │ │ ├── bg4.png │ │ │ │ ├── bg5.png │ │ │ │ ├── bg6.png │ │ │ │ ├── bg7.png │ │ │ │ ├── bg8.png │ │ │ │ └── bg9.png │ │ │ └── jigsaw │ │ │ │ ├── original │ │ │ │ ├── bg1.png │ │ │ │ ├── bg10.png │ │ │ │ ├── bg11.png │ │ │ │ ├── bg12.png │ │ │ │ ├── bg13.png │ │ │ │ ├── bg14.png │ │ │ │ ├── bg15.png │ │ │ │ ├── bg16.png │ │ │ │ ├── bg17.png │ │ │ │ ├── bg18.png │ │ │ │ ├── bg19.png │ │ │ │ ├── bg2.png │ │ │ │ ├── bg20.png │ │ │ │ ├── bg3.png │ │ │ │ ├── bg4.png │ │ │ │ ├── bg5.png │ │ │ │ ├── bg6.png │ │ │ │ ├── bg7.png │ │ │ │ ├── bg8.png │ │ │ │ └── bg9.png │ │ │ │ └── slidingBlock │ │ │ │ ├── 1.png │ │ │ │ ├── 2.png │ │ │ │ ├── 3.png │ │ │ │ ├── 4.png │ │ │ │ ├── 5.png │ │ │ │ ├── 6.png │ │ │ │ ├── 7.png │ │ │ │ ├── 8.png │ │ │ │ ├── 9.png │ │ │ │ ├── 10.png │ │ │ │ └── 11.png │ │ │ └── META-INF │ │ │ └── services │ │ │ └── com.anji.captcha.service.CaptchaCacheService │ └── art-spring-boot-starter-captcha-aj │ │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-framework-hazelcast │ └── art-spring-boot-starter-hazelcast │ │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-security │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-spring-boot-starter-data-permission │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── art-base-core │ ├── art-spring-boot-starter-core │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── spring │ │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ │ └── i18n │ │ │ └── messages_zh_CN.properties │ └── art-core │ │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── art │ │ └── core │ │ └── common │ │ ├── util │ │ └── CollectionUtil.java │ │ ├── model │ │ └── CityEntity.java │ │ └── constant │ │ └── CityTypeEnum.java ├── art-spring-boot-starter-redisson │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports └── art-spring-boot-starter-sensitive │ └── src │ └── main │ └── java │ └── com │ └── art │ └── common │ └── sensitive │ └── config │ └── package-info.java ├── art-api └── art-api-system │ └── src │ └── main │ └── java │ └── com │ └── art │ └── system │ └── api │ └── file │ └── FileServiceApi.java └── .gitignore /_other/db/README.md: -------------------------------------------------------------------------------- 1 | 请注意,使用内置的docker-compose文件会自动执行下列脚本,不需要手动导入数据库。 -------------------------------------------------------------------------------- /art-auth/src/test/java/com/art/auth/FxzAuthApplicationTests.java: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /art-gateway/src/test/java/com/art/gateway/FxzGatewayApplicationTests.java: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_other/docker/README.md: -------------------------------------------------------------------------------- 1 | 1: 请将本级目录下的所有文件上传至服务器。 2 | 3 | 2: 执行 docker-compose up -d 4 | 5 | 请注意,使用内置的docker-compose文件会自动执行sql脚本,不需要手动导入数据库。 -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/generator.yml: -------------------------------------------------------------------------------- 1 | # 代码生成 2 | gen: 3 | # 作者 4 | author: fxz 5 | #模块名 6 | module: system -------------------------------------------------------------------------------- /lombok.config: -------------------------------------------------------------------------------- 1 | config.stopBubbling=true 2 | lombok.accessors.chain=true 3 | lombok.tostring.callsuper=CALL 4 | lombok.equalsandhashcode.callsuper=CALL -------------------------------------------------------------------------------- /art-framework/art-framework-mybatis/art-spring-boot-starter-mp-encrypt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.log.config.LogAutoConfig -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-xss/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.xss.config.XssAutoConfig -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-doc/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.doc.config.DocAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-sequence/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.sequence.SequenceApplication -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-feign/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.feign.config.ArtFeignRetryAutoConfig -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.file.config.FileStorageAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-idempotent/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.Idempotent.IdempotentAutoConfig 2 | -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.tenant.config.ArtTenantAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-job/art-spring-boot-starter-job-xxl-job/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.xxlJob.config.XxlJobConfig -------------------------------------------------------------------------------- /art-server/art-server-z-demos/src/main/java/com/art/demos/core/http/feign/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 代码来自feign-core 茴字的6种写法 3 | * 4 | * @author fxz 5 | */ 6 | package com.art.demos.core.http.feign; -------------------------------------------------------------------------------- /art-framework/art-framework-job/art-spring-boot-starter-job-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.job.quartz.starter.QuartzJobAutoConfig -------------------------------------------------------------------------------- /art-framework/art-framework-json/art-spring-boot-starter-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.jackson.starter.JacksonConfiguration 2 | -------------------------------------------------------------------------------- /art-framework/art-framework-cache/art-spring-boot-starter-cache-redis/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.cache.starter.RedisCacheAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-mybatis/art-spring-boot-starter-mp/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.mp.config.MybatisPlusAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-redis/art-spring-boot-starter-redis/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.redis.starter.RedisKeyEventAutoConfiguration -------------------------------------------------------------------------------- /art-auth/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk-alpine 2 | VOLUME /tmp 3 | COPY ./target/art-auth.jar art-auth.jar 4 | # RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig 5 | ENTRYPOINT ["java","-jar","/art-auth.jar", "&"] -------------------------------------------------------------------------------- /art-framework/art-framework-message-queue/art-spring-boot-starter-message-queue-redis/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.mq.starter.RedisMqAutoConfig -------------------------------------------------------------------------------- /art-framework/art-framework-cache/art-spring-boot-starter-cache-hazelcast/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.cache.starter.HazelcastCacheAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-cache/art-spring-boot-starter-cache-multi/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.cache.starter.CacheRedisCaffeineAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-encrypt/art-spring-boot-starter-api-encrypt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.api.encrypt.starter.ApiEncryptAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-redis/art-spring-boot-starter-redis-template/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.redis.starter.RedisTemplateAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-transactional/art-spring-boot-starter-seata/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.seata.config.SeataAutoConfiguration 2 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/Workflow.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/8/9 19:57 6 | */ 7 | public record Workflow(String workflowId) { 8 | } 9 | -------------------------------------------------------------------------------- /art-framework/art-framework-message-queue/art-spring-boot-starter-message-queue-hazelcast/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.mq.starter.HazelcastMessageAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg1.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg2.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg3.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg4.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg5.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg6.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg7.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg8.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/pic-click/bg9.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg1.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg10.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg11.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg12.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg13.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg14.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg15.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg16.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg17.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg18.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg19.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg2.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg20.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg3.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg4.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg5.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg6.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg7.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg8.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/original/bg9.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/1.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/2.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/3.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/4.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/5.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/6.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/7.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/8.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/9.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/10.png -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/springboot4/Art/HEAD/art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/images/jigsaw/slidingBlock/11.png -------------------------------------------------------------------------------- /art-server/art-server-system/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk-alpine 2 | VOLUME /tmp 3 | COPY target/art-server-system.jar art-server-system.jar 4 | # RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig 5 | ENTRYPOINT ["java","-jar","/art-server-system.jar", "&"] -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-spring-boot-starter-captcha-aj/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.captcha.starter.AjCaptchaAutoConfiguration 2 | com.art.captcha.sdk.service.RedisCaptchaServiceImpl 3 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/constant/EmbedStoreTypeConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.constant; 2 | 3 | /** 4 | * @author fxz 5 | */ 6 | public interface EmbedStoreTypeConstants { 7 | 8 | String PGVECTOR = "pgvector"; 9 | 10 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/constants/DatasetsDataSourceConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.constants; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/10/1 21:26 6 | */ 7 | public interface DatasetsDataSourceConstants { 8 | 9 | String LOCAL = "local"; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/resources/mapper/agent/AiAgentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/codegen/template/vue3/types.ts.vm: -------------------------------------------------------------------------------- 1 | export type ${className}DTO = { 2 | 3 | #foreach ($column in $columns) 4 | /** 5 | * $column.comments 6 | */ 7 | $column.name?: $column.tsType 8 | #end 9 | 10 | } 11 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentControlPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | /** 4 | * Marker interface for control-function payloads. 5 | * 6 | * @author fxz 7 | */ 8 | public interface AgentControlPayload { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentPlanItemType.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | /** 4 | * 单个计划条目的类型。 5 | * 6 | * @author fxz 7 | */ 8 | public enum AgentPlanItemType { 9 | 10 | TOOL, 11 | 12 | MESSAGE, 13 | 14 | UNKNOWN 15 | 16 | } 17 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/conversation/variable/ConversationVariableSnapshot.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.conversation.variable; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * 会话变量快照 7 | */ 8 | public record ConversationVariableSnapshot(Map variables) { 9 | } 10 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/variable/ConversationVariableWriteMode.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.variable; 2 | 3 | /** 4 | * 会话变量写入模式 5 | * 6 | * @author fxz 7 | */ 8 | public enum ConversationVariableWriteMode { 9 | 10 | SET, 11 | 12 | MERGE 13 | 14 | } 15 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/edge/EdgeValue.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.edge; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/8/10 16:55 6 | */ 7 | public record EdgeValue(String id, String source, String target, String sourceHandle, String targetHandle) { 8 | } 9 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/variable/AssignmentSourceType.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.variable; 2 | 3 | /** 4 | * 值来源类型 5 | * 6 | * @author fxz 7 | */ 8 | public enum AssignmentSourceType { 9 | 10 | CONSTANT, 11 | 12 | REFERENCE 13 | 14 | } 15 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/callback/Callback.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.callback; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/8/11 13:03 6 | */ 7 | @FunctionalInterface 8 | public interface Callback { 9 | 10 | void execute(CallbackResult callbackResult); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /art-framework/art-framework-hazelcast/art-spring-boot-starter-hazelcast/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.hazelcast.starter.HazelcastServerAutoConfiguration 2 | com.art.hazelcast.starter.HazelcastClientAutoConfiguration 3 | com.art.hazelcast.starter.HazelcastBaseAutoConfiguration -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-security/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.security.core.config.ArtSecurityAutoConfigure 2 | com.art.common.security.core.config.ArtUserDetailServiceAutoConfigure 3 | com.art.common.security.core.config.WebMvcServerProtectConfigure -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/constants/DatasetsIndexTypeConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.constants; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/10/1 22:41 6 | */ 7 | public interface DatasetsIndexTypeConstants { 8 | 9 | String EMBEDDING = "EMBEDDING"; 10 | 11 | String GRAPH = "GRAPH"; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/constants/DatasetsPermissionConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.constants; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/10/1 21:26 6 | */ 7 | public interface DatasetsPermissionConstants { 8 | 9 | String PUBLIC = "public"; 10 | 11 | String PRIVATE = "private"; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/NodeInputVariable.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/8/10 15:09 6 | */ 7 | public record NodeInputVariable(String name, String dataType, boolean required, String description, 8 | String displayName) { 9 | } 10 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/constants/AiQASourceTypeConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.constants; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/10/12 16:14 6 | */ 7 | public interface AiQASourceTypeConstants { 8 | 9 | String MANUAL = "manual"; 10 | 11 | String LLM = "llm"; 12 | 13 | String IMPORT = "import"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/constants/DocumentConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.constants; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/10/2 13:56 6 | */ 7 | public interface DocumentConstants { 8 | 9 | String GRAPH_SEGMENT = "graph_segment"; 10 | 11 | String VECTOR_STORE_SEGMENT = "vector_store_segment"; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/document/AiDocumentIndexDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.document; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @author fxz 7 | * @since 2025/10/3 15:31 8 | */ 9 | @Data 10 | public class AiDocumentIndexDTO { 11 | 12 | private Long documentId; 13 | 14 | private String indexType; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-data-permission/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.dataPermission.config.DataPermissionAutoConfiguration 2 | com.art.common.dataPermission.dept.config.DeptDataPermissionAutoConfiguration 3 | com.art.common.dataPermission.dept.service.DeptDataPermissionService -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/codegen/template/java/mapper.java.vm: -------------------------------------------------------------------------------- 1 | package com.art.${module}.dao; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | 5 | /** 6 | * ${comments} 7 | * @author ${author} 8 | * @date ${datetime} 9 | */ 10 | @Mapper 11 | public interface ${className}Mapper extends BaseMapper<${className}DO> { 12 | } -------------------------------------------------------------------------------- /art-gateway/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk-alpine 2 | VOLUME /tmp 3 | COPY ./target/art-gateway.jar art-gateway.jar 4 | 5 | #openjdk比oraclejdk简化了一些功能,所以用docker打包的时候更小。 6 | #所以后端画的验证码所要用到java的awt组件就被简化了,就一堆的空指针无法初始化错误报出来。 7 | #需要在系统中安装FontConfig组件 8 | RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig 9 | 10 | ENTRYPOINT ["java","-jar","/art-gateway.jar", "&"] -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphEntityDesc.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import lombok.Getter; 4 | 5 | /** 6 | * @author fxz 7 | * @since 2025/9/16 20:03 8 | */ 9 | public record GraphEntityDesc(@Getter String entity, @Getter String type, @Getter String description) { 10 | } 11 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentPlanItemStatus.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | /** 4 | * 单个计划条目的执行状态。 5 | * 6 | * @author fxz 7 | */ 8 | public enum AgentPlanItemStatus { 9 | 10 | PENDING, 11 | 12 | IN_PROGRESS, 13 | 14 | WAITING_USER, 15 | 16 | DONE, 17 | 18 | FAILED, 19 | 20 | SKIPPED 21 | 22 | } 23 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphExtractionInfo.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import lombok.Getter; 4 | 5 | /** 6 | * @author fxz 7 | * @since 2025/9/16 20:17 8 | */ 9 | public record GraphExtractionInfo(@Getter GraphEntityDesc entityDesc, @Getter GraphEntityRelation entityRelation) { 10 | } 11 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphEdgeAddInfo.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class GraphEdgeAddInfo { 7 | 8 | private GraphEdge edge; 9 | 10 | private GraphSearchCondition sourceFilter; 11 | 12 | private GraphSearchCondition targetFilter; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphEdgeEditInfo.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class GraphEdgeEditInfo { 7 | 8 | private GraphEdge edge; 9 | 10 | private GraphSearchCondition sourceFilter; 11 | 12 | private GraphSearchCondition targetFilter; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /_other/docker/optional/pgvector/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | pgvector: 5 | image: pgvector/pgvector:pg16 6 | ports: 7 | - 5432:5432 8 | restart: always 9 | environment: 10 | - POSTGRES_DB=art 11 | - POSTGRES_USER=root 12 | - POSTGRES_PASSWORD=art-pgvector-password 13 | volumes: 14 | - ./pgdata:/var/lib/postgresql/data 15 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiAppMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiAppDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-07-25 10 | */ 11 | @Mapper 12 | public interface AiAppMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/AgentTool.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | /** 4 | * Agent 工具接口 5 | * 6 | * @author fxz 7 | * @since 2025-11-01 8 | */ 9 | public interface AgentTool { 10 | 11 | String name(); 12 | 13 | AgentToolDefinition definition(); 14 | 15 | AgentToolResult invoke(AgentToolRequest request) throws AgentToolException; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphEntityRelation.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import lombok.Getter; 4 | 5 | /** 6 | * @author fxz 7 | * @since 2025/9/16 20:14 8 | */ 9 | public record GraphEntityRelation(@Getter String sourceEntity, @Getter String targetEntity, @Getter String relation, 10 | @Getter String weight) { 11 | } 12 | -------------------------------------------------------------------------------- /art-framework/art-base-core/art-spring-boot-starter-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.core.config.BannerAutoConfiguration 2 | com.art.common.core.config.ExceptionAutoConfiguration 3 | com.art.common.core.config.MessageAutoConfiguration 4 | com.art.common.core.config.SerializeAutoConfiguration 5 | com.art.common.core.config.SpringAutoConfiguration -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiModelMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiModelDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-10-09 10 | */ 11 | @Mapper 12 | public interface AiModelMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentPlanStatus.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | /** 4 | * 计划整体生命周期状态。 5 | * 6 | * @author fxz 7 | */ 8 | public enum AgentPlanStatus { 9 | 10 | IDLE, 11 | 12 | PLANNING, 13 | 14 | ACTIVE, 15 | 16 | WAITING_USER, 17 | 18 | REPLAN_REQUESTED, 19 | 20 | HALTED, 21 | 22 | FAILED, 23 | 24 | COMPLETED 25 | 26 | } 27 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/callback/CallbackResult.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.callback; 2 | 3 | import lombok.Builder; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | /** 8 | * @author fxz 9 | */ 10 | @Builder 11 | @Getter 12 | @Setter 13 | public class CallbackResult { 14 | 15 | /** 16 | * 回调数据 具体的回调数据内容 17 | */ 18 | private CallbackData data; 19 | 20 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiDatasetsMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiDatasetsDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-09-07 10 | */ 11 | @Mapper 12 | public interface AiDatasetsMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/constants/ModelFeature.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.constants; 2 | 3 | /** 4 | * 模型特性 5 | * 6 | * @author fxz 7 | */ 8 | public enum ModelFeature { 9 | 10 | /** 11 | * 支持原生结构化输出 12 | */ 13 | STRUCTURED_OUTPUT_NATIVE, 14 | 15 | /** 16 | * 支持 JSON Mode 17 | */ 18 | JSON_MODE, 19 | 20 | /** 21 | * 支持 Function Call / 工具调用 22 | */ 23 | FUNCTION_CALL; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiDocumentsMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiDocumentsDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-09-09 10 | */ 11 | @Mapper 12 | public interface AiDocumentsMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiWorkflowsMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiWorkflowsDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-07-31 10 | */ 11 | @Mapper 12 | public interface AiWorkflowsMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiModelPlatformMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiModelPlatformDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-10-09 10 | */ 11 | @Mapper 12 | public interface AiModelPlatformMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/reply/DirectReplyNodeConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.reply; 2 | 3 | import com.art.ai.service.workflow.domain.node.NodeConfig; 4 | import lombok.Data; 5 | 6 | /** 7 | * @author fxz 8 | * @since 2025/10/23 13:16 9 | */ 10 | @Data 11 | public class DirectReplyNodeConfig extends NodeConfig { 12 | 13 | private String replyText; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/variable/VariableDataType.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.variable; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/8/10 15:10 6 | */ 7 | public interface VariableDataType { 8 | 9 | String STRING = "string"; 10 | 11 | String NUMBER = "number"; 12 | 13 | String BOOLEAN = "boolean"; 14 | 15 | String OBJECT = "object"; 16 | 17 | String ARRAY = "array"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiAgentMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiAgentDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Agent Mapper 9 | * 10 | * @author fxz 11 | * @since 2025-11-01 12 | */ 13 | @Mapper 14 | public interface AiAgentMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/constants/ModelProtocolType.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.constants; 2 | 3 | /** 4 | * 模型协议枚举 5 | * 6 | * @author fxz 7 | */ 8 | public enum ModelProtocolType { 9 | 10 | /** 11 | * OpenAI 兼容协议 12 | */ 13 | OPENAI_COMPATIBLE, 14 | 15 | /** 16 | * 厂商原生协议 17 | */ 18 | VENDOR_NATIVE; 19 | 20 | public boolean isOpenAiCompatible() { 21 | return this == OPENAI_COMPATIBLE; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiDocumentSegmentMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiDocumentSegmentDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-09-14 10 | */ 11 | @Mapper 12 | public interface AiDocumentSegmentMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiQaPairsMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiQaPairsDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * QA问答对Mapper 9 | * 10 | * @author fxz 11 | * @since 2025/10/12 12 | */ 13 | @Mapper 14 | public interface AiQaPairsMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiWorkflowRuntimeMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiWorkflowRuntimeDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author fxz 9 | * @date 2025-08-09 10 | */ 11 | @Mapper 12 | public interface AiWorkflowRuntimeMapper extends BaseMapper { 13 | 14 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/edge/EdgeMapping.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.edge; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author fxz 8 | * @since 2025/8/10 21:52 9 | */ 10 | public record EdgeMapping(String sourceNodeId, Map mapping) { 11 | public EdgeMapping(String sourceNodeId) { 12 | this(sourceNodeId, new HashMap<>()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/code/CodeNodeConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.code; 2 | 3 | import com.art.ai.service.workflow.domain.node.NodeConfig; 4 | import lombok.Data; 5 | 6 | /** 7 | * @author fxz 8 | * @since 2025/8/10 16:37 9 | */ 10 | @Data 11 | public class CodeNodeConfig extends NodeConfig { 12 | 13 | private String code; 14 | 15 | private String language; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiQaHitLogsMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiQaHitLogsDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * QA命中日志Mapper 9 | * 10 | * @author fxz 11 | * @since 2025/10/12 12 | */ 13 | @Mapper 14 | public interface AiQaHitLogsMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentToolCall.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import com.fasterxml.jackson.databind.JsonNode; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | /** 8 | * Agent 工具调用描述 9 | * 10 | * @author fxz 11 | */ 12 | @Data 13 | @Builder(toBuilder = true) 14 | public class AgentToolCall { 15 | 16 | private String name; 17 | 18 | private JsonNode arguments; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiConversationStateMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiConversationStateDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * 会话变量持久化访问层 9 | * 10 | * @author fxz 11 | */ 12 | @Mapper 13 | public interface AiConversationStateMapper extends BaseMapper { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphExtraction.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import dev.langchain4j.data.segment.TextSegment; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Getter; 6 | 7 | @AllArgsConstructor 8 | @Getter 9 | public class GraphExtraction { 10 | 11 | private TextSegment textSegment; 12 | 13 | private Long segmentId; 14 | 15 | private String response; 16 | 17 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/ToolArgumentDescriptor.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | /** 7 | * 模型需填写的工具参数描述 8 | * 9 | * @author fxz 10 | */ 11 | @Data 12 | @Builder 13 | public class ToolArgumentDescriptor { 14 | 15 | private String name; 16 | 17 | private String type; 18 | 19 | private boolean required; 20 | 21 | private String description; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/AgentToolException.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | /** 4 | * Agent 工具异常 5 | * 6 | * @author fxz 7 | * @since 2025-11-01 8 | */ 9 | public class AgentToolException extends Exception { 10 | 11 | public AgentToolException(String message) { 12 | super(message); 13 | } 14 | 15 | public AgentToolException(String message, Throwable cause) { 16 | super(message, cause); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: art-generate 4 | cloud: 5 | nacos: 6 | config: 7 | server-addr: ${NACOS_HOST:art-nacos}:8848 8 | discovery: 9 | server-addr: ${NACOS_HOST:art-nacos}:8848 10 | username: nacos 11 | password: art-nacos 12 | config: 13 | import: 14 | - optional:nacos:${spring.application.name}.yaml 15 | - optional:nacos:art-common.yaml -------------------------------------------------------------------------------- /art-server/art-server-scheduled/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: art-job 4 | cloud: 5 | nacos: 6 | config: 7 | server-addr: ${NACOS_HOST:art-nacos}:8848 8 | discovery: 9 | server-addr: ${NACOS_HOST:art-nacos}:8848 10 | username: nacos 11 | password: art-nacos 12 | config: 13 | import: 14 | - optional:nacos:${spring.application.name}.yaml 15 | - optional:nacos:art-common.yaml 16 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentUserInputException.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import com.art.core.common.exception.ArtException; 4 | 5 | /** 6 | * Agent 用户输入异常 当用户提供的输入变量不满足 Agent 定义要求时抛出 7 | * 8 | * @author fxz 9 | * @since 2025-11-15 10 | */ 11 | public class AgentUserInputException extends ArtException { 12 | 13 | public AgentUserInputException(String message) { 14 | super(message); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/llm/config/JsonSchemaConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.llm.config; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * JSON Schema 根配置 9 | * 10 | * @author fxz 11 | */ 12 | @Data 13 | public class JsonSchemaConfig implements Serializable { 14 | 15 | /** 16 | * 根节点定义,可表示任意 JSON Schema 类型 17 | */ 18 | private JsonSchemaProperty root; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/WorkflowRunDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * @author fxz 10 | * @since 2025/8/12 12:40 11 | */ 12 | @Data 13 | public class WorkflowRunDTO { 14 | 15 | private Map inputs = new HashMap<>(); 16 | 17 | private Map systems = new HashMap<>(); 18 | 19 | private String workflowId; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentRuntimeException.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | /** 4 | * Agent 运行异常 5 | * 6 | * @author fxz 7 | * @since 2025-11-01 8 | */ 9 | public class AgentRuntimeException extends Exception { 10 | 11 | public AgentRuntimeException(String message) { 12 | super(message); 13 | } 14 | 15 | public AgentRuntimeException(String message, Throwable cause) { 16 | super(message, cause); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentToolCallPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.databind.JsonNode; 5 | import lombok.Data; 6 | 7 | /** 8 | * @author fxz 9 | */ 10 | @Data 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | public class AgentToolCallPayload { 13 | 14 | private String name; 15 | 16 | private JsonNode args; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/NodeConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author fxz 9 | * @since 2025/8/10 15:21 10 | */ 11 | @Data 12 | public abstract class NodeConfig { 13 | 14 | private int timeout; 15 | 16 | private int retryCount; 17 | 18 | /** 19 | * 引用的参数 20 | */ 21 | private List referenceParameters; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/variable/AssignmentSource.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.variable; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 值来源配置 7 | * 8 | * @author fxz 9 | */ 10 | @Data 11 | public class AssignmentSource { 12 | 13 | private AssignmentSourceType type; 14 | 15 | /** 常量值 */ 16 | private Object constant; 17 | 18 | /** 引用的变量名(initNodeInputsByReference 生成的 key) */ 19 | private String referenceKey; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/codegen/template/vue2/template.js.vm: -------------------------------------------------------------------------------- 1 | export const tableObj = { 2 | columns: [ 3 | #foreach ($column in $columns) 4 | { 5 | title: '$column.comments', 6 | field: '$column.name' 7 | }, 8 | #end 9 | { 10 | title: '操作', 11 | width: '200px', 12 | field: 'action', 13 | slot: true 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/embedding/entity/EmbeddingStoreConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.embedding.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Getter; 6 | 7 | /** 8 | * @author fxz 9 | * @since 2025/9/15 13:17 10 | */ 11 | @AllArgsConstructor 12 | @Builder 13 | @Getter 14 | public class EmbeddingStoreConfig { 15 | 16 | private String storeType; 17 | 18 | private Long collectionId; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentPlanFunctionPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author fxz 10 | */ 11 | @Data 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | public class AgentPlanFunctionPayload implements AgentControlPayload { 14 | 15 | private List items; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /art-framework/art-base-core/art-core/src/main/java/com/art/core/common/util/CollectionUtil.java: -------------------------------------------------------------------------------- 1 | package com.art.core.common.util; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author fxz 8 | * @since 2025/10/25 20:25 9 | */ 10 | public class CollectionUtil extends cn.hutool.core.collection.CollectionUtil { 11 | 12 | public static Map safeMap(Map source) { 13 | return source == null ? new HashMap<>() : new HashMap<>(source); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentProgressCallback.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * Agent进度回调接口 用于通知Agent执行过程中的中间状态 7 | * 8 | * @author fxz 9 | */ 10 | @FunctionalInterface 11 | public interface AgentProgressCallback { 12 | 13 | /** 14 | * 通知进度更新 15 | * @param type 进度类型:plan | tool_start | tool_end 16 | * @param data 进度数据 17 | */ 18 | void onProgress(String type, Map data); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/llm/config/WindowConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.llm.config; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * 记忆窗口配置 9 | * 10 | * @author fxz 11 | * @date 2025-10-19 12 | */ 13 | @Data 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | public class WindowConfig { 17 | 18 | /** 19 | * 窗口大小(历史消息条数,默认10条) 20 | */ 21 | private Integer size = 10; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/start/StartNodeConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.start; 2 | 3 | import com.art.ai.service.workflow.domain.node.NodeConfig; 4 | import com.art.ai.service.workflow.domain.node.NodeInputVariable; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author fxz 11 | * @since 2025/8/10 15:07 12 | */ 13 | @Data 14 | public class StartNodeConfig extends NodeConfig { 15 | 16 | private List userInputs; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/llm/config/StructuredOutputConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.llm.config; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 结构化输出配置 9 | * 10 | * @author fxz 11 | */ 12 | @Data 13 | public class StructuredOutputConfig implements Serializable { 14 | 15 | /** 16 | * 是否启用结构化输出 17 | */ 18 | private Boolean enabled = false; 19 | 20 | /** 21 | * JSON Schema 定义 22 | */ 23 | private JsonSchemaConfig schema; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/output/OutputNodeConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.output; 2 | 3 | import com.art.ai.service.workflow.domain.node.NodeConfig; 4 | import com.art.ai.service.workflow.domain.node.NodeOutputVariable; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author fxz 11 | * @since 2025/8/10 16:42 12 | */ 13 | @Data 14 | public class OutputNodeConfig extends NodeConfig { 15 | 16 | private List outputVariables; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/pipeline/RetrievalPipeline.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.pipeline; 2 | 3 | import com.art.ai.service.dataset.rag.retrieval.entity.RetrievalRequest; 4 | import com.art.ai.service.dataset.rag.retrieval.entity.RetrievalResponse; 5 | 6 | /** 7 | * 召回管道接口 定义了完整的召回流程:召回 -> 融合 -> 重排序 -> 后处理 8 | * 9 | * @author fxz 10 | * @since 2025/10/05 11 | */ 12 | public interface RetrievalPipeline { 13 | 14 | /** 15 | * 执行完整的召回管道 16 | */ 17 | RetrievalResponse execute(RetrievalRequest request); 18 | 19 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/NodeStatus.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/8/11 13:06 6 | */ 7 | public interface NodeStatus { 8 | 9 | /** 10 | * 新建 11 | */ 12 | String NODE_STATUS_NEW = "new"; 13 | 14 | /** 15 | * 运行中 16 | */ 17 | String NODE_STATUS_RUNNING = "running"; 18 | 19 | /** 20 | * 成功 21 | */ 22 | String NODE_STATUS_SUCCESS = "success"; 23 | 24 | /** 25 | * 失败 26 | */ 27 | String NODE_STATUS_FAILED = "failed"; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/AgentToolRequest.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | import com.art.ai.service.agent.spec.AgentSpec; 4 | import com.fasterxml.jackson.databind.JsonNode; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | 8 | /** 9 | * 工具执行请求 10 | * 11 | * @author fxz 12 | * @since 2025-11-01 13 | */ 14 | @Data 15 | @Builder 16 | public class AgentToolRequest { 17 | 18 | private final AgentSpec agentSpec; 19 | 20 | private final AgentToolContext context; 21 | 22 | private final JsonNode arguments; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphVertexUpdateInfo.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import dev.langchain4j.store.embedding.filter.Filter; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @NoArgsConstructor 10 | @AllArgsConstructor 11 | @Builder 12 | @Data 13 | public class GraphVertexUpdateInfo { 14 | 15 | private GraphVertex newData; 16 | 17 | private String name; 18 | 19 | private Filter metadataFilter; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/sse/SSEEventNameConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.sse; 2 | 3 | /** 4 | * @author fxz 5 | */ 6 | public interface SSEEventNameConstants { 7 | 8 | String START = "[START]"; 9 | 10 | String DONE = "[DONE]"; 11 | 12 | String ERROR = "[ERROR]"; 13 | 14 | String META = "[META]"; 15 | 16 | String AUDIO = "[AUDIO]"; 17 | 18 | String THINKING = "[THINKING]"; 19 | 20 | String AI_SEARCH_SOURCE_LINKS = "[SOURCE_LINKS]"; 21 | 22 | String WF_NODE_CHUNK = "[WF_NODE_CHUNK]"; 23 | 24 | String WF_NODE_OUTPUT = "[WF_NODE_OUTPUT]"; 25 | 26 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentPlanItemPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Data; 5 | 6 | /** 7 | * @author fxz 8 | */ 9 | @Data 10 | @JsonIgnoreProperties(ignoreUnknown = true) 11 | public class AgentPlanItemPayload { 12 | 13 | private Integer step; 14 | 15 | private String stepId; 16 | 17 | private String goal; 18 | 19 | private String tool; 20 | 21 | private String type; 22 | 23 | private Boolean requiresUser; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/NodeOutputVariable.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * @author fxz 11 | * @since 2025/8/10 17:27 12 | */ 13 | @Data 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class NodeOutputVariable implements Serializable { 17 | 18 | private String name; 19 | 20 | private String dataType; 21 | 22 | private Object value; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphSearchCondition.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import dev.langchain4j.store.embedding.filter.Filter; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | import lombok.experimental.SuperBuilder; 8 | 9 | import java.util.List; 10 | 11 | @SuperBuilder 12 | @NoArgsConstructor 13 | @AllArgsConstructor 14 | @Data 15 | public class GraphSearchCondition { 16 | 17 | protected List names; 18 | 19 | protected Filter metadataFilter; 20 | 21 | } -------------------------------------------------------------------------------- /art-gateway/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: art-gateway 4 | cloud: 5 | nacos: 6 | config: 7 | server-addr: ${NACOS_HOST:art-nacos}:8848 8 | discovery: 9 | server-addr: ${NACOS_HOST:art-nacos}:8848 10 | username: nacos 11 | password: art-nacos 12 | config: 13 | import: 14 | - optional:nacos:${spring.application.name}.yaml 15 | - optional:nacos:art-common.yaml 16 | knife4j: 17 | gateway: 18 | enabled: true 19 | strategy: discover 20 | discover: 21 | enabled: true 22 | version: openapi3 -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/llm/strategy/StructuredOutputStrategy.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.llm.strategy; 2 | 3 | /** 4 | * 结构化输出策略 5 | * 6 | * @author fxz 7 | */ 8 | public enum StructuredOutputStrategy { 9 | 10 | /** 11 | * 原生结构化输出(Structured Outputs) - 使用模型原生的 JSON Schema 支持 12 | */ 13 | NATIVE, 14 | 15 | /** 16 | * JSON Mode + Prompt - 使用 JSON Mode 保证 JSON 合法性 - 通过 Prompt 引导符合 Schema 17 | */ 18 | JSON_MODE, 19 | 20 | /** 21 | * 纯 Prompt Engineering - 仅通过 Prompt 引导输出 - 适用模型:所有模型(兜底方案) 22 | */ 23 | PROMPT; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/conversation/SendMsgDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.conversation; 2 | 3 | import com.art.ai.core.dto.WorkflowRunDTO; 4 | import com.art.ai.service.workflow.variable.SystemVariableKey; 5 | import lombok.Data; 6 | 7 | /** 8 | * @author fxz 9 | * @since 2025/10/18 23:05 10 | */ 11 | @Data 12 | public class SendMsgDTO { 13 | 14 | private WorkflowRunDTO workflowRunInfo; 15 | 16 | private String conversationId; 17 | 18 | public String getUserQuery() { 19 | return (String) workflowRunInfo.getSystems().get(SystemVariableKey.QUERY.getKey()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentPlanDecisionPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * kind = plan 时的模型输出。 11 | * 12 | * @author fxz 13 | */ 14 | @Data 15 | @EqualsAndHashCode(callSuper = true) 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class AgentPlanDecisionPayload extends AgentDecisionPayload { 18 | 19 | private List plan; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /art-server/art-server-z-demos/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: art-demo 4 | cloud: 5 | nacos: 6 | config: 7 | server-addr: ${NACOS_HOST:art-nacos}:8848 8 | discovery: 9 | server-addr: ${NACOS_HOST:art-nacos}:8848 10 | username: nacos 11 | password: art-nacos 12 | config: 13 | import: 14 | - optional:nacos:${spring.application.name}.yaml 15 | - optional:nacos:art-common.yaml 16 | 17 | art: 18 | hazelcast: 19 | port: 20 | - 5701 21 | - 5702 22 | - 5703 23 | members: 24 | - 127.0.0.1 25 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentFinalFunctionPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Data; 5 | 6 | /** 7 | * agent_final 控制函数的参数 8 | * 9 | * @author fxz 10 | */ 11 | @Data 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | public class AgentFinalFunctionPayload implements AgentControlPayload { 14 | 15 | /** 16 | * 面向用户的消息 17 | */ 18 | private String message; 19 | 20 | /** 21 | * 是否需要等待用户输入(仅PLAN模式需要) 22 | */ 23 | private Boolean requiresUserInput; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentToolDecisionPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * kind = tool_calls 时的模型输出。 11 | * 12 | * @author fxz 13 | */ 14 | @Data 15 | @EqualsAndHashCode(callSuper = true) 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class AgentToolDecisionPayload extends AgentDecisionPayload { 18 | 19 | private List toolCalls; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/llm/config/MemoryConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.llm.config; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * 大模型节点记忆配置 9 | * 10 | * @author fxz 11 | * @date 2025-10-19 12 | */ 13 | @Data 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | public class MemoryConfig { 17 | 18 | /** 19 | * 是否启用记忆 20 | */ 21 | private Boolean enabled = false; 22 | 23 | /** 24 | * 窗口配置 25 | */ 26 | private WindowConfig window = new WindowConfig(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/embedding/entity/EmbeddingModelConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.embedding.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Getter; 6 | 7 | import java.time.Duration; 8 | 9 | /** 10 | * @author fxz 11 | */ 12 | @AllArgsConstructor 13 | @Builder 14 | @Getter 15 | public class EmbeddingModelConfig { 16 | 17 | private String apiKey; 18 | 19 | private String baseUrl; 20 | 21 | private int maxRetries; 22 | 23 | private Duration timeout; 24 | 25 | private int dimensions; 26 | 27 | private String modelName; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /art-server/art-server-system/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: art-server-system 4 | cloud: 5 | nacos: 6 | config: 7 | server-addr: ${NACOS_HOST:art-nacos}:8848 8 | discovery: 9 | server-addr: ${NACOS_HOST:art-nacos}:8848 10 | username: nacos 11 | password: art-nacos 12 | config: 13 | import: 14 | - optional:nacos:${spring.application.name}.yaml 15 | - optional:nacos:art-common.yaml 16 | servlet: 17 | multipart: 18 | max-file-size: 100MB # 单个文件上传大小 19 | max-request-size: 100MB # 总文件上传大小 20 | main: 21 | allow-circular-references: true -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/variable/ConversationVariableAssignment.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.variable; 2 | 3 | import com.art.ai.service.workflow.variable.ConversationVariableWriteMode; 4 | import lombok.Data; 5 | 6 | /** 7 | * 会话变量赋值配置 8 | * 9 | * @author fxz 10 | */ 11 | @Data 12 | public class ConversationVariableAssignment { 13 | 14 | /** 目标会话变量顶级 key */ 15 | private String targetKey; 16 | 17 | /** 写入模式,默认 SET */ 18 | private ConversationVariableWriteMode writeMode = ConversationVariableWriteMode.SET; 19 | 20 | /** 值来源 */ 21 | private AssignmentSource source; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/KnowledgeRetrievalConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.retrieval.KnowledgeRetrievalDTO; 4 | import com.art.ai.service.dataset.rag.retrieval.entity.RetrievalRequest; 5 | import org.mapstruct.Mapper; 6 | import org.mapstruct.factory.Mappers; 7 | 8 | /** 9 | * 知识库召回转换器 10 | * 11 | * @author fxz 12 | * @since 2025/10/05 13 | */ 14 | @Mapper 15 | public interface KnowledgeRetrievalConvert { 16 | 17 | KnowledgeRetrievalConvert INSTANCE = Mappers.getMapper(KnowledgeRetrievalConvert.class); 18 | 19 | RetrievalRequest toRequest(KnowledgeRetrievalDTO dto); 20 | 21 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/store/config/Neo4jProperties.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.store.config; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * @author fxz 9 | */ 10 | @Data 11 | @Component 12 | @ConfigurationProperties(prefix = "tmp.graph.neo4j") 13 | public class Neo4jProperties { 14 | 15 | private String host; 16 | 17 | private String port; 18 | 19 | private String user; 20 | 21 | private String password; 22 | 23 | private String database = "neo4j"; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphEdgeSearch.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | @Builder 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class GraphEdgeSearch { 13 | 14 | private GraphSearchCondition source; 15 | 16 | private GraphSearchCondition target; 17 | 18 | private GraphSearchCondition edge; 19 | 20 | @Builder.Default 21 | private Integer limit = 10; 22 | 23 | @Builder.Default 24 | private Long maxId = Long.MAX_VALUE; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/AgentToolContext.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.Collections; 7 | import java.util.Map; 8 | 9 | /** 10 | * 工具执行上下文 11 | * 12 | * @author fxz 13 | * @since 2025-11-01 14 | */ 15 | @Data 16 | @Builder 17 | public class AgentToolContext { 18 | 19 | private final Long conversationId; 20 | 21 | private final String conversationUuid; 22 | 23 | private final String runId; 24 | 25 | private final String language; 26 | 27 | @Builder.Default 28 | private final Map extras = Collections.emptyMap(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/AgentToolResult.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | /** 7 | * 工具执行结果 8 | * 9 | * @author fxz 10 | * @since 2025-11-01 11 | */ 12 | @Data 13 | @Builder 14 | public class AgentToolResult { 15 | 16 | @Builder.Default 17 | private final boolean ok = true; 18 | 19 | private final Object data; 20 | 21 | private final String errorCode; 22 | 23 | private final String errorMessage; 24 | 25 | @Builder.Default 26 | private final boolean truncated = false; 27 | 28 | private final String preview; 29 | 30 | private final long elapsedMs; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/runtime/WorkFlowStatus.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.runtime; 2 | 3 | /** 4 | * @author fxz 5 | * @since 2025/8/10 18:14 6 | */ 7 | public interface WorkFlowStatus { 8 | 9 | /** 10 | * 工作流创建 11 | */ 12 | int WORKFLOW_PROCESS_STATUS_CREATE = 1; 13 | 14 | /** 15 | * 工作流执行中 16 | */ 17 | int WORKFLOW_PROCESS_STATUS_DOING = 2; 18 | 19 | /** 20 | * 工作流执行成功 21 | */ 22 | int WORKFLOW_PROCESS_STATUS_SUCCESS = 3; 23 | 24 | /** 25 | * 工作流执行失败 26 | */ 27 | int WORKFLOW_PROCESS_STATUS_FAIL = 4; 28 | 29 | /** 30 | * 工作流等待输入 31 | */ 32 | int WORKFLOW_PROCESS_STATUS_WAITING_INPUT = 5; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/NodeState.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | import org.bsc.langgraph4j.state.AgentState; 7 | 8 | import java.io.Serializable; 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | /** 13 | * @author fxz 14 | * @since 2025/8/10 17:11 15 | */ 16 | @ToString 17 | @Getter 18 | @Setter 19 | public class NodeState extends AgentState implements Serializable { 20 | 21 | public NodeState(Map initData) { 22 | super(initData); 23 | } 24 | 25 | public NodeState() { 26 | super(new HashMap<>()); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/java/com/art/gen/core/dto/DataBaseTablePageDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.gen.core.dto; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @author fxz 7 | * @since 2025/10/1 23:29 8 | */ 9 | @Data 10 | public class DataBaseTablePageDTO { 11 | 12 | /** 13 | * 表名 14 | */ 15 | private String tableName; 16 | 17 | /** 18 | * 引擎类型 19 | */ 20 | private String engine; 21 | 22 | /** 23 | * 表表述 24 | */ 25 | private String tableComment; 26 | 27 | /** 28 | * 数据源 29 | */ 30 | private String dsName; 31 | 32 | /** 33 | * 当前页 34 | */ 35 | private int current = 1; 36 | 37 | /** 38 | * 每页记录数 39 | */ 40 | private int size = 10; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /art-gateway/src/main/java/com/art/gateway/listener/RouteMessage.java: -------------------------------------------------------------------------------- 1 | package com.art.gateway.listener; 2 | 3 | import com.art.mq.sdk.support.broadcast.RedisBroadcastMessage; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.io.Serializable; 9 | import java.util.List; 10 | 11 | @Data 12 | @NoArgsConstructor 13 | @AllArgsConstructor 14 | public class RouteMessage extends RedisBroadcastMessage implements Serializable { 15 | 16 | private static final long serialVersionUID = -1L; 17 | 18 | List routeConfDOList; 19 | 20 | @Override 21 | public String getTopic() { 22 | return "route.redis.gateway.topic"; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/dto/AgentFinalDecisionPayload.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | 7 | /** 8 | * kind = final 时的模型输出。 9 | * 10 | * @author fxz 11 | */ 12 | @Data 13 | @EqualsAndHashCode(callSuper = true) 14 | @JsonIgnoreProperties(ignoreUnknown = true) 15 | public class AgentFinalDecisionPayload extends AgentDecisionPayload { 16 | 17 | /** 18 | * 面向用户的消息 19 | */ 20 | private String message; 21 | 22 | /** 23 | * 是否需要等待用户输入(仅PLAN模式需要) 24 | */ 25 | private Boolean requiresUserInput; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/dataobject/AiAppDO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.dataobject; 2 | 3 | import com.art.mybatis.common.base.BaseEntity; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.Data; 6 | 7 | import java.io.Serial; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-07-25 12 | */ 13 | @Data 14 | @TableName("ai_app") 15 | public class AiAppDO extends BaseEntity { 16 | 17 | @Serial 18 | private static final long serialVersionUID = -1L; 19 | 20 | private String name; 21 | 22 | private String description; 23 | 24 | private String mode; 25 | 26 | private String icon; 27 | 28 | private String status; 29 | 30 | private Long tenantId; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/condition/ConditionNodeConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.condition; 2 | 3 | import com.art.ai.service.workflow.domain.node.NodeConfig; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author fxz 10 | * @since 2025/8/10 15:43 11 | */ 12 | @Data 13 | public class ConditionNodeConfig extends NodeConfig { 14 | 15 | private List conditions; 16 | 17 | @Data 18 | public static class ConditionConfig { 19 | 20 | private String id; 21 | 22 | private String expression; 23 | 24 | private String label; 25 | 26 | private String description; 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/dsl/GraphDSL.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.dsl; 2 | 3 | import com.art.ai.service.workflow.domain.edge.EdgeValue; 4 | import com.art.ai.service.workflow.domain.node.WorkflowNode; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | import lombok.ToString; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author fxz 14 | * @since 2025/8/10 20:23 15 | */ 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @ToString 19 | @Data 20 | public class GraphDSL { 21 | 22 | private String name; 23 | 24 | private List> nodes; 25 | 26 | private List edges; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/variable/SystemVariableKey.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.variable; 2 | 3 | import lombok.Getter; 4 | import org.apache.commons.lang3.StringUtils; 5 | 6 | /** 7 | * @author fxz 8 | */ 9 | 10 | @Getter 11 | public enum SystemVariableKey { 12 | 13 | QUERY("query"), CONVERSATION_ID("sessionId"); 14 | 15 | private final String key; 16 | 17 | SystemVariableKey(String key) { 18 | this.key = key; 19 | } 20 | 21 | public static SystemVariableKey get(String key) { 22 | for (SystemVariableKey value : values()) { 23 | if (StringUtils.equals(value.getKey(), key)) { 24 | return value; 25 | } 26 | } 27 | return null; 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/spec/AgentVersionGenerator.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.spec; 2 | 3 | import lombok.AccessLevel; 4 | import lombok.NoArgsConstructor; 5 | 6 | import java.time.LocalDateTime; 7 | import java.time.format.DateTimeFormatter; 8 | 9 | /** 10 | * Agent 版本生成器 11 | * 12 | * @author fxz 13 | * @since 2025-11-01 14 | */ 15 | @NoArgsConstructor(access = AccessLevel.PRIVATE) 16 | public final class AgentVersionGenerator { 17 | 18 | private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSS"); 19 | 20 | public static String newVersion() { 21 | return LocalDateTime.now().format(FORMATTER); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /_other/docker/optional/minio/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | minio: 5 | image: minio/minio:latest 6 | container_name: minio 7 | restart: unless-stopped 8 | volumes: 9 | - "./minio/data:/data" 10 | - "./minio/minio:/minio" 11 | - "./minio/config:/root/.minio" 12 | environment: 13 | TZ: Asia/Shanghai 14 | LANG: en_US.UTF-8 15 | MINIO_PROMETHEUS_AUTH_TYPE: "public" 16 | MINIO_ACCESS_KEY: "admin" 17 | MINIO_SECRET_KEY: "admin123456" 18 | command: server /data --console-address ":9001" 19 | logging: 20 | driver: "json-file" 21 | options: 22 | max-size: "100m" 23 | ports: 24 | - "9000:9000" 25 | - "9001:9001" 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentPlanItem.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | /** 7 | * Agent 计划条目 8 | * 9 | * 包含步骤的类型、状态以及执行所需的附加信息。 10 | * 11 | * @author fxz 12 | */ 13 | @Data 14 | @Builder(toBuilder = true) 15 | public class AgentPlanItem { 16 | 17 | private int step; 18 | 19 | private String stepId; 20 | 21 | private String goal; 22 | 23 | private String tool; 24 | 25 | private Boolean requiresUser; 26 | 27 | @Builder.Default 28 | private AgentPlanItemType type = AgentPlanItemType.UNKNOWN; 29 | 30 | @Builder.Default 31 | private AgentPlanItemStatus status = AgentPlanItemStatus.PENDING; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/embedding/entity/DocumentSplitterConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.embedding.entity; 2 | 3 | import com.art.ai.service.dataset.rag.constant.KnowledgeConstants; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Getter; 7 | 8 | /** 9 | * @author fxz 10 | * @since 2025/9/15 13:16 11 | */ 12 | @AllArgsConstructor 13 | @Builder 14 | @Getter 15 | public class DocumentSplitterConfig { 16 | 17 | @Builder.Default 18 | private int maxSegmentSizeInTokens = KnowledgeConstants.MAX_SEGMENT_SIZE_IN_TOKENS; 19 | 20 | @Builder.Default 21 | private int maxOverlapSizeInTokens = KnowledgeConstants.MAX_OVERLAP_SIZE_IN_TOKENS; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/resources/mapper/conversation/AiConversationMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | UPDATE ai_conversations 8 | SET message_count = message_count + #{messageDelta}, 9 | total_tokens = total_tokens + #{tokensDelta}, 10 | total_cost = total_cost + #{costDelta}, 11 | last_message_at = NOW(), 12 | update_time = NOW() 13 | WHERE id = #{conversationId} 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-redisson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.art.common.lock.config.RedissonClientAutoConfiguration 2 | com.art.common.lock.config.DistributedLockAspectConfig 3 | com.art.common.lock.core.factory.RedissonLockServiceFactory 4 | com.art.common.lock.core.service.impl.RedissonFairLockServiceImpl 5 | com.art.common.lock.core.service.impl.RedissonMultiLockServiceImpl 6 | com.art.common.lock.core.service.impl.RedissonReadLockServiceImpl 7 | com.art.common.lock.core.service.impl.RedissonRedLockServiceImpl 8 | com.art.common.lock.core.service.impl.RedissonReentrantLockServiceImpl 9 | com.art.common.lock.core.service.impl.RedissonWriteLockServiceImpl 10 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/conversation/MessageQueryDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.conversation; 2 | 3 | import com.art.core.common.model.PageParam; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | /** 9 | * 消息查询请求VO 10 | * 11 | * @author fxz 12 | * @date 2025-10-18 13 | */ 14 | @Schema(title = "消息查询请求") 15 | @Data 16 | @EqualsAndHashCode(callSuper = true) 17 | public class MessageQueryDTO extends PageParam { 18 | 19 | @Schema(description = "会话ID") 20 | private Long conversationId; 21 | 22 | @Schema(description = "角色") 23 | private String role; 24 | 25 | @Schema(description = "状态") 26 | private String status; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/strategy/AgentStrategy.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime.strategy; 2 | 3 | import com.art.ai.service.agent.runtime.AgentRunResult; 4 | import com.art.ai.service.agent.spec.AgentSpec; 5 | import com.art.ai.service.agent.tool.AgentToolException; 6 | 7 | /** 8 | * Agent 执行策略 9 | * 10 | * @author fxz 11 | */ 12 | public interface AgentStrategy { 13 | 14 | /** 15 | * 执行agent 16 | * @param context 策略执行上下文 17 | * @return 执行结果 18 | * @throws AgentToolException 工具执行异常 19 | */ 20 | AgentRunResult execute(AgentStrategyContext context) throws AgentToolException; 21 | 22 | /** 23 | * 获取策略类型 24 | */ 25 | AgentSpec.StrategyType getStrategyType(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphVertex.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import java.util.Map; 10 | 11 | @Data 12 | @Builder 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | public class GraphVertex { 16 | 17 | private String id; 18 | 19 | private String label; 20 | 21 | private String name; 22 | 23 | @JsonProperty("text_segment_id") 24 | private String textSegmentId; 25 | 26 | private String description; 27 | 28 | private Map metadata; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/resources/mapper/conversation/AiMessageMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/ner/RecognizedEntity.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.ner; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | /** 9 | * 识别的实体 10 | * 11 | * @author fxz 12 | * @since 2025/10/05 13 | */ 14 | @Data 15 | @Builder 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | public class RecognizedEntity { 19 | 20 | /** 21 | * 实体名称 22 | */ 23 | private String name; 24 | 25 | /** 26 | * 实体类型 27 | */ 28 | private EntityType type; 29 | 30 | /** 31 | * 置信度分数 (0-1) 32 | */ 33 | private double confidence; 34 | 35 | /** 36 | * 实体来源 37 | */ 38 | private EntitySource source; 39 | 40 | } -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/codegen/template/java/entity.java.vm: -------------------------------------------------------------------------------- 1 | #set($excludeColumns = ["createTime","updateTime","createBy","updateBy"]) 2 | package com.art.core.common 3 | .entity.${module}; 4 | 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import lombok.Data; 7 | 8 | /** 9 | * ${comments} 10 | * @author ${author} 11 | * @date ${datetime} 12 | */ 13 | @Data 14 | @TableName("${tableName}") 15 | public class ${className}DO extends BaseEntity{ 16 | 17 | private static final long serialVersionUID = -1L; 18 | 19 | #foreach ($column in $columns) 20 | #if(!$excludeColumns.contains($column.name)) 21 | /** $column.comments */ 22 | private $column.attrType $column.name; 23 | #end 24 | #end 25 | 26 | } 27 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/ArtAiApplication.java: -------------------------------------------------------------------------------- 1 | package com.art.ai; 2 | 3 | import com.art.common.security.resources.EnableArtResourceServer; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.cloud.openfeign.EnableFeignClients; 8 | 9 | /** 10 | * @author fxz 11 | */ 12 | @EnableArtResourceServer 13 | @EnableFeignClients(basePackages = { "com.art" }) 14 | @MapperScan("com.art.ai.dao.mysql") 15 | @SpringBootApplication 16 | public class ArtAiApplication { 17 | 18 | public static void main(String[] args) { 19 | SpringApplication.run(ArtAiApplication.class, args); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentRunResult.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.Collections; 7 | import java.util.List; 8 | 9 | /** 10 | * Agent 运行结果 11 | * 12 | * @author fxz 13 | * @since 2025-11-01 14 | */ 15 | @Data 16 | @Builder 17 | public class AgentRunResult { 18 | 19 | private final String runId; 20 | 21 | private final String output; 22 | 23 | @Builder.Default 24 | private final List steps = Collections.emptyList(); 25 | 26 | private final String finishReason; 27 | 28 | private final Long promptTokens; 29 | 30 | private final Long completionTokens; 31 | 32 | private final Long totalTokens; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/knowledge/KnowledgeNodeConfig.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.knowledge; 2 | 3 | import com.art.ai.service.dataset.rag.retrieval.entity.RetrievalType; 4 | import com.art.ai.service.workflow.domain.node.NodeConfig; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 知识检索节点配置 11 | * 12 | * @author fxz 13 | * @since 2025/8/10 16:50 14 | */ 15 | @Data 16 | public class KnowledgeNodeConfig extends NodeConfig { 17 | 18 | /** 19 | * 查询字符串 20 | */ 21 | private String query; 22 | 23 | /** 24 | * 数据集ID列表 25 | */ 26 | private List datasetIds; 27 | 28 | /** 29 | * 检索类型列表 30 | */ 31 | private List retrievalTypes; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentRunRequest.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.Collections; 7 | import java.util.Map; 8 | 9 | /** 10 | * Agent 运行请求 11 | * 12 | * @author fxz 13 | * @since 2025-11-01 14 | */ 15 | @Data 16 | @Builder 17 | public class AgentRunRequest { 18 | 19 | private final String runId; 20 | 21 | private final Long agentId; 22 | 23 | private final Long conversationId; 24 | 25 | private final String input; 26 | 27 | @Builder.Default 28 | private final Map variables = Collections.emptyMap(); 29 | 30 | @Builder.Default 31 | private final Map overrides = Collections.emptyMap(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/fusion/FusionService.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.fusion; 2 | 3 | import com.art.ai.service.dataset.rag.pipeline.PipelineConfig; 4 | import com.art.ai.service.dataset.rag.retrieval.entity.RetrievalResult; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 融合服务接口 统一处理多种召回结果的融合逻辑 10 | * 11 | * @author fxz 12 | * @since 2025/10/05 13 | */ 14 | public interface FusionService { 15 | 16 | /** 17 | * 融合结果列表(已混合类型) 18 | * @param results 混合的结果列表 19 | * @param config 融合配置 20 | * @return 融合后的结果列表 21 | */ 22 | List fuse(List results, PipelineConfig.FusionConfig config); 23 | 24 | /** 25 | * 获取支持的融合策略 26 | */ 27 | List getSupportedStrategies(); 28 | 29 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/NodeProcessResult.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | import lombok.ToString; 6 | import lombok.experimental.Accessors; 7 | import org.bsc.langgraph4j.langchain4j.generators.StreamingChatGenerator; 8 | import org.bsc.langgraph4j.state.AgentState; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author fxz 14 | * @since 2025/8/12 13:08 15 | */ 16 | @Builder 17 | @Accessors(chain = true) 18 | @Data 19 | @ToString 20 | public class NodeProcessResult { 21 | 22 | private List outputVariables; 23 | 24 | private StreamingChatGenerator streamingOutputs; 25 | 26 | private String next; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiAppConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.AiAppDTO; 4 | import com.art.ai.dao.dataobject.AiAppDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-07-25 14 | */ 15 | @Mapper 16 | public interface AiAppConvert { 17 | 18 | AiAppConvert INSTANCE = Mappers.getMapper(AiAppConvert.class); 19 | 20 | Page convertPage(Page aiAppDO); 21 | 22 | List convertList(List aiAppDO); 23 | 24 | AiAppDTO convert(AiAppDO aiAppDO); 25 | 26 | AiAppDO convert(AiAppDTO aiAppDTO); 27 | 28 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiMessageMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiMessageDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * AI消息Mapper 12 | * 13 | * @author fxz 14 | * @date 2025-10-18 15 | */ 16 | @Mapper 17 | public interface AiMessageMapper extends BaseMapper { 18 | 19 | /** 20 | * 获取会话的最近N条消息(按时间正序) 21 | * @param conversationId 会话ID 22 | * @param limit 数量限制 23 | * @return 消息列表 24 | */ 25 | List selectRecentMessages(@Param("conversationId") Long conversationId, @Param("limit") int limit); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/rerank/Reranker.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.rerank; 2 | 3 | import com.art.ai.service.dataset.rag.retrieval.entity.RetrievalResult; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 重排序器接口 9 | * 10 | * @author fxz 11 | * @since 2025/10/05 12 | */ 13 | public interface Reranker { 14 | 15 | /** 16 | * 对召回结果进行重排序 17 | * @param query 用户查询 18 | * @param results 初始召回结果 19 | * @param config 重排序配置 20 | * @return 重排序后的结果 21 | */ 22 | List rerank(String query, List results, RerankerConfig config); 23 | 24 | /** 25 | * 获取重排序器类型 26 | */ 27 | RerankerType getType(); 28 | 29 | /** 30 | * 是否支持该配置 31 | */ 32 | boolean supports(RerankerConfig config); 33 | 34 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/conversation/ConversationCreateDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.conversation; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import jakarta.validation.constraints.NotNull; 5 | import lombok.Data; 6 | 7 | import java.io.Serial; 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 创建会话请求VO 12 | * 13 | * @author fxz 14 | * @date 2025-10-18 15 | */ 16 | @Schema(title = "创建会话请求") 17 | @Data 18 | public class ConversationCreateDTO implements Serializable { 19 | 20 | @Serial 21 | private static final long serialVersionUID = -1L; 22 | 23 | @Schema(description = "应用ID", required = true) 24 | @NotNull(message = "应用ID不能为空") 25 | private Long appId; 26 | 27 | @Schema(description = "会话标题") 28 | private String name; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/dataobject/AiConversationStateDO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.dataobject; 2 | 3 | import com.art.mybatis.common.base.BaseEntity; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | import java.io.Serial; 9 | 10 | /** 11 | * 会话变量持久化实体 12 | * 13 | * @author fxz 14 | */ 15 | @Data 16 | @EqualsAndHashCode(callSuper = true) 17 | @TableName("ai_conversation_state") 18 | public class AiConversationStateDO extends BaseEntity { 19 | 20 | @Serial 21 | private static final long serialVersionUID = -1L; 22 | 23 | /** 关联会话主键 */ 24 | private Long conversationId; 25 | 26 | /** 应用 ID */ 27 | private Long appId; 28 | 29 | /** 会话变量 JSON 快照 */ 30 | private String varsJson; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/retrieval/entity/RetrievalResult.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.retrieval.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.math.BigDecimal; 9 | import java.util.Map; 10 | 11 | /** 12 | * 召回结果实体 13 | * 14 | * @author fxz 15 | * @since 2025/10/05 16 | */ 17 | @Data 18 | @Builder 19 | @NoArgsConstructor 20 | @AllArgsConstructor 21 | public class RetrievalResult { 22 | 23 | private String documentId; 24 | 25 | private String segmentId; 26 | 27 | private String content; 28 | 29 | private BigDecimal score; 30 | 31 | private RetrievalType retrievalType; 32 | 33 | private Map metadata; 34 | 35 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/ToolArgumentBinding.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | import com.art.ai.service.workflow.variable.VariableSelector; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | /** 10 | * 工具参数绑定 11 | * 12 | * @author fxz 13 | */ 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Data 17 | @Builder 18 | public class ToolArgumentBinding { 19 | 20 | private String field; 21 | 22 | /** 23 | * 使用系统变量选择器解析值 24 | */ 25 | private VariableSelector selector; 26 | 27 | /** 28 | * 固定值 29 | */ 30 | private Object constant; 31 | 32 | /** 33 | * 是否强制覆盖模型提供的值 34 | */ 35 | @Builder.Default 36 | private boolean override = false; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/dataobject/AiDocumentSegmentDO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.dataobject; 2 | 3 | import com.art.mybatis.common.base.BaseEntity; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.Data; 6 | 7 | import java.io.Serial; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-09-14 12 | */ 13 | @Data 14 | @TableName("ai_document_segment") 15 | public class AiDocumentSegmentDO extends BaseEntity { 16 | 17 | @Serial 18 | private static final long serialVersionUID = -1L; 19 | 20 | /** 分段内容 */ 21 | private String segment; 22 | 23 | /** 数据集id */ 24 | private Long datasetId; 25 | 26 | /** 文档id */ 27 | private Long documentId; 28 | 29 | /** 租户id */ 30 | private Long tenantId; 31 | 32 | /** 分段类型 */ 33 | private String segmentType; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiModelConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.AiModelDTO; 4 | import com.art.ai.dao.dataobject.AiModelDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-10-09 14 | */ 15 | @Mapper 16 | public interface AiModelConvert { 17 | 18 | AiModelConvert INSTANCE = Mappers.getMapper(AiModelConvert.class); 19 | 20 | Page convertPage(Page aiModelDO); 21 | 22 | List convertList(List aiModelDO); 23 | 24 | AiModelDTO convert(AiModelDO aiModelDO); 25 | 26 | AiModelDO convert(AiModelDTO aiModelDTO); 27 | 28 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/retrieval/entity/RetrievalResponse.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.retrieval.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | * 召回响应实体 13 | * 14 | * @author fxz 15 | * @since 2025/10/05 16 | */ 17 | @Data 18 | @Builder 19 | @NoArgsConstructor 20 | @AllArgsConstructor 21 | public class RetrievalResponse { 22 | 23 | private String query; 24 | 25 | private List results; 26 | 27 | private Integer totalCount; 28 | 29 | private Long costTime; 30 | 31 | private Map typeCount; 32 | 33 | private Map debugInfo; 34 | 35 | } -------------------------------------------------------------------------------- /art-gateway/src/main/java/com/art/gateway/listener/RouteConfDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.gateway.listener; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serial; 6 | import java.io.Serializable; 7 | 8 | @Data 9 | public class RouteConfDTO implements Serializable { 10 | 11 | @Serial 12 | private static final long serialVersionUID = -1L; 13 | 14 | /** 15 | * 菜单名称 16 | */ 17 | private String name; 18 | 19 | /** 20 | * 路由id 21 | */ 22 | private String routeId; 23 | 24 | /** 25 | * 断言 26 | */ 27 | private String predicates; 28 | 29 | /** 30 | * 过滤器 31 | */ 32 | private String filters; 33 | 34 | /** 35 | * uri 36 | */ 37 | private String uri; 38 | 39 | /** 40 | * 排序 41 | */ 42 | private Integer sortOrder; 43 | 44 | /** 45 | * 路由元信息 46 | */ 47 | private String metadata; 48 | 49 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/conversation/ConversationQueryDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.conversation; 2 | 3 | import com.art.core.common.model.PageParam; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | /** 9 | * 会话查询请求VO 10 | * 11 | * @author fxz 12 | * @date 2025-10-18 13 | */ 14 | @Schema(title = "会话查询请求") 15 | @Data 16 | @EqualsAndHashCode(callSuper = true) 17 | public class ConversationQueryDTO extends PageParam { 18 | 19 | @Schema(description = "应用ID") 20 | private Long appId; 21 | 22 | @Schema(description = "终端用户ID") 23 | private Long endUserId; 24 | 25 | @Schema(description = "会话状态") 26 | private String status; 27 | 28 | @Schema(description = "会话标题(模糊查询)") 29 | private String name; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/dataobject/AiAgentDO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.dataobject; 2 | 3 | import com.art.mybatis.common.base.BaseEntity; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.Data; 6 | 7 | import java.io.Serial; 8 | 9 | /** 10 | * Agent 实体 11 | * 12 | * @author fxz 13 | * @since 2025-11-01 14 | */ 15 | @Data 16 | @TableName("ai_agent") 17 | public class AiAgentDO extends BaseEntity { 18 | 19 | @Serial 20 | private static final long serialVersionUID = -1L; 21 | 22 | /** 应用 ID */ 23 | private Long appId; 24 | 25 | /** Agent 名称 */ 26 | private String name; 27 | 28 | /** Agent 状态:draft/published */ 29 | private String status; 30 | 31 | /** Agent 规格 JSON */ 32 | private String specJson; 33 | 34 | /** 租户 ID */ 35 | private Long tenantId; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/manager/AiQaHitLogsManager.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.manager; 2 | 3 | import com.art.ai.dao.dataobject.AiQaHitLogsDO; 4 | import com.art.ai.dao.mysql.AiQaHitLogsMapper; 5 | import lombok.RequiredArgsConstructor; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * QA命中日志Manager 10 | * 11 | * @author fxz 12 | * @since 2025/10/12 13 | */ 14 | @Component 15 | @RequiredArgsConstructor 16 | public class AiQaHitLogsManager { 17 | 18 | private final AiQaHitLogsMapper hitLogsMapper; 19 | 20 | /** 21 | * 新增命中日志 22 | */ 23 | public int insert(AiQaHitLogsDO hitLog) { 24 | return hitLogsMapper.insert(hitLog); 25 | } 26 | 27 | /** 28 | * 根据ID查询 29 | */ 30 | public AiQaHitLogsDO findById(Long id) { 31 | return hitLogsMapper.selectById(id); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiAgentConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.AiAgentDTO; 4 | import com.art.ai.dao.dataobject.AiAgentDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * Agent 转换器 13 | * 14 | * @author fxz 15 | * @since 2025-11-01 16 | */ 17 | @Mapper 18 | public interface AiAgentConvert { 19 | 20 | AiAgentConvert INSTANCE = Mappers.getMapper(AiAgentConvert.class); 21 | 22 | AiAgentDTO convert(AiAgentDO entity); 23 | 24 | AiAgentDO convert(AiAgentDTO dto); 25 | 26 | List convertList(List list); 27 | 28 | Page convertPage(Page page); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/callback/CallbackData.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.callback; 2 | 3 | import com.fasterxml.jackson.annotation.JsonInclude; 4 | import lombok.Builder; 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | 8 | /** 9 | * @author fxz 10 | */ 11 | @JsonInclude(JsonInclude.Include.NON_NULL) 12 | @Builder 13 | @Getter 14 | @Setter 15 | public class CallbackData { 16 | 17 | /** 18 | * 执行状态:{@link com.art.ai.service.workflow.domain.node.NodeStatus} 19 | */ 20 | private String nodeStatus; 21 | 22 | /** 23 | * 节点ID 24 | */ 25 | private String nodeId; 26 | 27 | /** 28 | * 节点名称 29 | */ 30 | private String nodeName; 31 | 32 | /** 33 | * 节点输出 34 | */ 35 | private String outputs; 36 | 37 | /** 38 | * 分块内容 39 | */ 40 | private String chunk; 41 | 42 | } -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/codegen/template/java/dto.java.vm: -------------------------------------------------------------------------------- 1 | #set($excludeColumns = ["createTime","updateTime","createBy","updateBy"]) 2 | package com.art.core.common 3 | .${module}.mapper; 4 | 5 | import com.art.mybatis.common.base.BaseCreateEntity; 6 | 7 | import io.swagger.v3.oas.annotations.media.Schema; 8 | 9 | import lombok.Data; 10 | 11 | /** 12 | * ${comments} 13 | * @author ${author} 14 | * @date ${datetime} 15 | */ 16 | @Schema(title = "${comments}") 17 | @Data 18 | public class ${className}DTO extends BaseCreateEntity { 19 | 20 | private static final long serialVersionUID = -1L; 21 | 22 | #foreach ($column in $columns) 23 | #if(!$excludeColumns.contains($column.name)) 24 | @Schema(description = "$column.comments") 25 | private $column.attrType $column.name; 26 | #end 27 | #end 28 | 29 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiQaSimilarQuestionConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.qa.AiQaSimilarQuestionDTO; 4 | import com.art.ai.dao.dataobject.AiQaSimilarQuestionsDO; 5 | import org.mapstruct.Mapper; 6 | import org.mapstruct.factory.Mappers; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * QA相似问题转换器 12 | * 13 | * @author fxz 14 | * @since 2025/10/12 15 | */ 16 | @Mapper 17 | public interface AiQaSimilarQuestionConvert { 18 | 19 | AiQaSimilarQuestionConvert INSTANCE = Mappers.getMapper(AiQaSimilarQuestionConvert.class); 20 | 21 | List convertList(List list); 22 | 23 | AiQaSimilarQuestionDTO convert(AiQaSimilarQuestionsDO dataObject); 24 | 25 | AiQaSimilarQuestionsDO convert(AiQaSimilarQuestionDTO dto); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/qa/AiQaSimilarQuestionDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.qa; 2 | 3 | import com.art.mybatis.common.base.BaseCreateEntity; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.Data; 6 | 7 | import java.io.Serial; 8 | 9 | /** 10 | * QA相似问题DTO 11 | * 12 | * @author fxz 13 | * @since 2025/10/12 14 | */ 15 | @Schema(title = "QA相似问题") 16 | @Data 17 | public class AiQaSimilarQuestionDTO extends BaseCreateEntity { 18 | 19 | @Serial 20 | private static final long serialVersionUID = -1L; 21 | 22 | @Schema(description = "主键") 23 | private Long id; 24 | 25 | @Schema(description = "关联的QA对ID") 26 | private Long qaPairId; 27 | 28 | @Schema(description = "相似问题") 29 | private String similarQuestion; 30 | 31 | @Schema(description = "租户ID") 32 | private Long tenantId; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/rerank/RerankerFactory.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.rerank; 2 | 3 | import lombok.RequiredArgsConstructor; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 重排序器工厂 11 | * 12 | * @author fxz 13 | * @since 2025/10/05 14 | */ 15 | @Slf4j 16 | @Component 17 | @RequiredArgsConstructor 18 | public class RerankerFactory { 19 | 20 | private final List rerankers; 21 | 22 | /** 23 | * 获取支持指定配置的重排序器 24 | */ 25 | public Reranker getReranker(RerankerConfig config) { 26 | return rerankers.stream() 27 | .filter(reranker -> reranker.supports(config)) 28 | .findFirst() 29 | .orElseThrow(() -> new IllegalArgumentException("没有重排序器支持配置: " + config.getType())); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/dataobject/AiWorkflowRuntimeDO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.dataobject; 2 | 3 | import com.art.mybatis.common.base.BaseEntity; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.Data; 6 | 7 | import java.io.Serial; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-08-09 12 | */ 13 | @Data 14 | @TableName("ai_workflow_runtime") 15 | public class AiWorkflowRuntimeDO extends BaseEntity { 16 | 17 | @Serial 18 | private static final long serialVersionUID = -1L; 19 | 20 | /** 应用id */ 21 | private Long appId; 22 | 23 | /** 工作流主键 */ 24 | private Long workflowId; 25 | 26 | /** 流程入参 */ 27 | private String input; 28 | 29 | /** 流程出参 */ 30 | private String output; 31 | 32 | /** 执行状态 */ 33 | private Integer status; 34 | 35 | /** 状态描述 */ 36 | private String statusRemark; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/app/AiAppService.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.app; 2 | 3 | import com.art.ai.core.dto.AiAppDTO; 4 | import com.art.ai.core.dto.AiAppPageDTO; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-07-25 12 | */ 13 | public interface AiAppService { 14 | 15 | /** 16 | * 添加 17 | */ 18 | Boolean addAiApp(AiAppDTO aiAppDTO); 19 | 20 | /** 21 | * 修改 22 | */ 23 | Boolean updateAiApp(AiAppDTO aiAppDTO); 24 | 25 | /** 26 | * 分页 27 | */ 28 | IPage pageAiApp(AiAppPageDTO aiAppPageDTO); 29 | 30 | /** 31 | * 获取单条 32 | */ 33 | AiAppDTO findById(Long id); 34 | 35 | /** 36 | * 获取全部 37 | */ 38 | List findAll(); 39 | 40 | /** 41 | * 删除 42 | */ 43 | Boolean deleteAiApp(Long id); 44 | 45 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphVertexSearch.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.NoArgsConstructor; 9 | import lombok.experimental.SuperBuilder; 10 | 11 | @EqualsAndHashCode(callSuper = true) 12 | @SuperBuilder 13 | @Data 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class GraphVertexSearch extends GraphSearchCondition { 17 | 18 | private String label; 19 | 20 | @JsonProperty("text_segment_id") 21 | private String textSegmentId; 22 | 23 | @Builder.Default 24 | private Integer limit = 10; 25 | 26 | @Builder.Default 27 | private Long maxId = Long.MAX_VALUE; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/codegen/template/java/convert.java.vm: -------------------------------------------------------------------------------- 1 | package com.art.${module}.core.convert; 2 | 3 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 4 | import org.mapstruct.Mapper; 5 | import org.mapstruct.factory.Mappers; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * ${comments} 11 | * @author ${author} 12 | * @date ${datetime} 13 | */ 14 | @Mapper 15 | public interface ${className}Convert { 16 | 17 | ${className}Convert INSTANCE = Mappers.getMapper(${className}Convert.class); 18 | 19 | Page<${className}DTO> convertPage(Page<${className}DO> ${classname}DO); 20 | 21 | List<${className}DTO> convertList(List<${className}DO> ${classname}DO); 22 | 23 | ${className}DTO convert(${className}DO ${classname}DO); 24 | 25 | ${className}DO convert(${className}DTO ${classname}DTO); 26 | 27 | } -------------------------------------------------------------------------------- /art-framework/art-base-core/art-spring-boot-starter-core/src/main/resources/i18n/messages_zh_CN.properties: -------------------------------------------------------------------------------- 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 | sys.test.message.str={0} {1} \u8FD9\u662F\u62A5\u9519\u4FE1\u606F -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiQaPairsConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.qa.AiQaPairsDTO; 4 | import com.art.ai.dao.dataobject.AiQaPairsDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * QA问答对转换器 13 | * 14 | * @author fxz 15 | * @since 2025/10/12 16 | */ 17 | @Mapper 18 | public interface AiQaPairsConvert { 19 | 20 | AiQaPairsConvert INSTANCE = Mappers.getMapper(AiQaPairsConvert.class); 21 | 22 | Page convertPage(Page page); 23 | 24 | List convertList(List list); 25 | 26 | AiQaPairsDTO convert(AiQaPairsDO dataObject); 27 | 28 | AiQaPairsDO convert(AiQaPairsDTO dto); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentStep.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.Collections; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * Agent 运行步骤 12 | * 13 | * @author fxz 14 | * @since 2025-11-01 15 | */ 16 | @Data 17 | @Builder 18 | public class AgentStep { 19 | 20 | private final int index; 21 | 22 | private final AgentDecision.DecisionKind decisionKind; 23 | 24 | @Builder.Default 25 | private final List toolCalls = Collections.emptyList(); 26 | 27 | @Builder.Default 28 | private final Map observation = Collections.emptyMap(); 29 | 30 | private final long elapsedMs; 31 | 32 | private final String errorMessage; 33 | 34 | private final String summary; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /art-framework/art-framework-message-queue/art-message-queue-sdk-redis/src/main/java/com/art/mq/sdk/package-info.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 | * redis消息封装 18 | */ 19 | package com.art.mq.sdk; -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiDatasetsConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.dataset.AiDatasetsDTO; 4 | import com.art.ai.dao.dataobject.AiDatasetsDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-09-07 14 | */ 15 | @Mapper 16 | public interface AiDatasetsConvert { 17 | 18 | AiDatasetsConvert INSTANCE = Mappers.getMapper(AiDatasetsConvert.class); 19 | 20 | Page convertPage(Page aiDatasetsDO); 21 | 22 | List convertList(List aiDatasetsDO); 23 | 24 | AiDatasetsDTO convert(AiDatasetsDO aiDatasetsDO); 25 | 26 | AiDatasetsDO convert(AiDatasetsDTO aiDatasetsDTO); 27 | 28 | } -------------------------------------------------------------------------------- /art-framework/art-framework-cache/art-cache-sdk-multi/src/main/java/com/art/cache/sdk/package-info.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 | /** 18 | * redis + caffeine 实现多级缓存 19 | */ 20 | package com.art.cache.sdk; -------------------------------------------------------------------------------- /art-framework/art-framework-captcha/art-captcha-sdk-aj/src/main/resources/META-INF/services/com.anji.captcha.service.CaptchaCacheService: -------------------------------------------------------------------------------- 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 | com.art.captcha.sdk.service.RedisCaptchaServiceImpl 18 | -------------------------------------------------------------------------------- /art-framework/art-framework-message-queue/art-message-queue-sdk-hazelcast/src/main/java/com/art/mq/sdk/package-info.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 | * hazelcast消息封装 18 | */ 19 | package com.art.mq.sdk; -------------------------------------------------------------------------------- /art-framework/art-framework-redis/art-redis/src/main/java/com/art/redis/common/event/package-info.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 | /** 18 | * redis key 事件监听 19 | */ 20 | package com.art.redis.common.event; -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-sensitive/src/main/java/com/art/common/sensitive/config/package-info.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 | /** 18 | * 占位 19 | */ 20 | package com.art.common.sensitive.config; -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiWorkflowsConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.AiWorkflowsDTO; 4 | import com.art.ai.dao.dataobject.AiWorkflowsDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-07-31 14 | */ 15 | @Mapper 16 | public interface AiWorkflowsConvert { 17 | 18 | AiWorkflowsConvert INSTANCE = Mappers.getMapper(AiWorkflowsConvert.class); 19 | 20 | Page convertPage(Page aiWorkflowsDO); 21 | 22 | List convertList(List aiWorkflowsDO); 23 | 24 | AiWorkflowsDTO convert(AiWorkflowsDO aiWorkflowsDO); 25 | 26 | AiWorkflowsDO convert(AiWorkflowsDTO aiWorkflowsDTO); 27 | 28 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/conversation/ConversationUpdateDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.conversation; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import jakarta.validation.constraints.NotBlank; 5 | import jakarta.validation.constraints.NotNull; 6 | import lombok.Data; 7 | 8 | import java.io.Serial; 9 | import java.io.Serializable; 10 | 11 | /** 12 | * 更新会话请求VO 13 | * 14 | * @author fxz 15 | * @date 2025-10-18 16 | */ 17 | @Schema(title = "更新会话请求") 18 | @Data 19 | public class ConversationUpdateDTO implements Serializable { 20 | 21 | @Serial 22 | private static final long serialVersionUID = -1L; 23 | 24 | @Schema(description = "会话标题", required = true) 25 | @NotBlank(message = "会话标题不能为空") 26 | private String name; 27 | 28 | @Schema(description = "会话ID", required = true) 29 | @NotNull 30 | private Long conversationId; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentToolSpecificationMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import com.art.ai.service.agent.tool.AgentToolDefinition; 4 | import dev.langchain4j.agent.tool.ToolSpecification; 5 | import dev.langchain4j.model.chat.request.json.JsonObjectSchema; 6 | import lombok.experimental.UtilityClass; 7 | 8 | /** 9 | * 工具定义 -> LangChain4j ToolSpecification 10 | * 11 | * @author fxz 12 | */ 13 | @UtilityClass 14 | public final class AgentToolSpecificationMapper { 15 | 16 | public static ToolSpecification toSpecification(AgentToolDefinition definition) { 17 | JsonObjectSchema schema = definition.parametersSchemaOrDefault(); 18 | return ToolSpecification.builder() 19 | .name(definition.getName()) 20 | .description(definition.getDescription()) 21 | .parameters(schema) 22 | .build(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/domain/node/start/StartNodeDataProcessor.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.domain.node.start; 2 | 3 | import com.art.ai.service.workflow.NodeState; 4 | import com.art.ai.service.workflow.WorkFlowContext; 5 | import com.art.ai.service.workflow.domain.node.NodeDataProcessor; 6 | import com.art.ai.service.workflow.domain.node.NodeProcessResult; 7 | import lombok.Data; 8 | import lombok.extern.slf4j.Slf4j; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author fxz 14 | * @since 2025/8/10 14:54 15 | */ 16 | @Slf4j 17 | @Data 18 | public class StartNodeDataProcessor extends NodeDataProcessor { 19 | 20 | @Override 21 | public NodeProcessResult process(WorkFlowContext workFlowContext, NodeState nodeState) { 22 | return NodeProcessResult.builder().outputVariables(List.of()).build(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiDocumentsConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.document.AiDocumentsDTO; 4 | import com.art.ai.dao.dataobject.AiDocumentsDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-09-09 14 | */ 15 | @Mapper 16 | public interface AiDocumentsConvert { 17 | 18 | AiDocumentsConvert INSTANCE = Mappers.getMapper(AiDocumentsConvert.class); 19 | 20 | Page convertPage(Page aiDocumentsDO); 21 | 22 | List convertList(List aiDocumentsDO); 23 | 24 | AiDocumentsDTO convert(AiDocumentsDO aiDocumentsDO); 25 | 26 | AiDocumentsDO convert(AiDocumentsDTO aiDocumentsDTO); 27 | 28 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/model/AiModelService.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.model; 2 | 3 | import com.art.ai.core.dto.AiModelDTO; 4 | import com.art.ai.core.dto.AiModelPageDTO; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-10-09 12 | */ 13 | public interface AiModelService { 14 | 15 | /** 16 | * 添加 17 | */ 18 | Boolean addAiModel(AiModelDTO aiModelDTO); 19 | 20 | /** 21 | * 修改 22 | */ 23 | Boolean updateAiModel(AiModelDTO aiModelDTO); 24 | 25 | /** 26 | * 分页 27 | */ 28 | IPage pageAiModel(AiModelPageDTO aiModelPageDTO); 29 | 30 | /** 31 | * 获取单条 32 | */ 33 | AiModelDTO findById(Long id); 34 | 35 | /** 36 | * 获取全部 37 | */ 38 | List findAll(); 39 | 40 | /** 41 | * 删除 42 | */ 43 | Boolean deleteAiModel(Long id); 44 | 45 | } -------------------------------------------------------------------------------- /art-api/art-api-system/src/main/java/com/art/system/api/file/FileServiceApi.java: -------------------------------------------------------------------------------- 1 | package com.art.system.api.file; 2 | 3 | import com.art.core.common.constant.ArtServerConstants; 4 | import com.art.core.common.constant.SecurityConstants; 5 | import com.art.core.common.model.Result; 6 | import com.art.system.api.file.dto.FileDownloadDTO; 7 | import org.springframework.cloud.openfeign.FeignClient; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | 11 | /** 12 | * @author fxz 13 | * @since 2025/9/13 16:34 14 | */ 15 | @FeignClient(contextId = "fileServiceApi", value = ArtServerConstants.ART_SERVER_SYSTEM) 16 | public interface FileServiceApi { 17 | 18 | @PostMapping(value = "/file/preSignUploadUrl", headers = SecurityConstants.HEADER_INNER) 19 | Result preSignUploadUrl(@RequestBody FileDownloadDTO dto); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/constant/KnowledgeConstants.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.constant; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author fxz 7 | * @since 2025/9/14 14:22 8 | */ 9 | public interface KnowledgeConstants { 10 | 11 | int MAX_SEGMENT_SIZE_IN_TOKENS = 1000; 12 | 13 | int MAX_OVERLAP_SIZE_IN_TOKENS = 50; 14 | 15 | String DATASET_KEY = "DATASET_KEY"; 16 | 17 | String DOCUMENT_KEY = "DOCUMENT_KEY"; 18 | 19 | String SEGMENT_KEY = "text_segment_id"; 20 | 21 | String[] GRAPH_ENTITY_EXTRACTION_ENTITY_TYPES = { "organization", "person", "geo", "event" }; 22 | 23 | String TUPLE_DELIMITER = "<|>"; 24 | 25 | String GRAPH_RECORD_DELIMITER = "##"; 26 | 27 | String GRAPH_COMPLETION_DELIMITER = "<|COMPLETE|>"; 28 | 29 | List GRAPH_STORE_MAIN_FIELDS = List.of("name", "label", SEGMENT_KEY, "description"); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/codegen/template/java/page.java.vm: -------------------------------------------------------------------------------- 1 | #set($excludeColumns = ["createTime","updateTime","createBy","updateBy"]) 2 | package com.art.core.common 3 | .${module}.mapper; 4 | 5 | import com.art.mybatis.common.base.BaseCreateEntity; 6 | 7 | import io.swagger.v3.oas.annotations.media.Schema; 8 | 9 | import lombok.Data; 10 | 11 | /** 12 | * ${comments} 13 | * @author ${author} 14 | * @date ${datetime} 15 | */ 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Builder 19 | @Schema(title = "${comments}") 20 | @Data 21 | public class ${className}PageDTO extends BasePageEntity { 22 | 23 | private static final long serialVersionUID = -1L; 24 | 25 | #foreach ($column in $columns) 26 | #if(!$excludeColumns.contains($column.name)) 27 | @Schema(description = "$column.comments") 28 | private $column.attrType $column.name; 29 | #end 30 | #end 31 | 32 | } -------------------------------------------------------------------------------- /_other/docker/optional/neo4j/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | neo4j: 5 | image: neo4j:5.26.2 6 | container_name: neo4j 7 | ports: 8 | - "7474:7474" 9 | - "7687:7687" 10 | volumes: 11 | - ./neo4j/data:/data 12 | - ./neo4j/logs:/logs 13 | - ./neo4j/import:/import 14 | - ./neo4j/plugins:/plugins 15 | environment: 16 | NEO4J_AUTH: neo4j/art-neo4j-password 17 | 18 | NEO4J_server_memory_pagecache_size: 512M 19 | NEO4J_server_memory_heap_initial__size: 512M 20 | NEO4J_server_memory_heap_max__size: 512M 21 | 22 | NEO4J_db_temporal_timezone: Asia/Shanghai 23 | 24 | NEO4J_PLUGINS: '["apoc"]' 25 | NEO4J_dbms_security_procedures_unrestricted: apoc.* 26 | NEO4J_apoc_export_file_enabled: "true" 27 | NEO4J_apoc_import_file_enabled: "true" 28 | NEO4J_apoc_import_file_use_neo4j_config: "true" 29 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/AiAppDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto; 2 | 3 | import com.art.mybatis.common.base.BaseCreateEntity; 4 | 5 | import io.swagger.v3.oas.annotations.media.Schema; 6 | 7 | import lombok.Data; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-07-25 12 | */ 13 | @Schema(title = "") 14 | @Data 15 | public class AiAppDTO extends BaseCreateEntity { 16 | 17 | private static final long serialVersionUID = -1L; 18 | 19 | @Schema(description = "") 20 | private Long id; 21 | 22 | @Schema(description = "") 23 | private String name; 24 | 25 | @Schema(description = "") 26 | private String description; 27 | 28 | @Schema(description = "") 29 | private String mode; 30 | 31 | @Schema(description = "") 32 | private String icon; 33 | 34 | @Schema(description = "") 35 | private String status; 36 | 37 | @Schema(description = "") 38 | private Long tenantId; 39 | 40 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/embedding/entity/EmbeddingIngestParam.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.embedding.entity; 2 | 3 | import dev.langchain4j.data.document.Document; 4 | import dev.langchain4j.data.document.DocumentSplitter; 5 | import dev.langchain4j.data.segment.TextSegment; 6 | import dev.langchain4j.model.embedding.EmbeddingModel; 7 | import dev.langchain4j.store.embedding.EmbeddingStore; 8 | import lombok.AllArgsConstructor; 9 | import lombok.Builder; 10 | import lombok.Getter; 11 | 12 | /** 13 | * @author fxz 14 | * @since 2025/9/15 13:12 15 | */ 16 | @AllArgsConstructor 17 | @Getter 18 | @Builder 19 | public class EmbeddingIngestParam { 20 | 21 | private DocumentSplitter documentSplitter; 22 | 23 | private EmbeddingModel embeddingModel; 24 | 25 | private EmbeddingStore embeddingStore; 26 | 27 | private Document document; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /art-server/art-server-system/src/main/java/com/art/system/service/UserRoleService.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.service; 18 | 19 | /** 20 | * @author fxz 21 | */ 22 | public interface UserRoleService { 23 | 24 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 忽略匹配下列规则的Git 2 | ### gradle ### 3 | .gradle 4 | /build/ 5 | !gradle/wrapper/gradle-wrapper.jar 6 | 7 | ### STS ### 8 | .settings/ 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .db 16 | data/ 17 | logs/ 18 | 19 | ### IntelliJ IDEA ### 20 | .idea 21 | *.iws 22 | *.iml 23 | *.ipr 24 | *.lock 25 | rebel.xml 26 | 27 | ### NetBeans ### 28 | nbproject/private/ 29 | nbbuild/ 30 | nbdist/ 31 | .nb-gradle/ 32 | 33 | ### maven ### 34 | target/ 35 | *.war 36 | *.ear 37 | *.zip 38 | *.tar 39 | *.tar.gz 40 | 41 | ### logs #### 42 | /logs/ 43 | *.log 44 | 45 | ### temp ignore ### 46 | *.cache 47 | *.diff 48 | *.patch 49 | *.tmp 50 | *.java~ 51 | *.properties~ 52 | *.xml~ 53 | 54 | ### system ignore ### 55 | .DS_Store 56 | Thumbs.db 57 | Servers 58 | .metadata 59 | upload 60 | gen_code 61 | 62 | ### node ### 63 | node_modules 64 | 65 | work 66 | 67 | test/ 68 | 69 | .vscode -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/dataset/AiDatasetsUploadDocDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.dataset; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | import lombok.experimental.Accessors; 8 | 9 | /** 10 | * @author fxz 11 | * @since 2025/9/9 13:21 12 | */ 13 | @Accessors(chain = true) 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | @Schema(title = "") 17 | @Data 18 | public class AiDatasetsUploadDocDTO { 19 | 20 | @Schema(description = "数据集id") 21 | private Long datasetsId; 22 | 23 | @Schema(description = "索引类型") 24 | private String indexTypes; 25 | 26 | @Schema(description = "文件名称") 27 | private String fileName; 28 | 29 | @Schema(description = "桶名称") 30 | private String bucketName; 31 | 32 | @Schema(description = "原始文件名称") 33 | private String originalFilename; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/dataset/AiDocumentSegmentDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.dataset; 2 | 3 | import com.art.mybatis.common.base.BaseCreateEntity; 4 | 5 | import io.swagger.v3.oas.annotations.media.Schema; 6 | 7 | import lombok.Data; 8 | 9 | import java.io.Serial; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-09-14 14 | */ 15 | @Schema(title = "") 16 | @Data 17 | public class AiDocumentSegmentDTO extends BaseCreateEntity { 18 | 19 | @Serial 20 | private static final long serialVersionUID = -1L; 21 | 22 | @Schema(description = "") 23 | private Long id; 24 | 25 | @Schema(description = "分段内容") 26 | private String segment; 27 | 28 | @Schema(description = "数据集id") 29 | private Long datasetId; 30 | 31 | @Schema(description = "文档id") 32 | private Long documentId; 33 | 34 | @Schema(description = "") 35 | private Long tenantId; 36 | 37 | private String segmentType; 38 | 39 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/enums/MessageStatusEnum.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 MessageStatusEnum { 15 | 16 | /** 17 | * 已完成 18 | */ 19 | COMPLETED("completed", "已完成"); 20 | 21 | /** 22 | * 状态码 23 | */ 24 | private final String code; 25 | 26 | /** 27 | * 状态描述 28 | */ 29 | private final String desc; 30 | 31 | /** 32 | * 根据code获取枚举 33 | * @param code 状态码 34 | * @return 枚举 35 | */ 36 | public static MessageStatusEnum fromCode(String code) { 37 | for (MessageStatusEnum status : values()) { 38 | if (status.getCode().equals(code)) { 39 | return status; 40 | } 41 | } 42 | throw new IllegalArgumentException("Unknown message status code: " + code); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiQaSimilarQuestionsMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiQaSimilarQuestionsDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.apache.ibatis.annotations.Select; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * QA相似问题Mapper 13 | * 14 | * @author fxz 15 | * @since 2025/10/12 16 | */ 17 | @Mapper 18 | public interface AiQaSimilarQuestionsMapper extends BaseMapper { 19 | 20 | /** 21 | * 根据相似问题Hash查询 22 | */ 23 | @Select("SELECT s.* FROM ai_qa_similar_questions s " + "INNER JOIN ai_qa_pairs p ON s.qa_pair_id = p.id " 24 | + "WHERE s.similar_hash = #{similarHash} AND p.enabled = 1") 25 | List findByHashWithEnabledQa(@Param("similarHash") String similarHash); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/AgentService.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent; 2 | 3 | import com.art.ai.core.dto.AiAgentDTO; 4 | import com.art.ai.core.dto.AiAgentPageDTO; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Agent 定义服务 11 | * 12 | * @author fxz 13 | * @since 2025-11-01 14 | */ 15 | public interface AgentService { 16 | 17 | Boolean add(AiAgentDTO dto); 18 | 19 | Boolean update(AiAgentDTO dto); 20 | 21 | Boolean delete(Long id); 22 | 23 | AiAgentDTO findById(Long id); 24 | 25 | List listByAppId(Long appId); 26 | 27 | IPage page(AiAgentPageDTO pageDTO); 28 | 29 | Boolean saveDraft(AiAgentDTO dto); 30 | 31 | Boolean publish(AiAgentDTO dto); 32 | 33 | AiAgentDTO findPublishedByAppId(Long appId); 34 | 35 | AiAgentDTO findDraftByAppId(Long appId); 36 | 37 | AiAgentDTO findLastAgent(Long appId); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/store/config/Neo4jConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.store.config; 2 | 3 | import lombok.RequiredArgsConstructor; 4 | import org.neo4j.driver.AuthTokens; 5 | import org.neo4j.driver.Driver; 6 | import org.neo4j.driver.GraphDatabase; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | /** 11 | * @author fxz 12 | */ 13 | @Configuration 14 | @RequiredArgsConstructor 15 | public class Neo4jConfiguration { 16 | 17 | private final Neo4jProperties neo4jProperties; 18 | 19 | @Bean(destroyMethod = "close") 20 | public Driver neo4jDriver() { 21 | String uri = String.format("neo4j://%s:%s", neo4jProperties.getHost(), neo4jProperties.getPort()); 22 | return GraphDatabase.driver(uri, AuthTokens.basic(neo4jProperties.getUser(), neo4jProperties.getPassword())); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiModelPlatformConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.AiModelPlatformDTO; 4 | import com.art.ai.dao.dataobject.AiModelPlatformDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-10-09 14 | */ 15 | @Mapper 16 | public interface AiModelPlatformConvert { 17 | 18 | AiModelPlatformConvert INSTANCE = Mappers.getMapper(AiModelPlatformConvert.class); 19 | 20 | Page convertPage(Page aiModelPlatformDO); 21 | 22 | List convertList(List aiModelPlatformDO); 23 | 24 | AiModelPlatformDTO convert(AiModelPlatformDO aiModelPlatformDO); 25 | 26 | AiModelPlatformDO convert(AiModelPlatformDTO aiModelPlatformDTO); 27 | 28 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/dao/mysql/AiConversationMapper.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.dao.mysql; 2 | 3 | import com.art.ai.dao.dataobject.AiConversationDO; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.math.BigDecimal; 9 | 10 | /** 11 | * AI会话Mapper 12 | * 13 | * @author fxz 14 | * @date 2025-10-18 15 | */ 16 | @Mapper 17 | public interface AiConversationMapper extends BaseMapper { 18 | 19 | /** 20 | * 更新会话统计信息(消息数、Token、成本、最后消息时间) 21 | * @param conversationId 会话ID 22 | * @param messageDelta 消息数增量 23 | * @param tokensDelta Token增量 24 | * @param costDelta 成本增量 25 | * @return 更新行数 26 | */ 27 | int updateStats(@Param("conversationId") Long conversationId, @Param("messageDelta") int messageDelta, 28 | @Param("tokensDelta") int tokensDelta, @Param("costDelta") BigDecimal costDelta); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-server-system/src/main/java/com/art/system/service/RoleMenuService.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.service; 18 | 19 | /** 20 | * @author Fxz 21 | * @version 0.0.1 22 | * @date 2022-02-28 18:34 23 | */ 24 | public interface RoleMenuService { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/conversation/AgentRunDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.conversation; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import lombok.Data; 5 | 6 | import java.io.Serial; 7 | import java.io.Serializable; 8 | import java.util.Map; 9 | 10 | /** 11 | * Agent 运行请求 DTO 12 | * 13 | * @author fxz 14 | * @since 2025-11-01 15 | */ 16 | @Data 17 | public class AgentRunDTO implements Serializable { 18 | 19 | @Serial 20 | private static final long serialVersionUID = -1L; 21 | 22 | @Schema(description = "Agent ID", required = true) 23 | private Long agentId; 24 | 25 | @Schema(description = "运行 ID", required = false) 26 | private String runId; 27 | 28 | @Schema(description = "会话 ID", required = true) 29 | private Long conversationId; 30 | 31 | @Schema(description = "用户输入", required = true) 32 | private String userQuery; 33 | 34 | @Schema(description = "运行变量") 35 | private Map variables; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/ner/EntitySource.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.ner; 2 | 3 | /** 4 | * 实体识别来源 5 | * 6 | * @author fxz 7 | * @since 2025/10/05 8 | */ 9 | public enum EntitySource { 10 | 11 | /** 12 | * 基于大语言模型的实体识别 13 | */ 14 | LLM("llm", "大语言模型"), 15 | 16 | /** 17 | * 基于规则的实体识别 18 | */ 19 | RULE("rule", "规则引擎"), 20 | 21 | /** 22 | * 基于NER模型的实体识别 23 | */ 24 | NER_MODEL("ner_model", "NER模型"), 25 | 26 | /** 27 | * 基于词典的实体识别 28 | */ 29 | DICTIONARY("dictionary", "词典匹配"), 30 | 31 | /** 32 | * 混合方法 33 | */ 34 | HYBRID("hybrid", "混合方法"); 35 | 36 | private final String code; 37 | 38 | private final String description; 39 | 40 | EntitySource(String code, String description) { 41 | this.code = code; 42 | this.description = description; 43 | } 44 | 45 | public String getCode() { 46 | return code; 47 | } 48 | 49 | public String getDescription() { 50 | return description; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/graph/entity/GraphEdge.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.graph.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import java.util.Map; 10 | 11 | @NoArgsConstructor 12 | @AllArgsConstructor 13 | @Builder 14 | @Data 15 | public class GraphEdge { 16 | 17 | private String id; 18 | 19 | private String label; 20 | 21 | private Double weight; 22 | 23 | private String description; 24 | 25 | @JsonProperty("text_segment_id") 26 | private String textSegmentId; 27 | 28 | private Map metadata; 29 | 30 | private String startId; 31 | 32 | private String sourceName; 33 | 34 | private Map sourceMetadata; 35 | 36 | private String endId; 37 | 38 | private String targetName; 39 | 40 | private Map targetMetadata; 41 | 42 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/qa/AiQaPairsPageDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.qa; 2 | 3 | import com.art.core.common.model.PageParam; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | import java.io.Serial; 9 | 10 | /** 11 | * QA问答对分页查询DTO 12 | * 13 | * @author fxz 14 | * @since 2025/10/12 15 | */ 16 | @Schema(title = "QA问答对分页查询") 17 | @Data 18 | @EqualsAndHashCode(callSuper = true) 19 | public class AiQaPairsPageDTO extends PageParam { 20 | 21 | @Serial 22 | private static final long serialVersionUID = -1L; 23 | 24 | @Schema(description = "数据集ID") 25 | private Long datasetId; 26 | 27 | @Schema(description = "关键词搜索(问题/答案)") 28 | private String question; 29 | 30 | @Schema(description = "是否启用") 31 | private Boolean enabled; 32 | 33 | @Schema(description = "优先级") 34 | private Integer priority; 35 | 36 | @Schema(description = "是否已向量化") 37 | private Boolean vectorIndexed; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/AiAgentPageDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto; 2 | 3 | import com.art.core.common.model.BasePageEntity; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Builder; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | /** 11 | * Agent 分页查询 DTO 12 | * 13 | * @author fxz 14 | * @since 2025-11-01 15 | */ 16 | @Data 17 | @Builder 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @Schema(title = "Agent分页查询") 21 | public class AiAgentPageDTO extends BasePageEntity { 22 | 23 | private static final long serialVersionUID = -1L; 24 | 25 | @Schema(description = "主键") 26 | private Long id; 27 | 28 | @Schema(description = "应用ID") 29 | private Long appId; 30 | 31 | @Schema(description = "Agent名称") 32 | private String name; 33 | 34 | @Schema(description = "状态") 35 | private String status; 36 | 37 | @Schema(description = "租户ID") 38 | private Long tenantId; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiDocumentSegmentConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.dataset.AiDocumentSegmentDTO; 4 | import com.art.ai.dao.dataobject.AiDocumentSegmentDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author fxz 13 | * @date 2025-09-14 14 | */ 15 | @Mapper 16 | public interface AiDocumentSegmentConvert { 17 | 18 | AiDocumentSegmentConvert INSTANCE = Mappers.getMapper(AiDocumentSegmentConvert.class); 19 | 20 | Page convertPage(Page aiDocumentGraphSegmentDO); 21 | 22 | List convertList(List aiDocumentSegmentDO); 23 | 24 | AiDocumentSegmentDTO convert(AiDocumentSegmentDO aiDocumentSegmentDO); 25 | 26 | AiDocumentSegmentDO convert(AiDocumentSegmentDTO aiDocumentSegmentDTO); 27 | 28 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/AiAgentDTO.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 | import lombok.EqualsAndHashCode; 7 | 8 | /** 9 | * Agent DTO 10 | * 11 | * @author fxz 12 | * @since 2025-11-01 13 | */ 14 | @Data 15 | @Schema(title = "Agent配置") 16 | @EqualsAndHashCode(callSuper = true) 17 | public class AiAgentDTO extends BaseCreateEntity { 18 | 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 = "Agent名称") 28 | private String name; 29 | 30 | @Schema(description = "Agent状态(draft/published)") 31 | private String status; 32 | 33 | @Schema(description = "Agent规格JSON") 34 | private String specJson; 35 | 36 | @Schema(description = "租户ID") 37 | private Long tenantId; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/variable/VariableType.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.variable; 2 | 3 | import lombok.Getter; 4 | 5 | /** 6 | * @author fxz 7 | */ 8 | 9 | @Getter 10 | public enum VariableType { 11 | 12 | ENVIRONMENT("env", "环境变量"), SYSTEM("sys", "系统变量"), CONVERSATION("conversation", "会话变量"), 13 | USER_INPUT("input", "用户输入"), NODE_OUTPUT("output", "节点出参"); 14 | 15 | @com.fasterxml.jackson.annotation.JsonValue 16 | private final String type; 17 | 18 | private final String description; 19 | 20 | VariableType(String type, String description) { 21 | this.type = type; 22 | this.description = description; 23 | } 24 | 25 | @com.fasterxml.jackson.annotation.JsonCreator 26 | public static VariableType of(String type) { 27 | for (VariableType variableType : values()) { 28 | if (variableType.getType().equals(type)) { 29 | return variableType; 30 | } 31 | } 32 | throw new IllegalArgumentException("未知的变量类型: " + type); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiMessageConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.conversation.AiMessageDTO; 4 | import com.art.ai.dao.dataobject.AiMessageDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * AI消息转换器 13 | * 14 | * @author fxz 15 | * @date 2025-10-18 16 | */ 17 | @Mapper 18 | public interface AiMessageConvert { 19 | 20 | AiMessageConvert INSTANCE = Mappers.getMapper(AiMessageConvert.class); 21 | 22 | /** 23 | * 分页转换 24 | */ 25 | Page convertPage(Page page); 26 | 27 | /** 28 | * 列表转换 29 | */ 30 | List convertList(List list); 31 | 32 | /** 33 | * DO转DTO 34 | */ 35 | AiMessageDTO convert(AiMessageDO messageDO); 36 | 37 | /** 38 | * DTO转DO 39 | */ 40 | AiMessageDO convert(AiMessageDTO messageDTO); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /art-framework/art-spring-boot-starter-file/src/main/java/com/art/common/file/core/client/local/LocalProperties.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.file.core.client.local; 18 | 19 | import lombok.Data; 20 | 21 | @Data 22 | public class LocalProperties { 23 | 24 | private String basePath = "/Users/fxz/file"; 25 | 26 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/model/AiModelPlatformService.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.model; 2 | 3 | import com.art.ai.core.dto.AiModelPlatformDTO; 4 | import com.art.ai.core.dto.AiModelPlatformPageDTO; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-10-09 12 | */ 13 | public interface AiModelPlatformService { 14 | 15 | /** 16 | * 添加 17 | */ 18 | Boolean addAiModelPlatform(AiModelPlatformDTO aiModelPlatformDTO); 19 | 20 | /** 21 | * 修改 22 | */ 23 | Boolean updateAiModelPlatform(AiModelPlatformDTO aiModelPlatformDTO); 24 | 25 | /** 26 | * 分页 27 | */ 28 | IPage pageAiModelPlatform(AiModelPlatformPageDTO aiModelPlatformPageDTO); 29 | 30 | /** 31 | * 获取单条 32 | */ 33 | AiModelPlatformDTO findById(Long id); 34 | 35 | /** 36 | * 获取全部 37 | */ 38 | List findAll(); 39 | 40 | /** 41 | * 删除 42 | */ 43 | Boolean deleteAiModelPlatform(Long id); 44 | 45 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: art-ai 4 | cloud: 5 | nacos: 6 | config: 7 | server-addr: ${NACOS_HOST:art-nacos}:8848 8 | discovery: 9 | server-addr: ${NACOS_HOST:art-nacos}:8848 10 | username: nacos 11 | password: art-nacos 12 | config: 13 | import: 14 | - optional:nacos:${spring.application.name}.yaml 15 | - optional:nacos:art-common.yaml 16 | servlet: 17 | multipart: 18 | max-file-size: 100MB # 单个文件上传大小 19 | max-request-size: 100MB # 总文件上传大小 20 | main: 21 | allow-circular-references: true 22 | 23 | tmp: 24 | embedding: 25 | host: ${PG_VECTOR_HOST:art-pg_vector} 26 | port: 5432 27 | database: art 28 | user: root 29 | password: art-pgvector-password 30 | dimension: 1024 31 | table: ai_vector_store 32 | graph: 33 | neo4j: 34 | user: neo4j 35 | password: art-neo4j-password 36 | host: ${GRAPH_HOST:art-neo4j} 37 | port: 7687 38 | 39 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/constant/GraphStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.constant; 2 | 3 | import com.baomidou.mybatisplus.annotation.IEnum; 4 | import com.fasterxml.jackson.annotation.JsonCreator; 5 | import com.fasterxml.jackson.annotation.JsonValue; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Getter; 8 | 9 | import java.util.stream.Stream; 10 | 11 | /** 12 | * @author fxz 13 | */ 14 | @Getter 15 | @AllArgsConstructor 16 | public enum GraphStatusEnum implements IEnum { 17 | 18 | NONE(1, "未图谱化"), DOING(2, "图谱化中"), DONE(3, "已图谱化"), FAIL(4, "图谱化失败"); 19 | 20 | private final Integer value; 21 | 22 | @JsonValue 23 | private final String desc; 24 | 25 | @JsonCreator 26 | public static GraphStatusEnum fromValue(Integer value) { 27 | return Stream.of(GraphStatusEnum.values()) 28 | .filter(status -> status.getValue().equals(value)) 29 | .findAny() 30 | .orElseThrow(() -> new IllegalArgumentException("Unknown value: " + value)); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/retrieval/entity/RetrievalRequest.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.retrieval.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | import org.apache.commons.collections4.CollectionUtils; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * 召回请求实体 13 | * 14 | * @author fxz 15 | * @since 2025/10/05 16 | */ 17 | @Data 18 | @Builder 19 | @NoArgsConstructor 20 | @AllArgsConstructor 21 | public class RetrievalRequest { 22 | 23 | private String query; 24 | 25 | private Long datasetId; 26 | 27 | private List datasetIds; 28 | 29 | private List retrievalTypes; 30 | 31 | /** 32 | * 获取所有数据集ID 33 | */ 34 | public List getAllDatasetIds() { 35 | if (CollectionUtils.isNotEmpty(datasetIds)) { 36 | return datasetIds; 37 | } 38 | 39 | if (datasetId != null) { 40 | return List.of(datasetId); 41 | } 42 | 43 | return List.of(); 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/enums/MessageRoleEnum.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 MessageRoleEnum { 15 | 16 | /** 17 | * 用户 18 | */ 19 | USER("user", "用户"), 20 | 21 | /** 22 | * 助手 23 | */ 24 | ASSISTANT("assistant", "助手"), 25 | 26 | /** 27 | * 系统 28 | */ 29 | SYSTEM("system", "系统"); 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 MessageRoleEnum fromCode(String code) { 47 | for (MessageRoleEnum role : values()) { 48 | if (role.getCode().equals(code)) { 49 | return role; 50 | } 51 | } 52 | throw new IllegalArgumentException("Unknown message role code: " + code); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /art-server/art-server-generate/src/main/resources/mapper/DatasourceConfMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /art-server/art-server-system/src/main/resources/mapper/useRole/UserRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/tool/AgentToolDefinition.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.tool; 2 | 3 | import dev.langchain4j.model.chat.request.json.JsonObjectSchema; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | import java.time.Duration; 8 | import java.util.Collections; 9 | import java.util.List; 10 | 11 | /** 12 | * Agent 工具定义 13 | * 14 | * @author fxz 15 | * @since 2025-11-01 16 | */ 17 | @Data 18 | @Builder 19 | public class AgentToolDefinition { 20 | 21 | private String name; 22 | 23 | private String description; 24 | 25 | private Duration timeout; 26 | 27 | @Builder.Default 28 | private List arguments = Collections.emptyList(); 29 | 30 | /** 31 | * tool function 的 JSON Schema 定义 32 | */ 33 | private JsonObjectSchema parametersSchema; 34 | 35 | public JsonObjectSchema parametersSchemaOrDefault() { 36 | if (parametersSchema != null) { 37 | return parametersSchema; 38 | } 39 | return ToolSchemaBuilder.fromArguments(arguments); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /art-server/art-server-system/src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- 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 | required=\u4E0D\u80FD\u4E3A\u7A7A 18 | range=\u6709\u6548\u957F\u5EA6{min}\u5230{max}\u4E2A\u5B57\u7B26 19 | email=\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5408\u6CD5 20 | mobile=\u624B\u673A\u53F7\u4E0D\u5408\u6CD5 21 | noMoreThan=\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7{max}\u4E2A\u5B57\u7B26 -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/AiModelPlatformDTO.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-10-09 10 | */ 11 | @Schema(title = "") 12 | @Data 13 | public class AiModelPlatformDTO extends BaseCreateEntity { 14 | 15 | private static final long serialVersionUID = -1L; 16 | 17 | @Schema(description = "主键") 18 | private Long id; 19 | 20 | @Schema(description = "厂商名称") 21 | private String name; 22 | 23 | @Schema(description = "base_url") 24 | private String baseUrl; 25 | 26 | @Schema(description = "api_key") 27 | private String apiKey; 28 | 29 | @Schema(description = "secret_key") 30 | private String secretKey; 31 | 32 | @Schema(description = "是否启用代理") 33 | private Integer proxyEnable; 34 | 35 | @Schema(description = "是否兼容openapi协议") 36 | private Integer openaiApiCompatible; 37 | 38 | @Schema(description = "") 39 | private Long tenantId; 40 | 41 | } -------------------------------------------------------------------------------- /art-framework/art-framework-encrypt/art-api-sdk-encrypt/src/main/java/com/art/api/encrypt/sdk/constants/EncryptType.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.api.encrypt.sdk.constants; 18 | 19 | /** 20 | * @author fxz 21 | * @version 0.0.1 22 | * @date 2024/4/4 15:32 23 | */ 24 | public enum EncryptType { 25 | 26 | RSA, 27 | 28 | DES, 29 | 30 | AES 31 | 32 | } 33 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/document/AiDocumentSegmentPageDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto.document; 2 | 3 | import com.art.core.common.model.BasePageEntity; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Builder; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | /** 11 | * @author fxz 12 | * @date 2025-10-02 13 | */ 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | @Builder 17 | @Schema(title = "") 18 | @Data 19 | public class AiDocumentSegmentPageDTO extends BasePageEntity { 20 | 21 | private static final long serialVersionUID = -1L; 22 | 23 | @Schema(description = "") 24 | private Long id; 25 | 26 | @Schema(description = "分段内容") 27 | private String segment; 28 | 29 | @Schema(description = "数据集id") 30 | private Long datasetId; 31 | 32 | @Schema(description = "文档id") 33 | private Long documentId; 34 | 35 | @Schema(description = "") 36 | private Long tenantId; 37 | 38 | @Schema(description = "") 39 | private String segmentType; 40 | 41 | } -------------------------------------------------------------------------------- /art-framework/art-base-core/art-core/src/main/java/com/art/core/common/model/CityEntity.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.model; 18 | 19 | import lombok.Data; 20 | 21 | /** 22 | * @author fxz 23 | */ 24 | @Data 25 | public class CityEntity { 26 | 27 | private String value; 28 | 29 | private String name; 30 | 31 | private String parent; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/AiAppPageDTO.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.dto; 2 | 3 | import com.art.core.common.model.BasePageEntity; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Builder; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | /** 11 | * @author fxz 12 | * @date 2025-07-25 13 | */ 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | @Builder 17 | @Schema(title = "") 18 | @Data 19 | public class AiAppPageDTO extends BasePageEntity { 20 | 21 | private static final long serialVersionUID = -1L; 22 | 23 | @Schema(description = "") 24 | private Long id; 25 | 26 | @Schema(description = "") 27 | private String name; 28 | 29 | @Schema(description = "") 30 | private String description; 31 | 32 | @Schema(description = "") 33 | private String mode; 34 | 35 | @Schema(description = "") 36 | private String icon; 37 | 38 | @Schema(description = "") 39 | private String status; 40 | 41 | @Schema(description = "") 42 | private Long tenantId; 43 | 44 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/agent/runtime/AgentProgressMessage.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.agent.runtime; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | import java.util.Map; 7 | 8 | /** 9 | * Agent进度消息 10 | * 11 | * @author fxz 12 | */ 13 | @Getter 14 | public class AgentProgressMessage { 15 | 16 | private final IntermediateProcess intermediateProcess; 17 | 18 | private AgentProgressMessage(String type, Map data) { 19 | this.intermediateProcess = new IntermediateProcess(type, data); 20 | } 21 | 22 | /** 23 | * 创建进度消息 24 | * @param type 进度类型:plan | tool_start | tool_end 25 | * @param data 进度数据 26 | */ 27 | public static AgentProgressMessage of(String type, Map data) { 28 | return new AgentProgressMessage(type, data); 29 | } 30 | 31 | /** 32 | * 中间过程数据 33 | */ 34 | @Getter 35 | @AllArgsConstructor 36 | public static class IntermediateProcess { 37 | 38 | private final String type; 39 | 40 | private final Map data; 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/model/runtime/protocol/ModelProtocolRegistry.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.AiModelRuntimeContext; 5 | import com.art.core.common.exception.ArtException; 6 | import lombok.RequiredArgsConstructor; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * 模型协议注册器 13 | * 14 | * @author fxz 15 | */ 16 | @Component 17 | @RequiredArgsConstructor 18 | public class ModelProtocolRegistry { 19 | 20 | private final List handlers; 21 | 22 | public ModelProtocolHandler resolve(AiModelRuntimeContext context, AiModelCapability capability) { 23 | return handlers.stream() 24 | .filter(handler -> handler.supports(context, capability)) 25 | .findFirst() 26 | .orElseThrow(() -> new ArtException(String.format("No protocol handler for capability=%s, protocol=%s", 27 | capability, context.getProtocolType()))); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /art-server/art-server-system/src/main/java/com/art/system/dao/mysql/UserRoleMapper.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.dao.mysql; 18 | 19 | import com.art.system.dao.dataobject.UserRoleDO; 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | 22 | /** 23 | * @author fxz 24 | */ 25 | public interface UserRoleMapper extends BaseMapper { 26 | 27 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/WorkFlowContext.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow; 2 | 3 | import com.art.ai.core.dto.AiWorkflowRuntimeDTO; 4 | import com.art.ai.service.workflow.callback.MessageCompletionCallback; 5 | import com.art.ai.service.workflow.variable.VariablePool; 6 | import lombok.Data; 7 | import lombok.experimental.Accessors; 8 | 9 | import java.util.Map; 10 | 11 | /** 12 | * 工作流上下文 13 | * 14 | * @author fxz 15 | * @since 2025/8/10 17:11 16 | */ 17 | @Accessors(chain = true) 18 | @Data 19 | public class WorkFlowContext { 20 | 21 | private VariablePool pool; 22 | 23 | /** 24 | * 当前运行节点 ID 25 | */ 26 | private String currentNodeId; 27 | 28 | /** 29 | * 当前运行节点名称 30 | */ 31 | private String currentNodeLabel; 32 | 33 | /** 34 | * 工作流运行时 35 | */ 36 | private AiWorkflowRuntimeDTO runtime; 37 | 38 | /** 39 | * 消息完成回调 40 | */ 41 | private MessageCompletionCallback messageCompletionCallback; 42 | 43 | /** 44 | * 会话变量声明 45 | */ 46 | private Map conversationVariableDeclaration; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /art-framework/art-framework-message-queue/art-message-queue/src/main/java/com/art/mq/common/message/AbstractMessage.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.common.message; 18 | 19 | import java.io.Serializable; 20 | 21 | /** 22 | * @author fxz 23 | * @version 0.0.1 24 | * @date 2023/6/30 14:38 25 | */ 26 | public abstract class AbstractMessage implements Serializable { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/dto/AiModelDTO.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-10-09 10 | */ 11 | @Schema(title = "") 12 | @Data 13 | public class AiModelDTO extends BaseCreateEntity { 14 | 15 | private static final long serialVersionUID = -1L; 16 | 17 | @Schema(description = "主键") 18 | private Long id; 19 | 20 | @Schema(description = "模型类型(推理、chat等)") 21 | private String type; 22 | 23 | @Schema(description = "模型名称") 24 | private String name; 25 | 26 | @Schema(description = "所属平台") 27 | private Long platform; 28 | 29 | @Schema(description = "是否启用") 30 | private Integer enable; 31 | 32 | @Schema(description = "最大输入长度") 33 | private Long maxInputTokens; 34 | 35 | @Schema(description = "最大输出长度") 36 | private Long maxOutputTokens; 37 | 38 | @Schema(description = "模型配置") 39 | private String config; 40 | 41 | @Schema(description = "") 42 | private Long tenantId; 43 | 44 | } -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/dataset/rag/constant/EmbeddingStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.dataset.rag.constant; 2 | 3 | import com.baomidou.mybatisplus.annotation.IEnum; 4 | import com.fasterxml.jackson.annotation.JsonCreator; 5 | import com.fasterxml.jackson.annotation.JsonValue; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Getter; 8 | 9 | import java.util.stream.Stream; 10 | 11 | /** 12 | * @author fxz 13 | */ 14 | @Getter 15 | @AllArgsConstructor 16 | public enum EmbeddingStatusEnum implements IEnum { 17 | 18 | NONE(1, "未向量化"), 19 | 20 | DOING(2, "向量化中"), 21 | 22 | DONE(3, "已向量化"), 23 | 24 | FAIL(4, "向量化失败"); 25 | 26 | private final Integer value; 27 | 28 | @JsonValue 29 | private final String desc; 30 | 31 | @JsonCreator 32 | public static EmbeddingStatusEnum fromValue(Integer value) { 33 | return Stream.of(EmbeddingStatusEnum.values()) 34 | .filter(status -> status.getValue().equals(value)) 35 | .findAny() 36 | .orElseThrow(() -> new IllegalArgumentException("Unknown value: " + value)); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/core/convert/AiConversationConvert.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.core.convert; 2 | 3 | import com.art.ai.core.dto.conversation.AiConversationDTO; 4 | import com.art.ai.dao.dataobject.AiConversationDO; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import org.mapstruct.Mapper; 7 | import org.mapstruct.factory.Mappers; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * AI会话转换器 13 | * 14 | * @author fxz 15 | * @date 2025-10-18 16 | */ 17 | @Mapper 18 | public interface AiConversationConvert { 19 | 20 | AiConversationConvert INSTANCE = Mappers.getMapper(AiConversationConvert.class); 21 | 22 | /** 23 | * 分页转换 24 | */ 25 | Page convertPage(Page page); 26 | 27 | /** 28 | * 列表转换 29 | */ 30 | List convertList(List list); 31 | 32 | /** 33 | * DO转DTO 34 | */ 35 | AiConversationDTO convert(AiConversationDO conversationDO); 36 | 37 | /** 38 | * DTO转DO 39 | */ 40 | AiConversationDO convert(AiConversationDTO conversationDTO); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /art-server/art-ai/src/main/java/com/art/ai/service/workflow/runtime/WorkflowRuntimeService.java: -------------------------------------------------------------------------------- 1 | package com.art.ai.service.workflow.runtime; 2 | 3 | import com.art.ai.core.dto.AiWorkflowRuntimeDTO; 4 | import com.art.ai.core.dto.AiWorkflowRuntimePageDTO; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author fxz 11 | * @date 2025-08-09 12 | */ 13 | public interface WorkflowRuntimeService { 14 | 15 | /** 16 | * 添加 17 | */ 18 | AiWorkflowRuntimeDTO addAiWorkflowRuntime(AiWorkflowRuntimeDTO aiWorkflowRuntimeDTO); 19 | 20 | /** 21 | * 修改 22 | */ 23 | Boolean updateAiWorkflowRuntime(AiWorkflowRuntimeDTO aiWorkflowRuntimeDTO); 24 | 25 | /** 26 | * 分页 27 | */ 28 | IPage pageAiWorkflowRuntime(AiWorkflowRuntimePageDTO aiWorkflowRuntimePageDTO); 29 | 30 | /** 31 | * 获取单条 32 | */ 33 | AiWorkflowRuntimeDTO findById(Long id); 34 | 35 | /** 36 | * 获取全部 37 | */ 38 | List findAll(); 39 | 40 | /** 41 | * 删除 42 | */ 43 | Boolean deleteAiWorkflowRuntime(Long id); 44 | 45 | } -------------------------------------------------------------------------------- /art-framework/art-framework-cache/art-cache/src/main/java/com/art/cache/common/DistributedCacheProvider.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.cache.common; 18 | 19 | /** 20 | * 分布式缓存创建者 21 | * 22 | * @author Fxz 23 | * @version 0.0.1 24 | * @date 2023/3/23 15:39 25 | */ 26 | public interface DistributedCacheProvider { 27 | 28 | DistributedCache 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 | } --------------------------------------------------------------------------------