fix: let Settings model reach summarizer; cap map pins at 20
This commit is contained in:
parent
450de45bfc
commit
d2bf55183c
7 changed files with 20 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ _FENCE_RE = re.compile(r"```(?:json)?", re.IGNORECASE)
|
|||
TICKER_HEADLINE_MAX = 140
|
||||
MAP_HEADLINE_MAX = 160
|
||||
TICKER_CAP = 12
|
||||
MAP_CAP = 20
|
||||
|
||||
|
||||
def parse_reduce_json(raw: str) -> dict:
|
||||
|
|
@ -87,4 +88,6 @@ def select_map(items: list) -> list:
|
|||
item["headline"] = headline
|
||||
item["lat"], item["lon"] = coords
|
||||
out.append(item)
|
||||
if len(out) >= MAP_CAP:
|
||||
break
|
||||
return out
|
||||
|
|
|
|||
Loading…
Reference in a new issue