后台管理功能开发,AI配置管理
This commit is contained in:
@@ -0,0 +1,254 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* AI配置实体类
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-10-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_config")
|
||||
public class AiConfig extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@TableField("config_name")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置键值 (唯一标识)
|
||||
*/
|
||||
@TableField("config_key")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 配置类型: coze-扣子, openai-OpenAI, claude-Claude, gemini-Gemini等
|
||||
*/
|
||||
@TableField("config_type")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 服务提供商: coze, openai, anthropic, google等
|
||||
*/
|
||||
@TableField("provider")
|
||||
private String provider;
|
||||
|
||||
/**
|
||||
* API基础URL
|
||||
*/
|
||||
@TableField("api_base_url")
|
||||
private String apiBaseUrl;
|
||||
|
||||
/**
|
||||
* API访问令牌 (加密存储)
|
||||
*/
|
||||
@TableField("api_token")
|
||||
private String apiToken;
|
||||
|
||||
/**
|
||||
* API版本
|
||||
*/
|
||||
@TableField("api_version")
|
||||
private String apiVersion;
|
||||
|
||||
/**
|
||||
* 模型名称
|
||||
*/
|
||||
@TableField("model_name")
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* Bot ID (Coze专用)
|
||||
*/
|
||||
@TableField("bot_id")
|
||||
private String botId;
|
||||
|
||||
/**
|
||||
* Workflow ID (Coze专用)
|
||||
*/
|
||||
@TableField("workflow_id")
|
||||
private String workflowId;
|
||||
|
||||
/**
|
||||
* 超时时间(毫秒)
|
||||
*/
|
||||
@TableField("timeout_ms")
|
||||
private Integer timeoutMs;
|
||||
|
||||
/**
|
||||
* 重试次数
|
||||
*/
|
||||
@TableField("retry_count")
|
||||
private Integer retryCount;
|
||||
|
||||
/**
|
||||
* 重试延迟(毫秒)
|
||||
*/
|
||||
@TableField("retry_delay_ms")
|
||||
private Integer retryDelayMs;
|
||||
|
||||
/**
|
||||
* 最大Token数
|
||||
*/
|
||||
@TableField("max_tokens")
|
||||
private Integer maxTokens;
|
||||
|
||||
/**
|
||||
* 温度参数 (0.0-2.0)
|
||||
*/
|
||||
@TableField("temperature")
|
||||
private BigDecimal temperature;
|
||||
|
||||
/**
|
||||
* Top-p参数 (0.0-1.0)
|
||||
*/
|
||||
@TableField("top_p")
|
||||
private BigDecimal topP;
|
||||
|
||||
/**
|
||||
* 是否支持流式输出: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_stream")
|
||||
private Integer supportStream;
|
||||
|
||||
/**
|
||||
* 是否支持函数调用: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_function_call")
|
||||
private Integer supportFunctionCall;
|
||||
|
||||
/**
|
||||
* 是否支持视觉理解: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_vision")
|
||||
private Integer supportVision;
|
||||
|
||||
/**
|
||||
* 是否支持文件上传: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_file_upload")
|
||||
private Integer supportFileUpload;
|
||||
|
||||
/**
|
||||
* 使用场景: chat-聊天, summary-总结, emotion_analysis-情绪分析, content_generation-内容生成等
|
||||
*/
|
||||
@TableField("usage_scenario")
|
||||
private String usageScenario;
|
||||
|
||||
/**
|
||||
* 优先级 (数值越大优先级越高)
|
||||
*/
|
||||
@TableField("priority")
|
||||
private Integer priority;
|
||||
|
||||
/**
|
||||
* 输入Token价格(每1K)
|
||||
*/
|
||||
@TableField("input_price_per_1k")
|
||||
private BigDecimal inputPricePer1k;
|
||||
|
||||
/**
|
||||
* 输出Token价格(每1K)
|
||||
*/
|
||||
@TableField("output_price_per_1k")
|
||||
private BigDecimal outputPricePer1k;
|
||||
|
||||
/**
|
||||
* 货币单位
|
||||
*/
|
||||
@TableField("currency")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 每分钟请求限制
|
||||
*/
|
||||
@TableField("rate_limit_per_minute")
|
||||
private Integer rateLimitPerMinute;
|
||||
|
||||
/**
|
||||
* 每小时请求限制
|
||||
*/
|
||||
@TableField("rate_limit_per_hour")
|
||||
private Integer rateLimitPerHour;
|
||||
|
||||
/**
|
||||
* 每日请求限制
|
||||
*/
|
||||
@TableField("rate_limit_per_day")
|
||||
private Integer rateLimitPerDay;
|
||||
|
||||
/**
|
||||
* 是否启用: 0-禁用, 1-启用
|
||||
*/
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 是否为默认配置: 0-否, 1-是
|
||||
*/
|
||||
@TableField("is_default")
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 环境: development-开发, testing-测试, production-生产
|
||||
*/
|
||||
@TableField("environment")
|
||||
private String environment;
|
||||
|
||||
/**
|
||||
* 自定义请求头
|
||||
*/
|
||||
@TableField("custom_headers")
|
||||
private String customHeaders;
|
||||
|
||||
/**
|
||||
* 自定义参数
|
||||
*/
|
||||
@TableField("custom_params")
|
||||
private String customParams;
|
||||
|
||||
/**
|
||||
* Webhook回调地址
|
||||
*/
|
||||
@TableField("webhook_url")
|
||||
private String webhookUrl;
|
||||
|
||||
/**
|
||||
* 健康检查URL
|
||||
*/
|
||||
@TableField("health_check_url")
|
||||
private String healthCheckUrl;
|
||||
|
||||
/**
|
||||
* 健康检查间隔(分钟)
|
||||
*/
|
||||
@TableField("health_check_interval_minutes")
|
||||
private Integer healthCheckIntervalMinutes;
|
||||
|
||||
/**
|
||||
* 配置描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 使用说明
|
||||
*/
|
||||
@TableField("usage_notes")
|
||||
private String usageNotes;
|
||||
}
|
||||
Reference in New Issue
Block a user