Complete admin model management
This commit is contained in:
@@ -23,11 +23,25 @@ class ModelConfig(Base):
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
||||
provider: Mapped[str] = mapped_column(String(50), nullable=False)
|
||||
display_name: Mapped[str | None] = mapped_column(String(100), nullable=True)
|
||||
api_type: Mapped[str] = mapped_column(String(50), default="openai_compatible", nullable=False)
|
||||
model_name: Mapped[str] = mapped_column(String(100), nullable=False)
|
||||
base_url: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
||||
api_url: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
api_key: Mapped[str] = mapped_column(Text, nullable=False)
|
||||
auth_type: Mapped[str] = mapped_column(String(30), default="bearer", nullable=False)
|
||||
api_version: Mapped[str | None] = mapped_column(String(50), nullable=True)
|
||||
temperature: Mapped[Decimal | None] = mapped_column(Numeric(4, 2), nullable=True)
|
||||
top_p: Mapped[Decimal | None] = mapped_column(Numeric(4, 2), nullable=True)
|
||||
top_k: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
presence_penalty: Mapped[Decimal | None] = mapped_column(Numeric(4, 2), nullable=True)
|
||||
frequency_penalty: Mapped[Decimal | None] = mapped_column(Numeric(4, 2), nullable=True)
|
||||
max_token: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
context_window: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
stream_enabled: Mapped[int] = mapped_column(default=1, nullable=False)
|
||||
response_format: Mapped[str | None] = mapped_column(String(50), nullable=True)
|
||||
extra_params: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
remark: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
||||
timeout_second: Mapped[int] = mapped_column(Integer, default=30, nullable=False)
|
||||
enabled: Mapped[int] = mapped_column(default=0, nullable=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user