feature: 新增小说封面图片生成功能
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""设置数据模型"""
|
||||
from sqlalchemy import Column, String, Text, Float, Integer, DateTime, Index
|
||||
from sqlalchemy import Column, String, Text, Float, Integer, DateTime, Boolean, Index
|
||||
from sqlalchemy.sql import func
|
||||
from app.database import Base
|
||||
import uuid
|
||||
@@ -18,6 +18,14 @@ class Settings(Base):
|
||||
temperature = Column(Float, default=0.7, comment="温度参数")
|
||||
max_tokens = Column(Integer, default=2000, comment="最大token数")
|
||||
system_prompt = Column(Text, comment="系统级别提示词,每次AI调用都会使用")
|
||||
|
||||
# 封面图片生成配置
|
||||
cover_api_provider = Column(String(50), comment="封面图片API提供商")
|
||||
cover_api_key = Column(String(500), comment="封面图片API密钥")
|
||||
cover_api_base_url = Column(String(500), comment="封面图片自定义API地址")
|
||||
cover_image_model = Column(String(100), comment="封面图片模型名称")
|
||||
cover_enabled = Column(Boolean, default=False, server_default="0", nullable=False, comment="是否启用封面图片生成")
|
||||
|
||||
preferences = Column(Text, comment="其他偏好设置(JSON)")
|
||||
created_at = Column(DateTime, server_default=func.now(), comment="创建时间")
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now(), comment="更新时间")
|
||||
@@ -27,4 +35,4 @@ class Settings(Base):
|
||||
)
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Settings(id={self.id}, user_id={self.user_id}, api_provider={self.api_provider})>"
|
||||
return f"<Settings(id={self.id}, user_id={self.user_id}, api_provider={self.api_provider})>"
|
||||
|
||||
Reference in New Issue
Block a user