2026-06-15 19:37:40 +08:00
|
|
|
"""搜索建议 schema(纯 keyword 续接词)。"""
|
2026-06-15 18:26:35 +08:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SearchKeywordItem(BaseModel):
|
|
|
|
|
word: str
|
|
|
|
|
weight: int
|
2026-06-15 19:37:40 +08:00
|
|
|
source: str # 'ts_stat' / 'ts_stat_live'
|
2026-06-15 18:26:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class SearchSuggestionsResponse(BaseModel):
|
|
|
|
|
query: str
|
|
|
|
|
keywords: list[SearchKeywordItem] = []
|