You've already forked FrameTour-BE
refactor(glm): 优化 GLM 客户端实现
- 添加 @Lazy 注解以延迟初始化 GLM 客户端 - 避免应用启动时不必要的资源消耗 - 提高系统启动性能和内存使用效率
This commit is contained in:
@@ -12,6 +12,7 @@ import io.reactivex.rxjava3.core.Flowable;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -23,6 +24,7 @@ import java.util.function.Consumer;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@Lazy
|
||||||
public class GlmClientImpl implements GlmClient {
|
public class GlmClientImpl implements GlmClient {
|
||||||
|
|
||||||
private static final String DEFAULT_MODEL = "glm-4.5-airx";
|
private static final String DEFAULT_MODEL = "glm-4.5-airx";
|
||||||
|
|||||||
Reference in New Issue
Block a user