#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
LLM 内容三级分类识别模块 v2

重构后的模块化版本，向后兼容原有接口。
"""

from .models import CategoryStandard, SecondCategoryStandard, ClassifiedContent, SectionContent, ClassificationResult
from .config import ClassifierConfig, DEFAULT_CONFIG, MAX_CONCURRENT_REQUESTS, MAX_RETRIES, RETRY_DELAY, EMBEDDING_SIMILARITY_THRESHOLD, CATEGORY_TABLE_PATH, SECOND_CATEGORY_PATH
from .category_loaders import SECONDARY_CATEGORY_KEYWORDS, CategoryStandardLoader, SecondCategoryStandardLoader
from .embedding_client import EmbeddingClient
from .content_classifier import ContentClassifierClient
from .chunks_converter import ChunksConverter
from .main_classifier import LLMContentClassifier, classify_chunks, classify_chunks_sync
from .text_split_utils import split_section_into_chunks
from .prompt import (
    CLASSIFY_SYSTEM_PROMPT,
    SUPPLEMENT_VERIFY_SYSTEM_PROMPT,
    build_classify_prompt,
    build_fix_prompt,
    build_supplement_verify_prompt,
)

__all__ = [
    # 提示词
    "CLASSIFY_SYSTEM_PROMPT",
    "SUPPLEMENT_VERIFY_SYSTEM_PROMPT",
    "build_classify_prompt",
    "build_fix_prompt",
    "build_supplement_verify_prompt",
    # 数据模型
    "CategoryStandard",
    "SecondCategoryStandard",
    "ClassifiedContent",
    "SectionContent",
    "ClassificationResult",
    # 配置
    "ClassifierConfig",
    "DEFAULT_CONFIG",
    "MAX_CONCURRENT_REQUESTS",
    "MAX_RETRIES",
    "RETRY_DELAY",
    "EMBEDDING_SIMILARITY_THRESHOLD",
    "CATEGORY_TABLE_PATH",
    "SECOND_CATEGORY_PATH",
    # 加载器
    "SECONDARY_CATEGORY_KEYWORDS",
    "CategoryStandardLoader",
    "SecondCategoryStandardLoader",
    # 客户端
    "EmbeddingClient",
    "ContentClassifierClient",
    "ChunksConverter",
    "LLMContentClassifier",
    # 便捷函数
    "classify_chunks",
    "classify_chunks_sync",
    "split_section_into_chunks",
]
