Files
BiliNote/backend/app/models/provide_model.py
Jefferyhcool bb974b0b89 :feat 新增模型配置页面和相关功能
- 新增模型配置页面组件和路由
- 实现模型配置表单和相关逻辑- 添加全局配置入口和功能- 优化首页布局和样式- 新增 404 页面组件
- 更新部分组件样式和结构
2025-04-22 17:01:02 +08:00

16 lines
708 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from dataclasses import dataclass
from datetime import datetime
from typing import Optional
@dataclass
class ProviderModel:
"""
存储每个模型提供商的调用参数信息,用于从数据库读取并动态构建 GPT 调用实例。
"""
id: str # 模型唯一 ID推荐用 UUID
logo: str # 模型图标 URL
name: str # 展示名,如 "GPT-4 Turbo"(用于前端展示)
api_key: str # 调用该模型使用的 API Key
base_url: str # 模型 API 接口地址OpenAI SDK兼容
created_at: Optional[datetime] = None # 可选:创建时间(从 SQLite 自动生成)