添加图片识别千问大模型
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user