- 添加GLM大模型配置支持 - 配置生产环境Redis连接信息 - 更新支付回调URL路径配置 - 添加微信和支付宝支付配置到生产环境 - 修改异常处理器捕获BizException - 添加内容详情、需求说明和介绍字段 - 将内容管理重命名为skill管理 - 添加取消收藏功能接口 - 添加用户历史查看、收藏、购买和创建内容列表接口 - 实现用户行为统计和个性化内容推荐功能 - 更新数据库映射文件以支持新字段和查询功能
73 lines
1.5 KiB
Java
73 lines
1.5 KiB
Java
package com.kexue.skills.config;
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
/**
|
|
* GLM API配置类
|
|
*
|
|
* @author 维哥
|
|
* @since 2026-02-27
|
|
*/
|
|
@Component
|
|
@ConfigurationProperties(prefix = "spring.ai.glm")
|
|
public class GlmConfig {
|
|
|
|
private String baseUrl;
|
|
private String apiKey;
|
|
private ChatOptions chat;
|
|
|
|
public static class ChatOptions {
|
|
private String model;
|
|
private Double temperature;
|
|
private Integer maxTokens;
|
|
|
|
public String getModel() {
|
|
return model;
|
|
}
|
|
|
|
public void setModel(String model) {
|
|
this.model = model;
|
|
}
|
|
|
|
public Double getTemperature() {
|
|
return temperature;
|
|
}
|
|
|
|
public void setTemperature(Double temperature) {
|
|
this.temperature = temperature;
|
|
}
|
|
|
|
public Integer getMaxTokens() {
|
|
return maxTokens;
|
|
}
|
|
|
|
public void setMaxTokens(Integer maxTokens) {
|
|
this.maxTokens = maxTokens;
|
|
}
|
|
}
|
|
|
|
public String getBaseUrl() {
|
|
return baseUrl;
|
|
}
|
|
|
|
public void setBaseUrl(String baseUrl) {
|
|
this.baseUrl = baseUrl;
|
|
}
|
|
|
|
public String getApiKey() {
|
|
return apiKey;
|
|
}
|
|
|
|
public void setApiKey(String apiKey) {
|
|
this.apiKey = apiKey;
|
|
}
|
|
|
|
public ChatOptions getChat() {
|
|
return chat;
|
|
}
|
|
|
|
public void setChat(ChatOptions chat) {
|
|
this.chat = chat;
|
|
}
|
|
} |