refactor(glm): 优化 GLM 客户端实现

- 添加 @Lazy 注解以延迟初始化 GLM 客户端
- 避免应用启动时不必要的资源消耗
- 提高系统启动性能和内存使用效率
This commit is contained in:
2026-01-20 15:52:27 +08:00
parent fcc4b06295
commit 143426db1f

View File

@@ -12,6 +12,7 @@ import io.reactivex.rxjava3.core.Flowable;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
@@ -23,6 +24,7 @@ import java.util.function.Consumer;
*/
@Slf4j
@Component
@Lazy
public class GlmClientImpl implements GlmClient {
private static final String DEFAULT_MODEL = "glm-4.5-airx";