feat: 删除冗余接口

This commit is contained in:
JR
2025-08-02 16:40:16 +08:00
parent bac9fbd1fb
commit 9f89ef9fcb
14 changed files with 106 additions and 646 deletions

View File

@@ -1,96 +0,0 @@
package com.klp.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* 图片识别配置类
*
* @author klp
* @date 2025-01-27
*/
@Configuration
@ConfigurationProperties(prefix = "image.recognition")
public class ImageRecognitionConfig {
/**
* AI API配置
*/
private String apiUrl = "https://api.siliconflow.cn/v1/chat/completions";
private String modelName = "Qwen/Qwen2.5-VL-72B-Instruct";
private String apiKey = "sk-sbmuklhrcxqlsucufqebiibauflxqfdafqjxaedtwirurtrc";
private Integer maxRetries = 3;
private Double temperature = 0.0;
private Integer maxTokens = 4096;
/**
* 图片处理配置
*/
private Integer maxImageDimension = 512;
private Integer imageQuality = 60;
// Getters and Setters
public String getApiUrl() {
return apiUrl;
}
public void setApiUrl(String apiUrl) {
this.apiUrl = apiUrl;
}
public String getModelName() {
return modelName;
}
public void setModelName(String modelName) {
this.modelName = modelName;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public Integer getMaxRetries() {
return maxRetries;
}
public void setMaxRetries(Integer maxRetries) {
this.maxRetries = maxRetries;
}
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 Integer getMaxImageDimension() {
return maxImageDimension;
}
public void setMaxImageDimension(Integer maxImageDimension) {
this.maxImageDimension = maxImageDimension;
}
public Integer getImageQuality() {
return imageQuality;
}
public void setImageQuality(Integer imageQuality) {
this.imageQuality = imageQuality;
}
}

View File

@@ -1,23 +0,0 @@
package com.klp.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);
}
}

View File

@@ -1,27 +0,0 @@
package com.klp.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);
}
}