Skip to content

Commit d656151

Browse files
fix(api): re-add deprecated processor to /v1beta/extract
1 parent e0976a1 commit d656151

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 13
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-75b88aac7d973b5965b0ff4c6b16264a2b9051e0b156943931c1f28fe2b4777b.yml
3-
openapi_spec_hash: dc891ed9f9ca1172750db864a883f646
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-de8ef7fc6a3509bf74c63258ebd4c110fc0c7669ebdbeaf7c8adcbf359f43a56.yml
3+
openapi_spec_hash: a7fd6467be3ff6c3037d29e87c172260
44
config_hash: 677d555754b79eb922f6bf64bccd9559

src/parallel/resources/beta/beta.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ def search(
158158
max_results: Optional[int] | Omit = omit,
159159
mode: Optional[Literal["one-shot", "agentic"]] | Omit = omit,
160160
objective: Optional[str] | Omit = omit,
161+
processor: Optional[Literal["base", "pro"]] | Omit = omit,
161162
search_queries: Optional[SequenceNotStr[str]] | Omit = omit,
162163
source_policy: Optional[SourcePolicy] | Omit = omit,
163164
betas: List[ParallelBetaParam] | Omit = omit,
@@ -183,9 +184,7 @@ def search(
183184
live content (fresher). The default policy for search uses cached results only,
184185
while extract uses a dynamic policy based on the search objective and url.
185186
186-
max_chars_per_result: Optional upper bound on the total number of characters to include per url.
187-
Excerpts may contain fewer characters than this limit to maximize relevance and
188-
token efficiency.
187+
max_chars_per_result: DEPRECATED - Use excerpts.max_chars_per_result.
189188
190189
max_results: Upper bound on the number of results to return. May be limited by the processor.
191190
Defaults to 10 if not provided.
@@ -199,6 +198,8 @@ def search(
199198
include guidance about preferred sources or freshness. At least one of objective
200199
or search_queries must be provided.
201200
201+
processor: DEPRECATED - Use mode.
202+
202203
search_queries: Optional list of traditional keyword search queries to guide the search. May
203204
contain search operators. At least one of objective or search_queries must be
204205
provided.
@@ -238,6 +239,7 @@ def search(
238239
"max_results": max_results,
239240
"mode": mode,
240241
"objective": objective,
242+
"processor": processor,
241243
"search_queries": search_queries,
242244
"source_policy": source_policy,
243245
},
@@ -362,6 +364,7 @@ async def search(
362364
max_results: Optional[int] | Omit = omit,
363365
mode: Optional[Literal["one-shot", "agentic"]] | Omit = omit,
364366
objective: Optional[str] | Omit = omit,
367+
processor: Optional[Literal["base", "pro"]] | Omit = omit,
365368
search_queries: Optional[SequenceNotStr[str]] | Omit = omit,
366369
source_policy: Optional[SourcePolicy] | Omit = omit,
367370
betas: List[ParallelBetaParam] | Omit = omit,
@@ -387,9 +390,7 @@ async def search(
387390
live content (fresher). The default policy for search uses cached results only,
388391
while extract uses a dynamic policy based on the search objective and url.
389392
390-
max_chars_per_result: Optional upper bound on the total number of characters to include per url.
391-
Excerpts may contain fewer characters than this limit to maximize relevance and
392-
token efficiency.
393+
max_chars_per_result: DEPRECATED - Use excerpts.max_chars_per_result.
393394
394395
max_results: Upper bound on the number of results to return. May be limited by the processor.
395396
Defaults to 10 if not provided.
@@ -403,6 +404,8 @@ async def search(
403404
include guidance about preferred sources or freshness. At least one of objective
404405
or search_queries must be provided.
405406
407+
processor: DEPRECATED - Use mode.
408+
406409
search_queries: Optional list of traditional keyword search queries to guide the search. May
407410
contain search operators. At least one of objective or search_queries must be
408411
provided.
@@ -442,6 +445,7 @@ async def search(
442445
"max_results": max_results,
443446
"mode": mode,
444447
"objective": objective,
448+
"processor": processor,
445449
"search_queries": search_queries,
446450
"source_policy": source_policy,
447451
},

src/parallel/types/beta/beta_search_params.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ class BetaSearchParams(TypedDict, total=False):
2828
"""
2929

3030
max_chars_per_result: Optional[int]
31-
"""Optional upper bound on the total number of characters to include per url.
32-
33-
Excerpts may contain fewer characters than this limit to maximize relevance and
34-
token efficiency.
35-
"""
31+
"""DEPRECATED - Use excerpts.max_chars_per_result."""
3632

3733
max_results: Optional[int]
3834
"""Upper bound on the number of results to return.
@@ -55,6 +51,9 @@ class BetaSearchParams(TypedDict, total=False):
5551
objective or search_queries must be provided.
5652
"""
5753

54+
processor: Optional[Literal["base", "pro"]]
55+
"""DEPRECATED - Use mode."""
56+
5857
search_queries: Optional[SequenceNotStr[str]]
5958
"""Optional list of traditional keyword search queries to guide the search.
6059

tests/api_resources/test_beta.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def test_method_search_with_all_params(self, client: Parallel) -> None:
8989
max_results=0,
9090
mode="one-shot",
9191
objective="objective",
92+
processor="base",
9293
search_queries=["string"],
9394
source_policy={
9495
"exclude_domains": ["reddit.com", "x.com", ".ai"],
@@ -193,6 +194,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncParallel)
193194
max_results=0,
194195
mode="one-shot",
195196
objective="objective",
197+
processor="base",
196198
search_queries=["string"],
197199
source_policy={
198200
"exclude_domains": ["reddit.com", "x.com", ".ai"],

0 commit comments

Comments
 (0)