Spaces:
Running
Running
Update routers/filter.py
Browse files- routers/filter.py +28 -19
routers/filter.py
CHANGED
@@ -244,25 +244,34 @@ async def filter_news(title: str, content: str, last_titles: list) -> dict:
|
|
244 |
# Instruções do sistema
|
245 |
SYSTEM_INSTRUCTIONS = """
|
246 |
Analyze the news title and content, and return the filters in JSON format with the defined fields.
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
"""
|
267 |
|
268 |
# Formata os últimos títulos para incluir no prompt - aumentado para 25 títulos
|
|
|
244 |
# Instruções do sistema
|
245 |
SYSTEM_INSTRUCTIONS = """
|
246 |
Analyze the news title and content, and return the filters in JSON format with the defined fields.
|
247 |
+
Please respond ONLY with the JSON filter, do NOT add any explanations, system messages, or extra text.
|
248 |
+
|
249 |
+
death_related (true | false): Whether the news involves the real-life death of a person. Does not include fictional character deaths or deaths within stories.
|
250 |
+
political_related (true | false): Related to real-world politics (governments, elections, politicians, or official decisions). Not about political storylines in fiction.
|
251 |
+
woke_related (true | false): Involves social issues like inclusion, diversity, racism, gender, LGBTQIA+, etc.
|
252 |
+
spoilers (true | false): Reveals important plot points (e.g., character deaths, endings, major twists).
|
253 |
+
sensitive_theme (true | false): Covers sensitive or disturbing topics like suicide, abuse, violence, or tragedy.
|
254 |
+
contains_video (true | false): The news includes an embedded video (e.g., trailer, teaser, interview, video report).
|
255 |
+
is_news_content (true | false): Whether the content is actual news reporting. True for breaking news, announcements, factual reports. False for reviews, opinion pieces, lists, rankings, recommendations, critiques, analysis, or editorial content.
|
256 |
+
relevance ("low" | "medium" | "high" | "viral"): The expected public interest or impact of the news.
|
257 |
+
brazil_interest (true | false): True only if the news topic is expected to have a clear and direct impact or relevance to the Brazilian audience. This includes:
|
258 |
+
|
259 |
+
Events, releases, or announcements occurring in Brazil.
|
260 |
+
Content (movies, series, sports, games, music) that is officially available, distributed, or broadcast in Brazil through cinemas, streaming platforms, TV channels, or other licensed means.
|
261 |
+
Brazilian people, teams, companies, brands, or productions.
|
262 |
+
International celebrities, athletes, or artists with significant fan bases, media coverage, or cultural impact in Brazil.
|
263 |
+
News involving political, economic, or social events that directly affect Brazil or Brazilian citizens abroad.
|
264 |
+
|
265 |
+
Do NOT mark true if the content is niche, unknown, or unavailable in Brazil, even if popular abroad. Do NOT mark true for actors, artists, or productions with no notable recognition or market presence in Brazil.
|
266 |
+
|
267 |
+
breaking_news (true | false): The content is urgent or part of a recent and unfolding event.
|
268 |
+
audience_age_rating ("L" | 10 | 12 | 14 | 16 | 18): Content rating based on Brazilian standards.
|
269 |
+
regional_focus ("global" | "americas" | "europe" | "asia" | "africa" | "middle_east" | "oceania"): The main geographic region the news relates to.
|
270 |
+
country_focus (ISO 3166-1 alpha-2 code like "br", "us", "fr", "jp" or null): The specific country the news is about, if applicable.
|
271 |
+
ideological_alignment ("left" | "center-left" | "center" | "center-right" | "right" | "apolitical"): The perceived political bias of the article.
|
272 |
+
entity_type ("movie" | "series" | "event" | "person" | "place" | "other"): The type of main subject mentioned in the news.
|
273 |
+
entity_name (string): The name of the person, title, event, or topic the article is primarily about.
|
274 |
+
duplication (true | false): Whether the current news is a duplicate or highly similar to any of the previously published news titles (Last titles).
|
275 |
"""
|
276 |
|
277 |
# Formata os últimos títulos para incluir no prompt - aumentado para 25 títulos
|