@@ -174,7 +174,7 @@ class FilterParamsResponse(BaseModel):
174174 "Treat this like a powerful google query. This is optional." ,
175175 ] = ("" ,)
176176 categories : Annotated [
177- list [
177+ List [
178178 Literal [
179179 "All" ,
180180 "Business" ,
@@ -196,7 +196,7 @@ class FilterParamsResponse(BaseModel):
196196 "Categories of news to filter on" ,
197197 ] = (["All" ],)
198198 reporting_voice : Annotated [
199- list [
199+ List [
200200 Literal [
201201 "Objective" ,
202202 "Subjective" ,
@@ -233,7 +233,7 @@ class FilterParamsResponse(BaseModel):
233233 "back to look from the current time. Defaults to 24 hours." ,
234234 ] = (24 ,)
235235 string_guarantee : Annotated [
236- list [ str ] | None ,
236+ Optional [ List [ str ]] ,
237237 "If defined, the search will only occur on articles "
238238 "that contain strings in this list. This is powerful for "
239239 "constraining important names or concepts. It is optional." ,
@@ -245,13 +245,13 @@ class FilterParamsResponse(BaseModel):
245245 "be present." ,
246246 ] = ("AND" ,)
247247 reverse_string_guarantee : Annotated [
248- list [ str ] | None ,
248+ Optional [ List [ str ]] ,
249249 "If defined, the search will only occur on articles "
250250 "that do not contain strings in this list. This is powerful "
251251 "for avoiding articles with a particular name or concept. It is optional." ,
252252 ] = (None ,)
253253 entity_guarantee : Annotated [
254- list [ str ] | None ,
254+ Optional [ List [ str ]] ,
255255 "Entities that must be present in the retrieved articles. This is a list of strings, "
256256 "where each string includes entity type and entity value separated by a "
257257 "colon. The first element is the entity type and the second element is "
@@ -265,25 +265,26 @@ class FilterParamsResponse(BaseModel):
265265 "must be present." ,
266266 ] = ("OR" ,)
267267 countries : Annotated [
268- list [ str ] | None ,
268+ Optional [ List [ str ]] ,
269269 "Article source countries to filter by, this is the two-letter ISO country code"
270270 "For example: United States is 'US', France is 'FR', Sweden is 'SE'." ,
271271 ] = (None ,)
272272 continents : Annotated [
273- list [
274- Literal [
275- "Africa" ,
276- "Asia" ,
277- "Oceania" ,
278- "Europe" ,
279- "Middle East" ,
280- "North America" ,
281- "South America" ,
273+ Optional [
274+ List [
275+ Literal [
276+ "Africa" ,
277+ "Asia" ,
278+ "Oceania" ,
279+ "Europe" ,
280+ "Middle East" ,
281+ "North America" ,
282+ "South America" ,
283+ ]
282284 ]
283- ]
284- | None ,
285+ ],
285286 "The articles must be geographically focused on this continent." ,
286287 ] = (None ,)
287288 sentiment : Annotated [
288- Literal ["negative" , "neutral" , "positive" ] | None , "Sentiment to filter articles by."
289+ Optional [ Literal ["negative" , "neutral" , "positive" ]] , "Sentiment to filter articles by."
289290 ] = None
0 commit comments