Skip to content

Commit 58f19f3

Browse files
feat(api): Update OpenAPI spec
1 parent 57c4ae2 commit 58f19f3

17 files changed

Lines changed: 112 additions & 109 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 24
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-c4cc922783460c6e65811d13c9abe35807a551c77c126d452806f93caaaf48fb.yml
3-
openapi_spec_hash: 99c9e48d4dafaca71f058107008d174b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-57e1c56be0942c131ab5f24d8620de166d0721ef7f3423532abc7027e5a989e7.yml
3+
openapi_spec_hash: e61f831e30d19590eb3138a1b1709d1d
44
config_hash: 80e7ee7ad8e3424616aca7189ffd5ae7

src/parallel/_client.py

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ def extract(
247247
"""
248248
Extracts relevant content from specific web URLs.
249249
250+
The legacy Extract API reference is available
251+
[here](https://docs.parallel.ai/api-reference/legacy/extract-beta/extract).
252+
250253
Args:
251254
urls: URLs to extract content from. Up to 20 URLs.
252255
@@ -258,9 +261,7 @@ def extract(
258261
client_model: The model generating this request and consuming the results. Enables
259262
optimizations and tailors default settings for the model's capabilities.
260263
261-
max_chars_total: Upper bound on total characters across excerpts from all extracted results. Does
262-
not affect full_content if requested. Default is dynamic based on urls,
263-
objective, and client_model.
264+
max_chars_total: Upper bound on total characters across excerpts from all extracted results.
264265
265266
objective: As in SearchRequest, a natural-language description of the underlying question
266267
or goal driving the request. Used together with search_queries to focus excerpts
@@ -269,9 +270,9 @@ def extract(
269270
search_queries: Optional keyword search queries, as in SearchRequest. Used together with
270271
objective to focus excerpts on the most relevant content.
271272
272-
session_id: Session identifier for calls to search and extract made by an agent as part of a
273-
larger task. May be a user-generated random string, e.g. a uuid, or a session_id
274-
returned by a previous request.
273+
session_id: Session identifier to track calls across separate search and extract calls, to
274+
be used as part of a larger task. Specifying it may give better contextual
275+
results for subsequent API calls.
275276
276277
extra_headers: Send extra headers
277278
@@ -308,7 +309,7 @@ def search(
308309
advanced_settings: Optional[AdvancedSearchSettingsParam] | Omit = omit,
309310
client_model: Optional[str] | Omit = omit,
310311
max_chars_total: Optional[int] | Omit = omit,
311-
mode: Optional[Literal["basic", "standard"]] | Omit = omit,
312+
mode: Optional[Literal["basic", "advanced"]] | Omit = omit,
312313
objective: Optional[str] | Omit = omit,
313314
session_id: Optional[str] | Omit = omit,
314315
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -321,6 +322,9 @@ def search(
321322
"""
322323
Searches the web.
323324
325+
The legacy Search API reference is available
326+
[here](https://docs.parallel.ai/api-reference/legacy/search-beta/search).
327+
324328
Args:
325329
search_queries: Concise keyword search queries, 3-6 words each. At least one query is required,
326330
provide 2-3 for best results. Used together with objective to focus results on
@@ -334,22 +338,21 @@ def search(
334338
client_model: The model generating this request and consuming the results. Enables
335339
optimizations and tailors default settings for the model's capabilities.
336340
337-
max_chars_total: Upper bound on total characters across excerpts from all results. Default is
338-
dynamic based on search_queries, objective, and client_model.
341+
max_chars_total: Upper bound on total characters across excerpts from all results.
339342
340-
mode: Search mode preset: supported values are basic and standard. Basic mode offers
341-
the lowest latency and works best with 2-3 high-quality search_queries. Standard
342-
mode provides higher quality with more advanced retrieval and compression.
343-
Defaults to standard when omitted.
343+
mode: Search mode preset: supported values are `basic` and `advanced`. Basic mode
344+
offers the lowest latency and works best with 2-3 high-quality search_queries.
345+
Advanced mode provides higher quality with more advanced retrieval and
346+
compression. Defaults to `advanced` when omitted.
344347
345348
objective: Natural-language description of the underlying question or goal driving the
346349
search. Used together with search_queries to focus results on the most relevant
347350
content. Should be self-contained with enough context to understand the intent
348351
of the search.
349352
350-
session_id: Session identifier for calls to search and extract made by an agent as part of a
351-
larger task. May be a user-generated random string, e.g. a uuid, or a session_id
352-
returned by a previous request.
353+
session_id: Session identifier to track calls across separate search and extract calls, to
354+
be used as part of a larger task. Specifying it may give better contextual
355+
results for subsequent API calls.
353356
354357
extra_headers: Send extra headers
355358
@@ -591,6 +594,9 @@ async def extract(
591594
"""
592595
Extracts relevant content from specific web URLs.
593596
597+
The legacy Extract API reference is available
598+
[here](https://docs.parallel.ai/api-reference/legacy/extract-beta/extract).
599+
594600
Args:
595601
urls: URLs to extract content from. Up to 20 URLs.
596602
@@ -602,9 +608,7 @@ async def extract(
602608
client_model: The model generating this request and consuming the results. Enables
603609
optimizations and tailors default settings for the model's capabilities.
604610
605-
max_chars_total: Upper bound on total characters across excerpts from all extracted results. Does
606-
not affect full_content if requested. Default is dynamic based on urls,
607-
objective, and client_model.
611+
max_chars_total: Upper bound on total characters across excerpts from all extracted results.
608612
609613
objective: As in SearchRequest, a natural-language description of the underlying question
610614
or goal driving the request. Used together with search_queries to focus excerpts
@@ -613,9 +617,9 @@ async def extract(
613617
search_queries: Optional keyword search queries, as in SearchRequest. Used together with
614618
objective to focus excerpts on the most relevant content.
615619
616-
session_id: Session identifier for calls to search and extract made by an agent as part of a
617-
larger task. May be a user-generated random string, e.g. a uuid, or a session_id
618-
returned by a previous request.
620+
session_id: Session identifier to track calls across separate search and extract calls, to
621+
be used as part of a larger task. Specifying it may give better contextual
622+
results for subsequent API calls.
619623
620624
extra_headers: Send extra headers
621625
@@ -652,7 +656,7 @@ async def search(
652656
advanced_settings: Optional[AdvancedSearchSettingsParam] | Omit = omit,
653657
client_model: Optional[str] | Omit = omit,
654658
max_chars_total: Optional[int] | Omit = omit,
655-
mode: Optional[Literal["basic", "standard"]] | Omit = omit,
659+
mode: Optional[Literal["basic", "advanced"]] | Omit = omit,
656660
objective: Optional[str] | Omit = omit,
657661
session_id: Optional[str] | Omit = omit,
658662
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -665,6 +669,9 @@ async def search(
665669
"""
666670
Searches the web.
667671
672+
The legacy Search API reference is available
673+
[here](https://docs.parallel.ai/api-reference/legacy/search-beta/search).
674+
668675
Args:
669676
search_queries: Concise keyword search queries, 3-6 words each. At least one query is required,
670677
provide 2-3 for best results. Used together with objective to focus results on
@@ -678,22 +685,21 @@ async def search(
678685
client_model: The model generating this request and consuming the results. Enables
679686
optimizations and tailors default settings for the model's capabilities.
680687
681-
max_chars_total: Upper bound on total characters across excerpts from all results. Default is
682-
dynamic based on search_queries, objective, and client_model.
688+
max_chars_total: Upper bound on total characters across excerpts from all results.
683689
684-
mode: Search mode preset: supported values are basic and standard. Basic mode offers
685-
the lowest latency and works best with 2-3 high-quality search_queries. Standard
686-
mode provides higher quality with more advanced retrieval and compression.
687-
Defaults to standard when omitted.
690+
mode: Search mode preset: supported values are `basic` and `advanced`. Basic mode
691+
offers the lowest latency and works best with 2-3 high-quality search_queries.
692+
Advanced mode provides higher quality with more advanced retrieval and
693+
compression. Defaults to `advanced` when omitted.
688694
689695
objective: Natural-language description of the underlying question or goal driving the
690696
search. Used together with search_queries to focus results on the most relevant
691697
content. Should be self-contained with enough context to understand the intent
692698
of the search.
693699
694-
session_id: Session identifier for calls to search and extract made by an agent as part of a
695-
larger task. May be a user-generated random string, e.g. a uuid, or a session_id
696-
returned by a previous request.
700+
session_id: Session identifier to track calls across separate search and extract calls, to
701+
be used as part of a larger task. Specifying it may give better contextual
702+
results for subsequent API calls.
697703
698704
extra_headers: Send extra headers
699705

src/parallel/resources/beta/beta.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ def extract(
151151
152152
search_queries: If provided, focuses extracted content on the specified keyword search queries.
153153
154-
session_id: Session identifier for calls to search and extract made by an agent as part of a
155-
larger task. May be a user-generated random string (e.g. a uuid) or a session_id
156-
from a previous request.
154+
session_id: Session identifier to track calls across separate search and extract calls, to
155+
be used as part of a larger task. Specifying it may give better contextual
156+
results for subsequent API calls.
157157
158158
betas: Optional header to specify the beta version(s) to enable.
159159
@@ -251,9 +251,9 @@ def search(
251251
contain search operators. At least one of objective or search_queries must be
252252
provided.
253253
254-
session_id: Session identifier for calls to search and extract made by an agent as part of a
255-
larger task. May be a user-generated random string (e.g. a uuid) or a session_id
256-
from a previous request.
254+
session_id: Session identifier to track calls across separate search and extract calls, to
255+
be used as part of a larger task. Specifying it may give better contextual
256+
results for subsequent API calls.
257257
258258
source_policy: Source policy for web search results.
259259
@@ -402,9 +402,9 @@ async def extract(
402402
403403
search_queries: If provided, focuses extracted content on the specified keyword search queries.
404404
405-
session_id: Session identifier for calls to search and extract made by an agent as part of a
406-
larger task. May be a user-generated random string (e.g. a uuid) or a session_id
407-
from a previous request.
405+
session_id: Session identifier to track calls across separate search and extract calls, to
406+
be used as part of a larger task. Specifying it may give better contextual
407+
results for subsequent API calls.
408408
409409
betas: Optional header to specify the beta version(s) to enable.
410410
@@ -502,9 +502,9 @@ async def search(
502502
contain search operators. At least one of objective or search_queries must be
503503
provided.
504504
505-
session_id: Session identifier for calls to search and extract made by an agent as part of a
506-
larger task. May be a user-generated random string (e.g. a uuid) or a session_id
507-
from a previous request.
505+
session_id: Session identifier to track calls across separate search and extract calls, to
506+
be used as part of a larger task. Specifying it may give better contextual
507+
results for subsequent API calls.
508508
509509
source_policy: Source policy for web search results.
510510

src/parallel/resources/beta/task_run.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ def create(
104104
105105
enable_events: Controls tracking of task run execution progress. When set to true, progress
106106
events are recorded and can be accessed via the
107-
[Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
108-
false, no progress events are tracked. Note that progress tracking cannot be
109-
enabled after a run has been created. The flag is set to true by default for
110-
premium processors (pro and above).
107+
[Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
108+
no progress events are tracked. Note that progress tracking cannot be enabled
109+
after a run has been created. The flag is set to true by default for premium
110+
processors (pro and above).
111111
112112
mcp_servers: Optional list of MCP servers to use for the run.
113113
@@ -342,10 +342,10 @@ async def create(
342342
343343
enable_events: Controls tracking of task run execution progress. When set to true, progress
344344
events are recorded and can be accessed via the
345-
[Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
346-
false, no progress events are tracked. Note that progress tracking cannot be
347-
enabled after a run has been created. The flag is set to true by default for
348-
premium processors (pro and above).
345+
[Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
346+
no progress events are tracked. Note that progress tracking cannot be enabled
347+
after a run has been created. The flag is set to true by default for premium
348+
processors (pro and above).
349349
350350
mcp_servers: Optional list of MCP servers to use for the run.
351351

src/parallel/resources/task_run.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ def create(
111111
112112
enable_events: Controls tracking of task run execution progress. When set to true, progress
113113
events are recorded and can be accessed via the
114-
[Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
115-
false, no progress events are tracked. Note that progress tracking cannot be
116-
enabled after a run has been created. The flag is set to true by default for
117-
premium processors (pro and above).
114+
[Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
115+
no progress events are tracked. Note that progress tracking cannot be enabled
116+
after a run has been created. The flag is set to true by default for premium
117+
processors (pro and above).
118118
119119
mcp_servers: Optional list of MCP servers to use for the run.
120120
@@ -494,10 +494,10 @@ async def create(
494494
495495
enable_events: Controls tracking of task run execution progress. When set to true, progress
496496
events are recorded and can be accessed via the
497-
[Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
498-
false, no progress events are tracked. Note that progress tracking cannot be
499-
enabled after a run has been created. The flag is set to true by default for
500-
premium processors (pro and above).
497+
[Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
498+
no progress events are tracked. Note that progress tracking cannot be enabled
499+
after a run has been created. The flag is set to true by default for premium
500+
processors (pro and above).
501501
502502
mcp_servers: Optional list of MCP servers to use for the run.
503503

src/parallel/types/beta/beta_extract_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class BetaExtractParams(TypedDict, total=False):
4242

4343
session_id: Optional[str]
4444
"""
45-
Session identifier for calls to search and extract made by an agent as part of a
46-
larger task. May be a user-generated random string (e.g. a uuid) or a session_id
47-
from a previous request.
45+
Session identifier to track calls across separate search and extract calls, to
46+
be used as part of a larger task. Specifying it may give better contextual
47+
results for subsequent API calls.
4848
"""
4949

5050
betas: Annotated[List[ParallelBetaParam], PropertyInfo(alias="parallel-beta")]

src/parallel/types/beta/beta_search_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class BetaSearchParams(TypedDict, total=False):
6161

6262
session_id: Optional[str]
6363
"""
64-
Session identifier for calls to search and extract made by an agent as part of a
65-
larger task. May be a user-generated random string (e.g. a uuid) or a session_id
66-
from a previous request.
64+
Session identifier to track calls across separate search and extract calls, to
65+
be used as part of a larger task. Specifying it may give better contextual
66+
results for subsequent API calls.
6767
"""
6868

6969
source_policy: Optional[SourcePolicy]

src/parallel/types/beta/task_run_create_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class TaskRunCreateParams(TypedDict, total=False):
2929
"""Controls tracking of task run execution progress.
3030
3131
When set to true, progress events are recorded and can be accessed via the
32-
[Task Run events](https://platform.parallel.ai/api-reference) endpoint. When
33-
false, no progress events are tracked. Note that progress tracking cannot be
34-
enabled after a run has been created. The flag is set to true by default for
35-
premium processors (pro and above).
32+
[Task Run events](https://docs.parallel.ai/api-reference) endpoint. When false,
33+
no progress events are tracked. Note that progress tracking cannot be enabled
34+
after a run has been created. The flag is set to true by default for premium
35+
processors (pro and above).
3636
"""
3737

3838
mcp_servers: Optional[Iterable[McpServerParam]]

src/parallel/types/client_extract_params.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ class ClientExtractParams(TypedDict, total=False):
2929
"""
3030

3131
max_chars_total: Optional[int]
32-
"""Upper bound on total characters across excerpts from all extracted results.
33-
34-
Does not affect full_content if requested. Default is dynamic based on urls,
35-
objective, and client_model.
36-
"""
32+
"""Upper bound on total characters across excerpts from all extracted results."""
3733

3834
objective: Optional[str]
3935
"""
@@ -50,7 +46,7 @@ class ClientExtractParams(TypedDict, total=False):
5046

5147
session_id: Optional[str]
5248
"""
53-
Session identifier for calls to search and extract made by an agent as part of a
54-
larger task. May be a user-generated random string, e.g. a uuid, or a session_id
55-
returned by a previous request.
49+
Session identifier to track calls across separate search and extract calls, to
50+
be used as part of a larger task. Specifying it may give better contextual
51+
results for subsequent API calls.
5652
"""

0 commit comments

Comments
 (0)