mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-16 14:43:42 +08:00
remove dark
This commit is contained in:
@@ -1,24 +1,21 @@
|
||||
package com.zl.mjga.config.ai;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "deep-seek")
|
||||
public class DeepSeekConfiguration {
|
||||
|
||||
@jakarta.annotation.Resource
|
||||
private ResourceLoader resourceLoader;
|
||||
@jakarta.annotation.Resource private ResourceLoader resourceLoader;
|
||||
|
||||
private String baseUrl;
|
||||
private String apiKey;
|
||||
@@ -37,4 +34,3 @@ public class DeepSeekConfiguration {
|
||||
prompt.setSystem(Files.readString(Paths.get(resource.getURI())));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,9 +62,7 @@ public class WebSecurityConfig {
|
||||
.permitAll()
|
||||
.anyRequest()
|
||||
.authenticated())
|
||||
.securityContext(securityContext -> securityContext
|
||||
.requireExplicitSave(false)
|
||||
)
|
||||
.securityContext(securityContext -> securityContext.requireExplicitSave(false))
|
||||
.exceptionHandling(
|
||||
(exceptionHandling) ->
|
||||
exceptionHandling
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.zl.mjga.controller;
|
||||
|
||||
import com.zl.mjga.service.DeepSeekAiService;
|
||||
import dev.langchain4j.service.TokenStream;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.time.Duration;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -32,7 +31,6 @@ public class AiController {
|
||||
})
|
||||
.onError(sink::tryEmitError)
|
||||
.start();
|
||||
return sink.asFlux()
|
||||
.timeout(Duration.ofSeconds(120));
|
||||
return sink.asFlux().timeout(Duration.ofSeconds(120));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user