完善模型测试与参考文件历史能力
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime, func
|
||||
from sqlalchemy import Boolean, Column, Integer, String, Text, DateTime, func
|
||||
from database import Base
|
||||
|
||||
class AiModel(Base):
|
||||
@@ -9,6 +9,8 @@ class AiModel(Base):
|
||||
api_format = Column(String(20), default="openai", comment="anthropic/openai")
|
||||
api_endpoint = Column(String(500), default="", comment="API接口地址")
|
||||
api_key_encrypted = Column(Text, default="", comment="加密后的API Key")
|
||||
supports_streaming = Column(Boolean, default=False, comment="是否支持流式传输")
|
||||
enable_reasoning = Column(Boolean, default=False, comment="是否开启思考模式")
|
||||
status = Column(String(20), default="enabled", comment="enabled/disabled")
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import DateTime, Integer, String, func
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from database import Base
|
||||
|
||||
|
||||
class ReferenceFile(Base):
|
||||
__tablename__ = "reference_files"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
file_name: Mapped[str] = mapped_column(String(255), default="", comment="原始文件名")
|
||||
file_path: Mapped[str] = mapped_column(String(500), default="", comment="MinIO 对象路径")
|
||||
file_size: Mapped[int] = mapped_column(Integer, default=0, comment="文件大小")
|
||||
content_type: Mapped[str] = mapped_column(String(120), default="", comment="文件类型")
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime, server_default=func.now())
|
||||
Reference in New Issue
Block a user