mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-09-11 06:28:58 +00:00
* feat(search): add native recency filters * fix(search): enforce recency across backends * docs(search): record recency provider contract
20 lines
447 B
Python
20 lines
447 B
Python
"""Shared relative time-range contract for supported bundled web-search providers."""
|
|
|
|
from typing import Literal
|
|
|
|
type SearchTimeRange = Literal["day", "week", "month", "year"]
|
|
|
|
DDGS_TIMELIMIT_BY_TIME_RANGE: dict[SearchTimeRange, str] = {
|
|
"day": "d",
|
|
"week": "w",
|
|
"month": "m",
|
|
"year": "y",
|
|
}
|
|
|
|
BRAVE_FRESHNESS_BY_TIME_RANGE: dict[SearchTimeRange, str] = {
|
|
"day": "pd",
|
|
"week": "pw",
|
|
"month": "pm",
|
|
"year": "py",
|
|
}
|