Skip to content

Commit 7c99d43

Browse files
author
stlc-bot
committed
feat(split): target_pages page selection when splitting a parse job (#26921)
Stainless-Generated-From: cf609ad075e2193bcb3da352b1cc2467b4af8225
1 parent b90ee7a commit 7c99d43

84 files changed

Lines changed: 2456 additions & 6559 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 140
1+
configured_endpoints: 141

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClient.kt‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import ai.llamaindex.llamacloud.services.blocking.ConfigurationService
1111
import ai.llamaindex.llamacloud.services.blocking.DataSinkService
1212
import ai.llamaindex.llamacloud.services.blocking.DataSourceService
1313
import ai.llamaindex.llamacloud.services.blocking.ExtractService
14-
import ai.llamaindex.llamacloud.services.blocking.ExtractionAgentService
1514
import ai.llamaindex.llamacloud.services.blocking.FileService
1615
import ai.llamaindex.llamacloud.services.blocking.JobDataPointService
1716
import ai.llamaindex.llamacloud.services.blocking.ParsingService
@@ -85,8 +84,6 @@ interface LlamaCloudClient {
8584

8685
fun dataSinks(): DataSinkService
8786

88-
fun extractionAgents(): ExtractionAgentService
89-
9087
fun dataSources(): DataSourceService
9188

9289
fun pipelines(): PipelineService
@@ -144,8 +141,6 @@ interface LlamaCloudClient {
144141

145142
fun dataSinks(): DataSinkService.WithRawResponse
146143

147-
fun extractionAgents(): ExtractionAgentService.WithRawResponse
148-
149144
fun dataSources(): DataSourceService.WithRawResponse
150145

151146
fun pipelines(): PipelineService.WithRawResponse

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsync.kt‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import ai.llamaindex.llamacloud.services.async.ConfigurationServiceAsync
1111
import ai.llamaindex.llamacloud.services.async.DataSinkServiceAsync
1212
import ai.llamaindex.llamacloud.services.async.DataSourceServiceAsync
1313
import ai.llamaindex.llamacloud.services.async.ExtractServiceAsync
14-
import ai.llamaindex.llamacloud.services.async.ExtractionAgentServiceAsync
1514
import ai.llamaindex.llamacloud.services.async.FileServiceAsync
1615
import ai.llamaindex.llamacloud.services.async.JobDataPointServiceAsync
1716
import ai.llamaindex.llamacloud.services.async.ParsingServiceAsync
@@ -85,8 +84,6 @@ interface LlamaCloudClientAsync {
8584

8685
fun dataSinks(): DataSinkServiceAsync
8786

88-
fun extractionAgents(): ExtractionAgentServiceAsync
89-
9087
fun dataSources(): DataSourceServiceAsync
9188

9289
fun pipelines(): PipelineServiceAsync
@@ -148,8 +145,6 @@ interface LlamaCloudClientAsync {
148145

149146
fun dataSinks(): DataSinkServiceAsync.WithRawResponse
150147

151-
fun extractionAgents(): ExtractionAgentServiceAsync.WithRawResponse
152-
153148
fun dataSources(): DataSourceServiceAsync.WithRawResponse
154149

155150
fun pipelines(): PipelineServiceAsync.WithRawResponse

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import ai.llamaindex.llamacloud.services.async.DataSourceServiceAsync
2020
import ai.llamaindex.llamacloud.services.async.DataSourceServiceAsyncImpl
2121
import ai.llamaindex.llamacloud.services.async.ExtractServiceAsync
2222
import ai.llamaindex.llamacloud.services.async.ExtractServiceAsyncImpl
23-
import ai.llamaindex.llamacloud.services.async.ExtractionAgentServiceAsync
24-
import ai.llamaindex.llamacloud.services.async.ExtractionAgentServiceAsyncImpl
2523
import ai.llamaindex.llamacloud.services.async.FileServiceAsync
2624
import ai.llamaindex.llamacloud.services.async.FileServiceAsyncImpl
2725
import ai.llamaindex.llamacloud.services.async.JobDataPointServiceAsync
@@ -109,10 +107,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
109107
DataSinkServiceAsyncImpl(clientOptionsWithUserAgent)
110108
}
111109

112-
private val extractionAgents: ExtractionAgentServiceAsync by lazy {
113-
ExtractionAgentServiceAsyncImpl(clientOptionsWithUserAgent)
114-
}
115-
116110
private val dataSources: DataSourceServiceAsync by lazy {
117111
DataSourceServiceAsyncImpl(clientOptionsWithUserAgent)
118112
}
@@ -160,8 +154,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
160154

161155
override fun dataSinks(): DataSinkServiceAsync = dataSinks
162156

163-
override fun extractionAgents(): ExtractionAgentServiceAsync = extractionAgents
164-
165157
override fun dataSources(): DataSourceServiceAsync = dataSources
166158

167159
override fun pipelines(): PipelineServiceAsync = pipelines
@@ -227,10 +219,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
227219
DataSinkServiceAsyncImpl.WithRawResponseImpl(clientOptions)
228220
}
229221

230-
private val extractionAgents: ExtractionAgentServiceAsync.WithRawResponse by lazy {
231-
ExtractionAgentServiceAsyncImpl.WithRawResponseImpl(clientOptions)
232-
}
233-
234222
private val dataSources: DataSourceServiceAsync.WithRawResponse by lazy {
235223
DataSourceServiceAsyncImpl.WithRawResponseImpl(clientOptions)
236224
}
@@ -280,9 +268,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
280268

281269
override fun dataSinks(): DataSinkServiceAsync.WithRawResponse = dataSinks
282270

283-
override fun extractionAgents(): ExtractionAgentServiceAsync.WithRawResponse =
284-
extractionAgents
285-
286271
override fun dataSources(): DataSourceServiceAsync.WithRawResponse = dataSources
287272

288273
override fun pipelines(): PipelineServiceAsync.WithRawResponse = pipelines

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import ai.llamaindex.llamacloud.services.blocking.DataSourceService
2020
import ai.llamaindex.llamacloud.services.blocking.DataSourceServiceImpl
2121
import ai.llamaindex.llamacloud.services.blocking.ExtractService
2222
import ai.llamaindex.llamacloud.services.blocking.ExtractServiceImpl
23-
import ai.llamaindex.llamacloud.services.blocking.ExtractionAgentService
24-
import ai.llamaindex.llamacloud.services.blocking.ExtractionAgentServiceImpl
2523
import ai.llamaindex.llamacloud.services.blocking.FileService
2624
import ai.llamaindex.llamacloud.services.blocking.FileServiceImpl
2725
import ai.llamaindex.llamacloud.services.blocking.JobDataPointService
@@ -99,10 +97,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
9997
DataSinkServiceImpl(clientOptionsWithUserAgent)
10098
}
10199

102-
private val extractionAgents: ExtractionAgentService by lazy {
103-
ExtractionAgentServiceImpl(clientOptionsWithUserAgent)
104-
}
105-
106100
private val dataSources: DataSourceService by lazy {
107101
DataSourceServiceImpl(clientOptionsWithUserAgent)
108102
}
@@ -150,8 +144,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
150144

151145
override fun dataSinks(): DataSinkService = dataSinks
152146

153-
override fun extractionAgents(): ExtractionAgentService = extractionAgents
154-
155147
override fun dataSources(): DataSourceService = dataSources
156148

157149
override fun pipelines(): PipelineService = pipelines
@@ -217,10 +209,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
217209
DataSinkServiceImpl.WithRawResponseImpl(clientOptions)
218210
}
219211

220-
private val extractionAgents: ExtractionAgentService.WithRawResponse by lazy {
221-
ExtractionAgentServiceImpl.WithRawResponseImpl(clientOptions)
222-
}
223-
224212
private val dataSources: DataSourceService.WithRawResponse by lazy {
225213
DataSourceServiceImpl.WithRawResponseImpl(clientOptions)
226214
}
@@ -270,8 +258,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
270258

271259
override fun dataSinks(): DataSinkService.WithRawResponse = dataSinks
272260

273-
override fun extractionAgents(): ExtractionAgentService.WithRawResponse = extractionAgents
274-
275261
override fun dataSources(): DataSourceService.WithRawResponse = dataSources
276262

277263
override fun pipelines(): PipelineService.WithRawResponse = pipelines

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/models/beta/split/SplitDocumentInput.kt‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ private constructor(
3131
) : this(type, value, mutableMapOf())
3232

3333
/**
34-
* Type of document input. Valid values are: file_id
34+
* The beta `POST /api/v1/beta/split/jobs` endpoint accepts only `file_id`. To use a Parse job
35+
* as input, call `POST /api/v1/split/jobs` instead, where you can pass the Parse job ID as
36+
* `file_input`.
3537
*
3638
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type or is
3739
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -100,7 +102,11 @@ private constructor(
100102
additionalProperties = splitDocumentInput.additionalProperties.toMutableMap()
101103
}
102104

103-
/** Type of document input. Valid values are: file_id */
105+
/**
106+
* The beta `POST /api/v1/beta/split/jobs` endpoint accepts only `file_id`. To use a Parse
107+
* job as input, call `POST /api/v1/split/jobs` instead, where you can pass the Parse job ID
108+
* as `file_input`.
109+
*/
104110
fun type(type: String) = type(JsonField.of(type))
105111

106112
/**

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/models/beta/split/SplitSegmentResponse.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private constructor(
5454
fun confidenceCategory(): String = confidenceCategory.getRequired("confidence_category")
5555

5656
/**
57-
* 1-indexed page numbers in this split.
57+
* Page numbers in this segment, as numbered by the input document.
5858
*
5959
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type or is
6060
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -154,7 +154,7 @@ private constructor(
154154
this.confidenceCategory = confidenceCategory
155155
}
156156

157-
/** 1-indexed page numbers in this split. */
157+
/** Page numbers in this segment, as numbered by the input document. */
158158
fun pages(pages: List<Long>) = pages(JsonField.of(pages))
159159

160160
/**

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/models/configurations/ParseV2Parameters.kt‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private constructor(
143143
* Current `latest` by tier:
144144
* - `fast`: `2026-06-15`
145145
* - `cost_effective`: `2026-08-19`
146-
* - `agentic`: `2026-09-09`
146+
* - `agentic`: `2026-09-13`
147147
* - `agentic_plus`: `2026-09-11`
148148
*
149149
* Full list: `GET /api/v2/parse/versions`.
@@ -481,7 +481,7 @@ private constructor(
481481
* Current `latest` by tier:
482482
* - `fast`: `2026-06-15`
483483
* - `cost_effective`: `2026-08-19`
484-
* - `agentic`: `2026-09-09`
484+
* - `agentic`: `2026-09-13`
485485
* - `agentic_plus`: `2026-09-11`
486486
*
487487
* Full list: `GET /api/v2/parse/versions`.
@@ -1012,7 +1012,7 @@ private constructor(
10121012
* Current `latest` by tier:
10131013
* - `fast`: `2026-06-15`
10141014
* - `cost_effective`: `2026-08-19`
1015-
* - `agentic`: `2026-09-09`
1015+
* - `agentic`: `2026-09-13`
10161016
* - `agentic_plus`: `2026-09-11`
10171017
*
10181018
* Full list: `GET /api/v2/parse/versions`.
@@ -1033,9 +1033,9 @@ private constructor(
10331033

10341034
@JvmField val LATEST = of("latest")
10351035

1036-
@JvmField val _2026_09_11 = of("2026-09-11")
1036+
@JvmField val _2026_09_13 = of("2026-09-13")
10371037

1038-
@JvmField val _2026_09_09 = of("2026-09-09")
1038+
@JvmField val _2026_09_11 = of("2026-09-11")
10391039

10401040
@JvmField val _2026_08_19 = of("2026-08-19")
10411041

@@ -1047,8 +1047,8 @@ private constructor(
10471047
/** An enum containing [Version]'s known values. */
10481048
enum class Known {
10491049
LATEST,
1050+
_2026_09_13,
10501051
_2026_09_11,
1051-
_2026_09_09,
10521052
_2026_08_19,
10531053
_2026_06_15,
10541054
}
@@ -1064,8 +1064,8 @@ private constructor(
10641064
*/
10651065
enum class Value {
10661066
LATEST,
1067+
_2026_09_13,
10671068
_2026_09_11,
1068-
_2026_09_09,
10691069
_2026_08_19,
10701070
_2026_06_15,
10711071
/** An enum member indicating that [Version] was instantiated with an unknown value. */
@@ -1082,8 +1082,8 @@ private constructor(
10821082
fun value(): Value =
10831083
when (this) {
10841084
LATEST -> Value.LATEST
1085+
_2026_09_13 -> Value._2026_09_13
10851086
_2026_09_11 -> Value._2026_09_11
1086-
_2026_09_09 -> Value._2026_09_09
10871087
_2026_08_19 -> Value._2026_08_19
10881088
_2026_06_15 -> Value._2026_06_15
10891089
else -> Value._UNKNOWN
@@ -1101,8 +1101,8 @@ private constructor(
11011101
fun known(): Known =
11021102
when (this) {
11031103
LATEST -> Known.LATEST
1104+
_2026_09_13 -> Known._2026_09_13
11041105
_2026_09_11 -> Known._2026_09_11
1105-
_2026_09_09 -> Known._2026_09_09
11061106
_2026_08_19 -> Known._2026_08_19
11071107
_2026_06_15 -> Known._2026_06_15
11081108
else -> throw LlamaCloudInvalidDataException("Unknown Version: $value")
@@ -9756,7 +9756,7 @@ private constructor(
97569756
* Current `latest` by tier:
97579757
* - `fast`: `2026-06-15`
97589758
* - `cost_effective`: `2026-08-19`
9759-
* - `agentic`: `2026-09-09`
9759+
* - `agentic`: `2026-09-13`
97609760
* - `agentic_plus`: `2026-09-11`
97619761
*
97629762
* Full list: `GET /api/v2/parse/versions`.
@@ -10260,7 +10260,7 @@ private constructor(
1026010260
* Current `latest` by tier:
1026110261
* - `fast`: `2026-06-15`
1026210262
* - `cost_effective`: `2026-08-19`
10263-
* - `agentic`: `2026-09-09`
10263+
* - `agentic`: `2026-09-13`
1026410264
* - `agentic_plus`: `2026-09-11`
1026510265
*
1026610266
* Full list: `GET /api/v2/parse/versions`.
@@ -11874,7 +11874,7 @@ private constructor(
1187411874
* Current `latest` by tier:
1187511875
* - `fast`: `2026-06-15`
1187611876
* - `cost_effective`: `2026-08-19`
11877-
* - `agentic`: `2026-09-09`
11877+
* - `agentic`: `2026-09-13`
1187811878
* - `agentic_plus`: `2026-09-11`
1187911879
*
1188011880
* Full list: `GET /api/v2/parse/versions`.
@@ -11898,9 +11898,9 @@ private constructor(
1189811898

1189911899
@JvmField val LATEST = of("latest")
1190011900

11901-
@JvmField val _2026_09_11 = of("2026-09-11")
11901+
@JvmField val _2026_09_13 = of("2026-09-13")
1190211902

11903-
@JvmField val _2026_09_09 = of("2026-09-09")
11903+
@JvmField val _2026_09_11 = of("2026-09-11")
1190411904

1190511905
@JvmField val _2026_08_19 = of("2026-08-19")
1190611906

@@ -11912,8 +11912,8 @@ private constructor(
1191211912
/** An enum containing [Version]'s known values. */
1191311913
enum class Known {
1191411914
LATEST,
11915+
_2026_09_13,
1191511916
_2026_09_11,
11916-
_2026_09_09,
1191711917
_2026_08_19,
1191811918
_2026_06_15,
1191911919
}
@@ -11929,8 +11929,8 @@ private constructor(
1192911929
*/
1193011930
enum class Value {
1193111931
LATEST,
11932+
_2026_09_13,
1193211933
_2026_09_11,
11933-
_2026_09_09,
1193411934
_2026_08_19,
1193511935
_2026_06_15,
1193611936
/**
@@ -11950,8 +11950,8 @@ private constructor(
1195011950
fun value(): Value =
1195111951
when (this) {
1195211952
LATEST -> Value.LATEST
11953+
_2026_09_13 -> Value._2026_09_13
1195311954
_2026_09_11 -> Value._2026_09_11
11954-
_2026_09_09 -> Value._2026_09_09
1195511955
_2026_08_19 -> Value._2026_08_19
1195611956
_2026_06_15 -> Value._2026_06_15
1195711957
else -> Value._UNKNOWN
@@ -11969,8 +11969,8 @@ private constructor(
1196911969
fun known(): Known =
1197011970
when (this) {
1197111971
LATEST -> Known.LATEST
11972+
_2026_09_13 -> Known._2026_09_13
1197211973
_2026_09_11 -> Known._2026_09_11
11973-
_2026_09_09 -> Known._2026_09_09
1197411974
_2026_08_19 -> Known._2026_08_19
1197511975
_2026_06_15 -> Known._2026_06_15
1197611976
else -> throw LlamaCloudInvalidDataException("Unknown Version: $value")

0 commit comments

Comments
 (0)