diff --git a/service-ai/.gitignore b/service-ai/.gitignore new file mode 100644 index 0000000..45a53ea --- /dev/null +++ b/service-ai/.gitignore @@ -0,0 +1,84 @@ +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf +.idea/**/aws.xml +.idea/**/contentModel.xml +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml +.idea/**/gradle.xml +.idea/**/libraries +cmake-build-*/ +.idea/**/mongoSettings.xml +*.iws +out/ +.idea_modules/ +atlassian-ide-plugin.xml +.idea/replstate.xml +.idea/sonarlint/ +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties +.idea/httpRequests +.idea/caches/build_file_checksums.ser +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +.mvn/wrapper/maven-wrapper.jar +.project +.classpath +*~ +.fuse_hidden* +.directory +.Trash-* +.nfs* +.gradle +**/build/ +!src/**/build/ +gradle-app.setting +!gradle-wrapper.jar +!gradle-wrapper.properties +.gradletasknamecache +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db +*.stackdump +[Dd]esktop.ini +$RECYCLE.BIN/ +*.cab +*.msi +*.msix +*.msm +*.msp +*.lnk +.DS_Store +.AppleDouble +.LSOverride +Icon +._* +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk diff --git a/service-ai/.idea/.gitignore b/service-ai/.idea/.gitignore new file mode 100644 index 0000000..7d05e99 --- /dev/null +++ b/service-ai/.idea/.gitignore @@ -0,0 +1,10 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# 依赖于环境的 Maven 主目录路径 +/mavenHomeManager.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/service-ai/.idea/ApifoxUploaderProjectSetting.xml b/service-ai/.idea/ApifoxUploaderProjectSetting.xml new file mode 100644 index 0000000..5df016c --- /dev/null +++ b/service-ai/.idea/ApifoxUploaderProjectSetting.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/service-ai/.idea/codeStyles/Project.xml b/service-ai/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..bb133b8 --- /dev/null +++ b/service-ai/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/service-ai/.idea/codeStyles/codeStyleConfig.xml b/service-ai/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/service-ai/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/service-ai/.idea/compiler.xml b/service-ai/.idea/compiler.xml new file mode 100644 index 0000000..8db8e1b --- /dev/null +++ b/service-ai/.idea/compiler.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/service-ai/.idea/encodings.xml b/service-ai/.idea/encodings.xml new file mode 100644 index 0000000..2addfaa --- /dev/null +++ b/service-ai/.idea/encodings.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/service-ai/.idea/jarRepositories.xml b/service-ai/.idea/jarRepositories.xml new file mode 100644 index 0000000..4f7560d --- /dev/null +++ b/service-ai/.idea/jarRepositories.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/service-ai/.idea/misc.xml b/service-ai/.idea/misc.xml new file mode 100644 index 0000000..732146c --- /dev/null +++ b/service-ai/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/service-ai/.idea/vcs.xml b/service-ai/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/service-ai/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/service-ai/pom.xml b/service-ai/pom.xml new file mode 100644 index 0000000..71da03a --- /dev/null +++ b/service-ai/pom.xml @@ -0,0 +1,172 @@ + + + 4.0.0 + + com.lanyuanxiaoyao + service-ai + 1.0.0-SNAPSHOT + pom + Hudi AI服务集合 + + service-ai-core + service-ai-chat + service-ai-knowledge + + + + 17 + 17 + UTF-8 + + b2b12 + + 3.4.3 + 2024.0.1 + 1.0.0-M6 + 11.1.0 + 5.1.0 + 5.8.27 + + + + + + + com.lanyuanxiaoyao + service-common + ${project.version} + + + com.lanyuanxiaoyao + service-configuration + ${project.version} + + + com.lanyuanxiaoyao + service-dependencies + ${project.version} + + + com.lanyuanxiaoyao + service-forest + ${project.version} + + + com.lanyuanxiaoyao + service-ai-core + ${project.version} + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + org.springframework.ai + spring-ai-bom + ${spring-ai.version} + pom + import + + + com.dtflys.forest + forest-spring-boot3-starter + 1.5.36 + + + com.fasterxml.jackson.datatype + jackson-datatype-eclipse-collections + 2.17.1 + + + com.github.ulisesbocchio + jasypt-spring-boot-starter + 3.0.5 + + + + + pl.tkowalcz.tjahzi + logback-appender + 0.9.23 + + + com.github.loki4j + loki-logback-appender-jdk8 + 1.4.2 + + + + + dev.failsafe + failsafe + 3.3.1 + + + org.eclipse.collections + eclipse-collections + ${eclipse-collections.version} + runtime + + + org.eclipse.collections + eclipse-collections-api + ${eclipse-collections.version} + + + cn.hutool + hutool-all + ${hutool.version} + + + + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + org.apache.maven.plugins + maven-shade-plugin + 3.3.0 + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + + + + + ${releases.id} + ${releases.name} + ${releases.url} + + + ${snapshots.id} + ${snapshots.name} + ${snapshots.url} + + + + \ No newline at end of file diff --git a/service-ai/service-ai-chat/pom.xml b/service-ai/service-ai-chat/pom.xml new file mode 100644 index 0000000..542ffa0 --- /dev/null +++ b/service-ai/service-ai-chat/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + com.lanyuanxiaoyao + service-ai + 1.0.0-SNAPSHOT + + + service-ai-chat + + + + com.lanyuanxiaoyao + service-ai-core + + + org.springframework.ai + spring-ai-openai-spring-boot-starter + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + package + + repackage + + + + + + + \ No newline at end of file diff --git a/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/AiChatApplication.java b/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/AiChatApplication.java new file mode 100644 index 0000000..4243a37 --- /dev/null +++ b/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/AiChatApplication.java @@ -0,0 +1,23 @@ +package com.lanyuanxiaoyao.service.ai.chat; + +import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.retry.annotation.EnableRetry; + +/** + * @author lanyuanxiaoyao + * @version 20250514 + */ +@SpringBootApplication(scanBasePackages = "com.lanyuanxiaoyao.service") +@EnableDiscoveryClient +@EnableConfigurationProperties +@EnableEncryptableProperties +@EnableRetry +public class AiChatApplication { + public static void main(String[] args) { + SpringApplication.run(AiChatApplication.class, args); + } +} diff --git a/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/controller/ChatController.java b/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/controller/ChatController.java new file mode 100644 index 0000000..c3b3d15 --- /dev/null +++ b/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/controller/ChatController.java @@ -0,0 +1,65 @@ +package com.lanyuanxiaoyao.service.ai.chat.controller; + +import java.io.IOException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.ai.chat.client.ChatClient; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +/** + * 聊天 + * + * @author lanyuanxiaoyao + * @version 20250514 + */ +@Controller +@RequestMapping("chat") +public class ChatController { + private static final Logger logger = LoggerFactory.getLogger(ChatController.class); + + private final ChatClient chatClient; + + public ChatController(ChatClient.Builder builder) { + this.chatClient = builder.build(); + } + + private ChatClient.ChatClientRequestSpec buildRequest(String message) { + return chatClient.prompt() + .user(message); + } + + @PostMapping(value = "sync", consumes = "text/plain;charset=utf-8") + @ResponseBody + public String chatSync(@RequestBody String message) { + return buildRequest(message) + .call() + .content(); + } + + @PostMapping(value = "async", consumes = "text/plain;charset=utf-8") + public SseEmitter chatAsync(@RequestBody String message) { + SseEmitter emitter = new SseEmitter(); + buildRequest(message) + .stream() + .content() + .subscribe( + content -> { + try { + emitter.send(content); + } catch (IOException e) { + emitter.completeWithError(e); + throw new RuntimeException(e); + } + }, + emitter::completeWithError, + emitter::complete + ); + return emitter; + } +} diff --git a/service-ai/service-ai-chat/src/main/resources/application.yml b/service-ai/service-ai-chat/src/main/resources/application.yml new file mode 100644 index 0000000..b828a5e --- /dev/null +++ b/service-ai/service-ai-chat/src/main/resources/application.yml @@ -0,0 +1,36 @@ +spring: + application: + name: service-ai-chat + profiles: + include: common,metrics,forest + cloud: + zookeeper: + enabled: true + connect-string: b1m2.hdp.dc:2181,b1m3.hdp.dc:2181,b1m4.hdp.dc:2181,b1m5.hdp.dc:2181,b1m6.hdp.dc:2181 + discovery: + enabled: ${spring.cloud.zookeeper.enabled} + root: /hudi-services + instance-id: ${spring.application.name}-127.0.0.1-${random.uuid}-20250514 + metadata: + discovery: zookeeper + ip: 127.0.0.1 + hostname: localhost + hostname_full: localhost + start_time: 20250514112750 + security: + meta: + authority: ENC(GXKnbq1LS11U2HaONspvH+D/TkIx13aWTaokdkzaF7HSvq6Z0Rv1+JUWFnYopVXu) + username: ENC(moIO5mO39V1Z+RDwROK9JXY4GfM8ZjDgM6Si7wRZ1MPVjbhTpmLz3lz28rAiw7c2LeCmizfJzHkEXIwGlB280g==) + darkcode: ENC(0jzpQ7T6S+P7bZrENgYsUoLhlqGvw7DA2MN3BRqEOwq7plhtg72vuuiPQNnr3DaYz0CpyTvxInhpx11W3VZ1trD6NINh7O3LN70ZqO5pWXk=) + ai: + openai: + base-url: http://132.121.206.65:10086 + api-key: '*XMySqV%>hR&v>>g*NwCs3tpQ5FVMFEF2VHVTjWSn:Wn].gs/+"v:q_Q*An~zF*g-@j@jtSTv5H/,S-3:R?r9R}.' +server: + port: 8080 \ No newline at end of file diff --git a/service-ai/service-ai-chat/src/main/resources/logback-spring.xml b/service-ai/service-ai-chat/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..01bad8b --- /dev/null +++ b/service-ai/service-ai-chat/src/main/resources/logback-spring.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr([${HOSTNAME}]){yellow} %clr([%t]){magenta} %clr(%logger{40}){cyan} #@# %m%n%wEx + + + + + ${LOGGING_PARENT:-.}/${APP_NAME:-run}.log + + ${LOGGING_PARENT:-.}/archive/${APP_NAME:-run}-%d{yyyy-MM-dd}.gz + 7 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %p [${HOSTNAME}] [%t] %logger #@# %m%n%wEx + + + + + + + + + + + \ No newline at end of file diff --git a/service-ai/service-ai-chat/src/test/java/com/lanyuanxiaoyao/service/ai/chat/TestChat.java b/service-ai/service-ai-chat/src/test/java/com/lanyuanxiaoyao/service/ai/chat/TestChat.java new file mode 100644 index 0000000..21463ac --- /dev/null +++ b/service-ai/service-ai-chat/src/test/java/com/lanyuanxiaoyao/service/ai/chat/TestChat.java @@ -0,0 +1,37 @@ +package com.lanyuanxiaoyao.service.ai.chat; + +import org.springframework.ai.chat.client.ChatClient; +import org.springframework.ai.openai.OpenAiChatModel; +import org.springframework.ai.openai.OpenAiChatOptions; +import org.springframework.ai.openai.api.OpenAiApi; +import reactor.core.Disposable; + +/** + * @author lanyuanxiaoyao + * @version 20250514 + */ +public class TestChat { + public static void main(String[] args) { + ChatClient client = ChatClient.builder( + OpenAiChatModel.builder() + .openAiApi( + OpenAiApi.builder() + .baseUrl("http://132.121.206.65:10086") + .apiKey("*XMySqV%>hR&v>>g*NwCs3tpQ5FVMFEF2VHVTj + + 4.0.0 + + com.lanyuanxiaoyao + service-ai + 1.0.0-SNAPSHOT + + + service-ai-core + + + + com.lanyuanxiaoyao + service-forest + + + com.dtflys.forest + forest-spring-boot-starter + + + org.springframework.cloud + spring-cloud-starter-sleuth + + + commons-logging + commons-logging + + + + + org.springframework.boot + spring-boot-starter-aop + + + com.dtflys.forest + forest-spring-boot3-starter + + + commons-logging + commons-logging + + + + + \ No newline at end of file diff --git a/service-ai/service-ai-core/src/main/java/com/lanyuanxiaoyao/service/configuration/SecurityConfig.java b/service-ai/service-ai-core/src/main/java/com/lanyuanxiaoyao/service/configuration/SecurityConfig.java new file mode 100644 index 0000000..0f40471 --- /dev/null +++ b/service-ai/service-ai-core/src/main/java/com/lanyuanxiaoyao/service/configuration/SecurityConfig.java @@ -0,0 +1,58 @@ +package com.lanyuanxiaoyao.service.configuration; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.Customizer; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.provisioning.InMemoryUserDetailsManager; +import org.springframework.security.web.SecurityFilterChain; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.CorsConfigurationSource; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; + +/** + * @author lanyuanxiaoyao + * @version 20250514 + */ +@Configuration +@EnableWebSecurity +public class SecurityConfig { + private static final Logger logger = LoggerFactory.getLogger(SecurityConfig.class); + + @Bean + public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { + return http.authorizeHttpRequests(registry -> registry.anyRequest().authenticated()) + .httpBasic(Customizer.withDefaults()) + .csrf(AbstractHttpConfigurer::disable) + .cors(configurer -> configurer.configurationSource(corsConfigurationSource())) + .formLogin(AbstractHttpConfigurer::disable) + .build(); + } + + private CorsConfigurationSource corsConfigurationSource() { + CorsConfiguration configuration = new CorsConfiguration(); + configuration.setAllowCredentials(true); + configuration.addAllowedHeader("*"); + configuration.addAllowedMethod("*"); + configuration.addAllowedOriginPattern("*"); + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + source.registerCorsConfiguration("/**", configuration); + return source; + } + + @Bean + public InMemoryUserDetailsManager userDetailsService(SecurityProperties securityProperties) { + UserDetails user = User.builder() + .username(securityProperties.getUsername()) + .password("{noop}" + securityProperties.getDarkcode()) + .authorities(securityProperties.getAuthority()) + .build(); + return new InMemoryUserDetailsManager(user); + } +} diff --git a/service-ai/service-ai-knowledge/pom.xml b/service-ai/service-ai-knowledge/pom.xml new file mode 100644 index 0000000..a1cfa33 --- /dev/null +++ b/service-ai/service-ai-knowledge/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + com.lanyuanxiaoyao + service-ai + 1.0.0-SNAPSHOT + + + service-ai-knowledge + + + + com.lanyuanxiaoyao + service-ai-core + + + com.google.protobuf + protobuf-java + + + + + org.springframework.ai + spring-ai-openai-spring-boot-starter + + + org.springframework.ai + spring-ai-qdrant-store-spring-boot-starter + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + package + + repackage + + + + + + + \ No newline at end of file diff --git a/service-ai/service-ai-knowledge/src/main/java/com/lanyuanxiaoyao/service/ai/knowledge/KnowledgeApplication.java b/service-ai/service-ai-knowledge/src/main/java/com/lanyuanxiaoyao/service/ai/knowledge/KnowledgeApplication.java new file mode 100644 index 0000000..57f9c20 --- /dev/null +++ b/service-ai/service-ai-knowledge/src/main/java/com/lanyuanxiaoyao/service/ai/knowledge/KnowledgeApplication.java @@ -0,0 +1,59 @@ +package com.lanyuanxiaoyao.service.ai.knowledge; + +import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; +import jakarta.annotation.Resource; +import java.net.MalformedURLException; +import org.springframework.ai.chat.client.ChatClient; +import org.springframework.ai.model.Media; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.core.io.FileUrlResource; +import org.springframework.retry.annotation.EnableRetry; +import org.springframework.util.MimeTypeUtils; + +/** + * @author lanyuanxiaoyao + * @version 20250515 + */ +@SpringBootApplication(scanBasePackages = "com.lanyuanxiaoyao.service") +@EnableDiscoveryClient +@EnableConfigurationProperties +@EnableEncryptableProperties +@EnableRetry +public class KnowledgeApplication implements ApplicationRunner { + @Resource + private ChatClient.Builder builder; + + public static void main(String[] args) { + SpringApplication.run(KnowledgeApplication.class, args); + } + + @Override + public void run(ApplicationArguments args) throws Exception { + ChatClient client = builder.build(); + String content = client.prompt() + .user( + prompt -> { + try { + prompt + .text("如实描述图片中的内容,不要加入自己的思考以及与图片内容无关的任何文本") + .media( + Media.builder() + .mimeType(MimeTypeUtils.IMAGE_PNG) + .data(new FileUrlResource("/Users/lanyuanxiaoyao/Pictures/数据使用合同签订.png")) + .build() + ); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + ) + .call() + .content(); + System.out.println(content); + } +} diff --git a/service-ai/service-ai-knowledge/src/main/java/com/lanyuanxiaoyao/service/ai/knowledge/controller/KnowledgeController.java b/service-ai/service-ai-knowledge/src/main/java/com/lanyuanxiaoyao/service/ai/knowledge/controller/KnowledgeController.java new file mode 100644 index 0000000..fa6c426 --- /dev/null +++ b/service-ai/service-ai-knowledge/src/main/java/com/lanyuanxiaoyao/service/ai/knowledge/controller/KnowledgeController.java @@ -0,0 +1,24 @@ +package com.lanyuanxiaoyao.service.ai.knowledge.controller; + +import jakarta.annotation.PostConstruct; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author lanyuanxiaoyao + * @version 20250515 + */ +@RestController +@RequestMapping("knowledge") +public class KnowledgeController { + private static final Logger logger = LoggerFactory.getLogger(KnowledgeController.class); + + public KnowledgeController() { + } + + @PostConstruct + public void initial() { + } +} diff --git a/service-ai/service-ai-knowledge/src/main/resources/application.yml b/service-ai/service-ai-knowledge/src/main/resources/application.yml new file mode 100644 index 0000000..4026d67 --- /dev/null +++ b/service-ai/service-ai-knowledge/src/main/resources/application.yml @@ -0,0 +1,43 @@ +spring: + application: + name: service-ai-knowledge + profiles: + include: common,metrics,forest + cloud: + zookeeper: + enabled: true + connect-string: b1m2.hdp.dc:2181,b1m3.hdp.dc:2181,b1m4.hdp.dc:2181,b1m5.hdp.dc:2181,b1m6.hdp.dc:2181 + discovery: + enabled: ${spring.cloud.zookeeper.enabled} + root: /hudi-services + instance-id: ${spring.application.name}-127.0.0.1-${random.uuid}-20250514 + metadata: + discovery: zookeeper + ip: 127.0.0.1 + hostname: localhost + hostname_full: localhost + start_time: 20250514112750 + security: + meta: + authority: ENC(GXKnbq1LS11U2HaONspvH+D/TkIx13aWTaokdkzaF7HSvq6Z0Rv1+JUWFnYopVXu) + username: ENC(moIO5mO39V1Z+RDwROK9JXY4GfM8ZjDgM6Si7wRZ1MPVjbhTpmLz3lz28rAiw7c2LeCmizfJzHkEXIwGlB280g==) + darkcode: ENC(0jzpQ7T6S+P7bZrENgYsUoLhlqGvw7DA2MN3BRqEOwq7plhtg72vuuiPQNnr3DaYz0CpyTvxInhpx11W3VZ1trD6NINh7O3LN70ZqO5pWXk=) + ai: + openai: + base-url: http://localhost:3000 + api-key: '*XMySqV%>hR&v>>g*NwCs3tpQ5FVMFEF2VHVTjWSn:Wn].gs/+"v:q_Q*An~zF*g-@j@jtSTv5H/,S-3:R?r9R}.' +server: + port: 8080 \ No newline at end of file diff --git a/service-ai/service-ai-knowledge/src/main/resources/logback-spring.xml b/service-ai/service-ai-knowledge/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..01bad8b --- /dev/null +++ b/service-ai/service-ai-knowledge/src/main/resources/logback-spring.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr([${HOSTNAME}]){yellow} %clr([%t]){magenta} %clr(%logger{40}){cyan} #@# %m%n%wEx + + + + + ${LOGGING_PARENT:-.}/${APP_NAME:-run}.log + + ${LOGGING_PARENT:-.}/archive/${APP_NAME:-run}-%d{yyyy-MM-dd}.gz + 7 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %p [${HOSTNAME}] [%t] %logger #@# %m%n%wEx + + + + + + + + + + + \ No newline at end of file