feat: 删除冗余接口
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.klp.common.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "sales.script.ai")
|
||||
public class DeepseekConfig {
|
||||
|
||||
private String apiKey;
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
private String modelName;
|
||||
|
||||
private Integer maxRetries;
|
||||
|
||||
private Double temperature;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.klp.common.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "image.recognition")
|
||||
public class ImageRecognitionConfig {
|
||||
|
||||
/**
|
||||
* AI API配置
|
||||
*/
|
||||
private String apiUrl;
|
||||
private String modelName;
|
||||
private String apiKey;
|
||||
private Integer maxRetries = 3;
|
||||
private Double temperature = 0.0;
|
||||
private Integer maxTokens = 4096;
|
||||
|
||||
/**
|
||||
* 图片处理配置
|
||||
*/
|
||||
private Integer maxImageDimension = 512;
|
||||
private Integer imageQuality = 60;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.klp.common.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
/**
|
||||
* RestTemplate配置类
|
||||
*/
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
|
||||
@Bean
|
||||
public RestTemplate restTemplate() {
|
||||
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||
factory.setConnectTimeout(30000); // 30秒连接超时
|
||||
factory.setReadTimeout(60000); // 60秒读取超时
|
||||
|
||||
return new RestTemplate(factory);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.klp.common.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
/**
|
||||
* 销售话术生成器配置类
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-01-27
|
||||
*/
|
||||
@Configuration
|
||||
public class SalesScriptConfig {
|
||||
|
||||
/**
|
||||
* 配置RestTemplate用于AI API调用
|
||||
*/
|
||||
@Bean("salesScriptRestTemplate")
|
||||
public RestTemplate salesScriptRestTemplate() {
|
||||
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||
factory.setConnectTimeout(30000); // 30秒连接超时
|
||||
factory.setReadTimeout(60000); // 60秒读取超时
|
||||
return new RestTemplate(factory);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user