Initial commit: snapAna 截图智能整理工具
包含 FastAPI 后端、React 前端、队列/OCR/标签/待办等完整功能。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"""键值设置:Provider 配置等以 JSON 形式存储。"""
|
||||
from __future__ import annotations
|
||||
|
||||
from sqlalchemy import String, Text
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.db import Base
|
||||
|
||||
|
||||
class Setting(Base):
|
||||
"""通用键值设置。"""
|
||||
|
||||
__tablename__ = "settings"
|
||||
|
||||
key: Mapped[str] = mapped_column(String(64), primary_key=True)
|
||||
value_json: Mapped[str] = mapped_column(Text, nullable=False, default="null")
|
||||
|
||||
|
||||
# 设置键名常量
|
||||
KEY_OCR_PROVIDER = "ocr_provider"
|
||||
KEY_VLM_PROVIDER = "vlm_provider"
|
||||
KEY_RECOGNITION_MODE = "recognition_mode" # ocr | vision | hybrid
|
||||
KEY_CATEGORY_HINT = "category_hint"
|
||||
|
||||
# 默认识别模式:混合(OCR 文本 + 视觉 AI 联合分析)
|
||||
DEFAULT_RECOGNITION_MODE = "hybrid"
|
||||
Reference in New Issue
Block a user