Skip to content

Commit 50db89d

Browse files
feat(api): api update
1 parent 65757d5 commit 50db89d

18 files changed

Lines changed: 109 additions & 59 deletions

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 130
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamaindex-Georgehe4%2Fllamacloud-prod-bf5051d1ff1d78eef89a5732bc9186c01a4a9f7a2901045e3869b07c72695f73.yml
3-
openapi_spec_hash: 4b033b10a94f936ebaedec2856a6e559
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamaindex-Georgehe4%2Fllamacloud-prod-7b3ac5ad247b2932e3e116a3a1ae98b35abc648c96142ce3a856c18350a36367.yml
3+
openapi_spec_hash: 74aa07318c168bf21763224e4d1cb5c3
44
config_hash: f1f01aeb558cfa6af9d40d8771514b2d

‎src/llama_cloud/resources/beta/split.py‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union, Iterable, Optional
5+
from typing import Union, Optional
66
from datetime import datetime
77
from typing_extensions import Literal
88

@@ -29,7 +29,6 @@
2929
from ..._base_client import AsyncPaginator, make_request_options
3030
from ...types.beta.split_get_response import SplitGetResponse
3131
from ...types.beta.split_list_response import SplitListResponse
32-
from ...types.beta.split_category_param import SplitCategoryParam
3332
from ...types.beta.split_create_response import SplitCreateResponse
3433
from ...types.beta.split_document_input_param import SplitDocumentInputParam
3534

@@ -59,11 +58,11 @@ def with_streaming_response(self) -> SplitResourceWithStreamingResponse:
5958
def create(
6059
self,
6160
*,
62-
categories: Iterable[SplitCategoryParam],
6361
document_input: SplitDocumentInputParam,
6462
organization_id: Optional[str] | Omit = omit,
6563
project_id: Optional[str] | Omit = omit,
66-
splitting_strategy: split_create_params.SplittingStrategy | Omit = omit,
64+
configuration: Optional[split_create_params.Configuration] | Omit = omit,
65+
configuration_id: Optional[str] | Omit = omit,
6766
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6867
# The extra values given here take precedence over values defined on the client or passed to this method.
6968
extra_headers: Headers | None = None,
@@ -77,11 +76,11 @@ def create(
7776
production use and is subject to change at any time.
7877
7978
Args:
80-
categories: Categories to split documents into.
81-
8279
document_input: Document to be split.
8380
84-
splitting_strategy: Strategy for splitting documents.
81+
configuration: Split configuration with categories and splitting strategy.
82+
83+
configuration_id: Saved split configuration ID.
8584
8685
extra_headers: Send extra headers
8786
@@ -95,9 +94,9 @@ def create(
9594
"/api/v1/beta/split/jobs",
9695
body=maybe_transform(
9796
{
98-
"categories": categories,
9997
"document_input": document_input,
100-
"splitting_strategy": splitting_strategy,
98+
"configuration": configuration,
99+
"configuration_id": configuration_id,
101100
},
102101
split_create_params.SplitCreateParams,
103102
),
@@ -487,11 +486,11 @@ def with_streaming_response(self) -> AsyncSplitResourceWithStreamingResponse:
487486
async def create(
488487
self,
489488
*,
490-
categories: Iterable[SplitCategoryParam],
491489
document_input: SplitDocumentInputParam,
492490
organization_id: Optional[str] | Omit = omit,
493491
project_id: Optional[str] | Omit = omit,
494-
splitting_strategy: split_create_params.SplittingStrategy | Omit = omit,
492+
configuration: Optional[split_create_params.Configuration] | Omit = omit,
493+
configuration_id: Optional[str] | Omit = omit,
495494
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
496495
# The extra values given here take precedence over values defined on the client or passed to this method.
497496
extra_headers: Headers | None = None,
@@ -505,11 +504,11 @@ async def create(
505504
production use and is subject to change at any time.
506505
507506
Args:
508-
categories: Categories to split documents into.
509-
510507
document_input: Document to be split.
511508
512-
splitting_strategy: Strategy for splitting documents.
509+
configuration: Split configuration with categories and splitting strategy.
510+
511+
configuration_id: Saved split configuration ID.
513512
514513
extra_headers: Send extra headers
515514
@@ -523,9 +522,9 @@ async def create(
523522
"/api/v1/beta/split/jobs",
524523
body=await async_maybe_transform(
525524
{
526-
"categories": categories,
527525
"document_input": document_input,
528-
"splitting_strategy": splitting_strategy,
526+
"configuration": configuration,
527+
"configuration_id": configuration_id,
529528
},
530529
split_create_params.SplitCreateParams,
531530
),

‎src/llama_cloud/resources/extract.py‎

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def list(
152152
created_at_on_or_before: Union[str, datetime, None] | Omit = omit,
153153
document_input_type: Optional[str] | Omit = omit,
154154
document_input_value: Optional[str] | Omit = omit,
155+
expand: SequenceNotStr[str] | Omit = omit,
155156
job_ids: Optional[SequenceNotStr[str]] | Omit = omit,
156157
organization_id: Optional[str] | Omit = omit,
157158
page_size: Optional[int] | Omit = omit,
@@ -169,7 +170,9 @@ def list(
169170
List extraction jobs with optional filtering and pagination.
170171
171172
Filter by `configuration_id`, `status`, `document_input_value`, or creation date
172-
range. Results are returned newest-first.
173+
range. Results are returned newest-first. Use `expand=configuration` to include
174+
the full configuration used, and `expand=extract_metadata` for usage metrics and
175+
per-field metadata.
173176
174177
Args:
175178
configuration_id: Filter by configuration ID
@@ -182,6 +185,8 @@ def list(
182185
183186
document_input_value: Filter by document input value
184187
188+
expand: Additional fields to include: configuration, extract_metadata
189+
185190
job_ids: Filter by specific job IDs
186191
187192
page_size: Number of items per page
@@ -213,6 +218,7 @@ def list(
213218
"created_at_on_or_before": created_at_on_or_before,
214219
"document_input_type": document_input_type,
215220
"document_input_value": document_input_value,
221+
"expand": expand,
216222
"job_ids": job_ids,
217223
"organization_id": organization_id,
218224
"page_size": page_size,
@@ -352,12 +358,12 @@ def get(
352358
"""
353359
Get a single extraction job by ID.
354360
355-
Returns the job status, configuration, and results when complete. Use
356-
`expand=extract_metadata` to include usage metrics and per-field metadata
357-
(citations, confidence scores).
361+
Returns the job status and results when complete. Use `expand=configuration` to
362+
include the full configuration used, and `expand=extract_metadata` for usage
363+
metrics and per-field metadata.
358364
359365
Args:
360-
expand: Additional fields to include: extract_metadata
366+
expand: Additional fields to include: configuration, extract_metadata
361367
362368
extra_headers: Send extra headers
363369
@@ -739,6 +745,7 @@ def list(
739745
created_at_on_or_before: Union[str, datetime, None] | Omit = omit,
740746
document_input_type: Optional[str] | Omit = omit,
741747
document_input_value: Optional[str] | Omit = omit,
748+
expand: SequenceNotStr[str] | Omit = omit,
742749
job_ids: Optional[SequenceNotStr[str]] | Omit = omit,
743750
organization_id: Optional[str] | Omit = omit,
744751
page_size: Optional[int] | Omit = omit,
@@ -756,7 +763,9 @@ def list(
756763
List extraction jobs with optional filtering and pagination.
757764
758765
Filter by `configuration_id`, `status`, `document_input_value`, or creation date
759-
range. Results are returned newest-first.
766+
range. Results are returned newest-first. Use `expand=configuration` to include
767+
the full configuration used, and `expand=extract_metadata` for usage metrics and
768+
per-field metadata.
760769
761770
Args:
762771
configuration_id: Filter by configuration ID
@@ -769,6 +778,8 @@ def list(
769778
770779
document_input_value: Filter by document input value
771780
781+
expand: Additional fields to include: configuration, extract_metadata
782+
772783
job_ids: Filter by specific job IDs
773784
774785
page_size: Number of items per page
@@ -800,6 +811,7 @@ def list(
800811
"created_at_on_or_before": created_at_on_or_before,
801812
"document_input_type": document_input_type,
802813
"document_input_value": document_input_value,
814+
"expand": expand,
803815
"job_ids": job_ids,
804816
"organization_id": organization_id,
805817
"page_size": page_size,
@@ -939,12 +951,12 @@ async def get(
939951
"""
940952
Get a single extraction job by ID.
941953
942-
Returns the job status, configuration, and results when complete. Use
943-
`expand=extract_metadata` to include usage metrics and per-field metadata
944-
(citations, confidence scores).
954+
Returns the job status and results when complete. Use `expand=configuration` to
955+
include the full configuration used, and `expand=extract_metadata` for usage
956+
metrics and per-field metadata.
945957
946958
Args:
947-
expand: Additional fields to include: extract_metadata
959+
expand: Additional fields to include: configuration, extract_metadata
948960
949961
extra_headers: Send extra headers
950962

‎src/llama_cloud/resources/parsing.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def create(
8787
"2026-03-22",
8888
"2026-03-23",
8989
"2026-03-24",
90+
"2026-03-25",
9091
"latest",
9192
],
9293
str,
@@ -782,6 +783,7 @@ async def create(
782783
"2026-03-22",
783784
"2026-03-23",
784785
"2026-03-24",
786+
"2026-03-25",
785787
"latest",
786788
],
787789
str,

‎src/llama_cloud/types/beta/split_create_params.py‎

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
from .split_category_param import SplitCategoryParam
99
from .split_document_input_param import SplitDocumentInputParam
1010

11-
__all__ = ["SplitCreateParams", "SplittingStrategy"]
11+
__all__ = ["SplitCreateParams", "Configuration", "ConfigurationSplittingStrategy"]
1212

1313

1414
class SplitCreateParams(TypedDict, total=False):
15-
categories: Required[Iterable[SplitCategoryParam]]
16-
"""Categories to split documents into."""
17-
1815
document_input: Required[SplitDocumentInputParam]
1916
"""Document to be split."""
2017

2118
organization_id: Optional[str]
2219

2320
project_id: Optional[str]
2421

25-
splitting_strategy: SplittingStrategy
26-
"""Strategy for splitting documents."""
22+
configuration: Optional[Configuration]
23+
"""Split configuration with categories and splitting strategy."""
24+
25+
configuration_id: Optional[str]
26+
"""Saved split configuration ID."""
2727

2828

29-
class SplittingStrategy(TypedDict, total=False):
29+
class ConfigurationSplittingStrategy(TypedDict, total=False):
3030
"""Strategy for splitting documents."""
3131

3232
allow_uncategorized: Literal["include", "forbid", "omit"]
@@ -36,3 +36,13 @@ class SplittingStrategy(TypedDict, total=False):
3636
'forbid': all pages must be assigned to a defined category. 'omit': pages can be
3737
classified as 'uncategorized' but are excluded from results.
3838
"""
39+
40+
41+
class Configuration(TypedDict, total=False):
42+
"""Split configuration with categories and splitting strategy."""
43+
44+
categories: Required[Iterable[SplitCategoryParam]]
45+
"""Categories to split documents into."""
46+
47+
splitting_strategy: ConfigurationSplittingStrategy
48+
"""Strategy for splitting documents."""

‎src/llama_cloud/types/beta/split_create_response.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class SplitCreateResponse(BaseModel):
3535
user_id: str
3636
"""User ID who created this job."""
3737

38+
configuration_id: Optional[str] = None
39+
"""Split configuration ID used for this job."""
40+
3841
created_at: Optional[datetime] = None
3942
"""Creation datetime"""
4043

‎src/llama_cloud/types/beta/split_get_response.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class SplitGetResponse(BaseModel):
3535
user_id: str
3636
"""User ID who created this job."""
3737

38+
configuration_id: Optional[str] = None
39+
"""Split configuration ID used for this job."""
40+
3841
created_at: Optional[datetime] = None
3942
"""Creation datetime"""
4043

‎src/llama_cloud/types/beta/split_list_response.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class SplitListResponse(BaseModel):
3535
user_id: str
3636
"""User ID who created this job."""
3737

38+
configuration_id: Optional[str] = None
39+
"""Split configuration ID used for this job."""
40+
3841
created_at: Optional[datetime] = None
3942
"""Creation datetime"""
4043

‎src/llama_cloud/types/extract_generate_schema_response.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ class ParametersParseV2ParametersProcessingOptionsAutoModeConfigurationParsingCo
618618
"2026-03-22",
619619
"2026-03-23",
620620
"2026-03-24",
621+
"2026-03-25",
621622
"latest",
622623
],
623624
str,
@@ -920,6 +921,7 @@ class ParametersParseV2Parameters(BaseModel):
920921
"2026-03-22",
921922
"2026-03-23",
922923
"2026-03-24",
924+
"2026-03-25",
923925
"latest",
924926
],
925927
str,

‎src/llama_cloud/types/extract_get_params.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class ExtractGetParams(TypedDict, total=False):
1414
expand: SequenceNotStr[str]
15-
"""Additional fields to include: extract_metadata"""
15+
"""Additional fields to include: configuration, extract_metadata"""
1616

1717
organization_id: Optional[str]
1818

0 commit comments

Comments
 (0)