feat: increase api_key length and enhance ModelConfig annotations (#32)

* refactor: rename artifactId and application name to 'datamate'; add model configuration and related services

* refactor: simplify package scanning by using wildcard for mapper packages

* feat: add model health check functionality and improve model configuration

* feat: increase api_key length and enhance ModelConfig annotations
This commit is contained in:
Dallas98
2025-10-28 17:30:26 +08:00
committed by GitHub
parent 67eb571d8d
commit 3f484e988d
2 changed files with 4 additions and 5 deletions

View File

@@ -2,10 +2,7 @@ package com.datamate.common.models.domain.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.datamate.common.domain.model.base.BaseEntity;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.*;
/**
* 模型配置实体类
@@ -18,6 +15,8 @@ import lombok.ToString;
@TableName("t_model_config")
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class ModelConfig extends BaseEntity<String> {
/**
* 模型名称(如 qwen2)

View File

@@ -6,7 +6,7 @@ CREATE TABLE t_model_config
model_name VARCHAR(100) NOT NULL COMMENT '模型名称(如 qwen2)',
provider VARCHAR(50) NOT NULL COMMENT '模型提供商(如 Ollama、OpenAI、DeepSeek)',
base_url VARCHAR(255) NOT NULL COMMENT 'API 基础地址',
api_key VARCHAR(255) DEFAULT '' COMMENT 'API 密钥(无密钥则为空)',
api_key VARCHAR(512) DEFAULT '' COMMENT 'API 密钥(无密钥则为空)',
type VARCHAR(50) NOT NULL COMMENT '模型类型(如 chat、embedding)',
is_enabled TINYINT DEFAULT 1 COMMENT '是否启用:1-启用,0-禁用',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',