Skip to content

Commit 79761cc

Browse files
llama-org-ci-bot[bot]stlc-bot
andauthored
Release SDK updates (#29)
* Build SDK Stainless-Generated-From: a4c7a204887ef9443571db630c5edc91be8b184c * Build SDK Stainless-Generated-From: c5a76f577096bce236e24ae7f646c7884adab31d * Reject a file ordering the query cannot perform (#25596) Stainless-Generated-From: 1bf3881cf18645082310e25ef00987ec3d62f408 * Bound the pagination params that had no range (#25594) Stainless-Generated-From: f8c9f5eefb562f72e1c8dcd6058b77b06b1aa457 * LI-9325: scope data-source and data-sink by-id routes to the requested project (#25476) Stainless-Generated-From: 7b61f91c1e5cf347222079a8639b1d30909a0e77 * Build SDK Stainless-Generated-From: 6cefc0953e9b298dd4992d713ada3c519fc1695c * LI-9368: refuse a retrieval count below one at the request boundary (#25638) Stainless-Generated-From: 98b1ce1f90be49f9ea4955e8cbf5d898c1c41c86 * LI-9369: refuse a webhook subscription to no events (#25639) Stainless-Generated-From: a5b25e61f39591ccb28df3b20be9476ee11eb994 * LI-9370: make the chunk_overlap bound real, and fence the typo that disabled it (#25642) Stainless-Generated-From: 9d11a1ff6caf74f8e8bee99b47f6761ed05f016e * Build SDK Stainless-Generated-From: c4b28402a9240edd7cdd5b9c95dd44d6c62de486 * LI-9329: drop the retired Sheets resources and the stale Verify withholding Stainless-Generated-From: 0b3961b7f2af102ce6fed6f8a770946985e55145 * Build SDK Stainless-Generated-From: 3072e984c39c8f040e655d33acaed95935c1b683 * Build SDK Stainless-Generated-From: aea8a2290326cc7018ebc4411da80f3763d4108e * Build SDK Stainless-Generated-From: b9cb103610a8f6b1377b2638fdb599e729dbca52 * Build SDK Stainless-Generated-From: 0ca702ecb4e6db14548137d6c17bcdb54debf237 * feat(api): map DELETE /api/v2/parse/{job_id} and GET /api/v2/pipelines into the SDKs (LI-9569) Stainless-Generated-From: 24fd8c8e09a56f4d391570fb043ddcd4e3a34dfc --------- Co-authored-by: llama-org-ci-bot[bot] <231146559+llama-org-ci-bot[bot]@users.noreply.github.com> Co-authored-by: stlc-bot <stlc-bot@users.noreply.github.com>
1 parent d7390ad commit 79761cc

183 files changed

Lines changed: 6038 additions & 5254 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: 138

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- x-release-please-start-version -->
44

55
[![Maven Central](https://img.shields.io/maven-central/v/ai.llamaindex.llamacloud/llama-cloud)](https://central.sonatype.com/artifact/ai.llamaindex.llamacloud/llama-cloud/1.6.0)
6-
[![javadoc](https://javadoc.io/badge2/ai.llamaindex.llamacloud/llama-cloud/1.6.0/javadoc.svg)](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.5.1)
6+
[![javadoc](https://javadoc.io/badge2/ai.llamaindex.llamacloud/llama-cloud/1.6.0/javadoc.svg)](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.6.0)
77

88
<!-- x-release-please-end -->
99

‎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
@@ -17,7 +17,6 @@ import ai.llamaindex.llamacloud.services.blocking.ParsingService
1717
import ai.llamaindex.llamacloud.services.blocking.PipelineService
1818
import ai.llamaindex.llamacloud.services.blocking.ProjectService
1919
import ai.llamaindex.llamacloud.services.blocking.RetrieverService
20-
import ai.llamaindex.llamacloud.services.blocking.SheetService
2120
import ai.llamaindex.llamacloud.services.blocking.SplitService
2221
import ai.llamaindex.llamacloud.services.blocking.V2ProjectService
2322
import ai.llamaindex.llamacloud.services.blocking.WebhookConfigService
@@ -61,8 +60,6 @@ interface LlamaCloudClient {
6160

6261
fun files(): FileService
6362

64-
fun sheets(): SheetService
65-
6663
fun split(): SplitService
6764

6865
fun parsing(): ParsingService
@@ -120,8 +117,6 @@ interface LlamaCloudClient {
120117

121118
fun files(): FileService.WithRawResponse
122119

123-
fun sheets(): SheetService.WithRawResponse
124-
125120
fun split(): SplitService.WithRawResponse
126121

127122
fun parsing(): ParsingService.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
@@ -17,7 +17,6 @@ import ai.llamaindex.llamacloud.services.async.ParsingServiceAsync
1717
import ai.llamaindex.llamacloud.services.async.PipelineServiceAsync
1818
import ai.llamaindex.llamacloud.services.async.ProjectServiceAsync
1919
import ai.llamaindex.llamacloud.services.async.RetrieverServiceAsync
20-
import ai.llamaindex.llamacloud.services.async.SheetServiceAsync
2120
import ai.llamaindex.llamacloud.services.async.SplitServiceAsync
2221
import ai.llamaindex.llamacloud.services.async.V2ProjectServiceAsync
2322
import ai.llamaindex.llamacloud.services.async.WebhookConfigServiceAsync
@@ -61,8 +60,6 @@ interface LlamaCloudClientAsync {
6160

6261
fun files(): FileServiceAsync
6362

64-
fun sheets(): SheetServiceAsync
65-
6663
fun split(): SplitServiceAsync
6764

6865
fun parsing(): ParsingServiceAsync
@@ -124,8 +121,6 @@ interface LlamaCloudClientAsync {
124121

125122
fun files(): FileServiceAsync.WithRawResponse
126123

127-
fun sheets(): SheetServiceAsync.WithRawResponse
128-
129124
fun split(): SplitServiceAsync.WithRawResponse
130125

131126
fun parsing(): ParsingServiceAsync.WithRawResponse

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ import ai.llamaindex.llamacloud.services.async.ProjectServiceAsync
3232
import ai.llamaindex.llamacloud.services.async.ProjectServiceAsyncImpl
3333
import ai.llamaindex.llamacloud.services.async.RetrieverServiceAsync
3434
import ai.llamaindex.llamacloud.services.async.RetrieverServiceAsyncImpl
35-
import ai.llamaindex.llamacloud.services.async.SheetServiceAsync
36-
import ai.llamaindex.llamacloud.services.async.SheetServiceAsyncImpl
3735
import ai.llamaindex.llamacloud.services.async.SplitServiceAsync
3836
import ai.llamaindex.llamacloud.services.async.SplitServiceAsyncImpl
3937
import ai.llamaindex.llamacloud.services.async.V2ProjectServiceAsync
@@ -61,10 +59,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
6159

6260
private val files: FileServiceAsync by lazy { FileServiceAsyncImpl(clientOptionsWithUserAgent) }
6361

64-
private val sheets: SheetServiceAsync by lazy {
65-
SheetServiceAsyncImpl(clientOptionsWithUserAgent)
66-
}
67-
6862
private val split: SplitServiceAsync by lazy {
6963
SplitServiceAsyncImpl(clientOptionsWithUserAgent)
7064
}
@@ -136,8 +130,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
136130

137131
override fun files(): FileServiceAsync = files
138132

139-
override fun sheets(): SheetServiceAsync = sheets
140-
141133
override fun split(): SplitServiceAsync = split
142134

143135
override fun parsing(): ParsingServiceAsync = parsing
@@ -179,10 +171,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
179171
FileServiceAsyncImpl.WithRawResponseImpl(clientOptions)
180172
}
181173

182-
private val sheets: SheetServiceAsync.WithRawResponse by lazy {
183-
SheetServiceAsyncImpl.WithRawResponseImpl(clientOptions)
184-
}
185-
186174
private val split: SplitServiceAsync.WithRawResponse by lazy {
187175
SplitServiceAsyncImpl.WithRawResponseImpl(clientOptions)
188176
}
@@ -256,8 +244,6 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
256244

257245
override fun files(): FileServiceAsync.WithRawResponse = files
258246

259-
override fun sheets(): SheetServiceAsync.WithRawResponse = sheets
260-
261247
override fun split(): SplitServiceAsync.WithRawResponse = split
262248

263249
override fun parsing(): ParsingServiceAsync.WithRawResponse = parsing

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ import ai.llamaindex.llamacloud.services.blocking.ProjectService
3232
import ai.llamaindex.llamacloud.services.blocking.ProjectServiceImpl
3333
import ai.llamaindex.llamacloud.services.blocking.RetrieverService
3434
import ai.llamaindex.llamacloud.services.blocking.RetrieverServiceImpl
35-
import ai.llamaindex.llamacloud.services.blocking.SheetService
36-
import ai.llamaindex.llamacloud.services.blocking.SheetServiceImpl
3735
import ai.llamaindex.llamacloud.services.blocking.SplitService
3836
import ai.llamaindex.llamacloud.services.blocking.SplitServiceImpl
3937
import ai.llamaindex.llamacloud.services.blocking.V2ProjectService
@@ -61,8 +59,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
6159

6260
private val files: FileService by lazy { FileServiceImpl(clientOptionsWithUserAgent) }
6361

64-
private val sheets: SheetService by lazy { SheetServiceImpl(clientOptionsWithUserAgent) }
65-
6662
private val split: SplitService by lazy { SplitServiceImpl(clientOptionsWithUserAgent) }
6763

6864
private val parsing: ParsingService by lazy { ParsingServiceImpl(clientOptionsWithUserAgent) }
@@ -124,8 +120,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
124120

125121
override fun files(): FileService = files
126122

127-
override fun sheets(): SheetService = sheets
128-
129123
override fun split(): SplitService = split
130124

131125
override fun parsing(): ParsingService = parsing
@@ -167,10 +161,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
167161
FileServiceImpl.WithRawResponseImpl(clientOptions)
168162
}
169163

170-
private val sheets: SheetService.WithRawResponse by lazy {
171-
SheetServiceImpl.WithRawResponseImpl(clientOptions)
172-
}
173-
174164
private val split: SplitService.WithRawResponse by lazy {
175165
SplitServiceImpl.WithRawResponseImpl(clientOptions)
176166
}
@@ -244,8 +234,6 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
244234

245235
override fun files(): FileService.WithRawResponse = files
246236

247-
override fun sheets(): SheetService.WithRawResponse = sheets
248-
249237
override fun split(): SplitService.WithRawResponse = split
250238

251239
override fun parsing(): ParsingService.WithRawResponse = parsing

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private constructor(
115115
fun staticFilters(): Optional<StaticFilters> = body.staticFilters()
116116

117117
/**
118-
* Maximum number of results to return.
118+
* Maximum number of results to return. Values above 500 are capped at 500.
119119
*
120120
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the
121121
* server responded with an unexpected value).
@@ -422,7 +422,7 @@ private constructor(
422422
body.staticFilters(staticFilters)
423423
}
424424

425-
/** Maximum number of results to return. */
425+
/** Maximum number of results to return. Values above 500 are capped at 500. */
426426
fun topK(topK: Long?) = apply { body.topK(topK) }
427427

428428
/**
@@ -748,7 +748,7 @@ private constructor(
748748
fun staticFilters(): Optional<StaticFilters> = staticFilters.getOptional("static_filters")
749749

750750
/**
751-
* Maximum number of results to return.
751+
* Maximum number of results to return. Values above 500 are capped at 500.
752752
*
753753
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if
754754
* the server responded with an unexpected value).
@@ -1064,7 +1064,7 @@ private constructor(
10641064
this.staticFilters = staticFilters
10651065
}
10661066

1067-
/** Maximum number of results to return. */
1067+
/** Maximum number of results to return. Values above 500 are capped at 500. */
10681068
fun topK(topK: Long?) = topK(JsonField.ofNullable(topK))
10691069

10701070
/**

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

Lines changed: 113 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -847,15 +847,23 @@ private constructor(
847847
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
848848
private constructor(
849849
private val allowUncategorized: JsonField<AllowUncategorized>,
850+
private val customInstructions: JsonField<String>,
851+
private val minPagesPerSplit: JsonField<Long>,
850852
private val additionalProperties: MutableMap<String, JsonValue>,
851853
) {
852854

853855
@JsonCreator
854856
private constructor(
855857
@JsonProperty("allow_uncategorized")
856858
@ExcludeMissing
857-
allowUncategorized: JsonField<AllowUncategorized> = JsonMissing.of()
858-
) : this(allowUncategorized, mutableMapOf())
859+
allowUncategorized: JsonField<AllowUncategorized> = JsonMissing.of(),
860+
@JsonProperty("custom_instructions")
861+
@ExcludeMissing
862+
customInstructions: JsonField<String> = JsonMissing.of(),
863+
@JsonProperty("min_pages_per_split")
864+
@ExcludeMissing
865+
minPagesPerSplit: JsonField<Long> = JsonMissing.of(),
866+
) : this(allowUncategorized, customInstructions, minPagesPerSplit, mutableMapOf())
859867

860868
/**
861869
* Controls handling of pages that don't match any category. 'include': pages can be
@@ -869,6 +877,25 @@ private constructor(
869877
fun allowUncategorized(): Optional<AllowUncategorized> =
870878
allowUncategorized.getOptional("allow_uncategorized")
871879

880+
/**
881+
* Free-form guidance for where segment boundaries are placed.
882+
*
883+
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g.
884+
* if the server responded with an unexpected value).
885+
*/
886+
fun customInstructions(): Optional<String> =
887+
customInstructions.getOptional("custom_instructions")
888+
889+
/**
890+
* Minimum pages per segment. Shorter segments are merged into an adjacent segment; 1
891+
* disables merging.
892+
*
893+
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g.
894+
* if the server responded with an unexpected value).
895+
*/
896+
fun minPagesPerSplit(): Optional<Long> =
897+
minPagesPerSplit.getOptional("min_pages_per_split")
898+
872899
/**
873900
* Returns the raw JSON value of [allowUncategorized].
874901
*
@@ -879,6 +906,26 @@ private constructor(
879906
@ExcludeMissing
880907
fun _allowUncategorized(): JsonField<AllowUncategorized> = allowUncategorized
881908

909+
/**
910+
* Returns the raw JSON value of [customInstructions].
911+
*
912+
* Unlike [customInstructions], this method doesn't throw if the JSON field has an
913+
* unexpected type.
914+
*/
915+
@JsonProperty("custom_instructions")
916+
@ExcludeMissing
917+
fun _customInstructions(): JsonField<String> = customInstructions
918+
919+
/**
920+
* Returns the raw JSON value of [minPagesPerSplit].
921+
*
922+
* Unlike [minPagesPerSplit], this method doesn't throw if the JSON field has an
923+
* unexpected type.
924+
*/
925+
@JsonProperty("min_pages_per_split")
926+
@ExcludeMissing
927+
fun _minPagesPerSplit(): JsonField<Long> = minPagesPerSplit
928+
882929
@JsonAnySetter
883930
private fun putAdditionalProperty(key: String, value: JsonValue) {
884931
additionalProperties.put(key, value)
@@ -903,11 +950,15 @@ private constructor(
903950
class Builder internal constructor() {
904951

905952
private var allowUncategorized: JsonField<AllowUncategorized> = JsonMissing.of()
953+
private var customInstructions: JsonField<String> = JsonMissing.of()
954+
private var minPagesPerSplit: JsonField<Long> = JsonMissing.of()
906955
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
907956

908957
@JvmSynthetic
909958
internal fun from(splittingStrategy: SplittingStrategy) = apply {
910959
allowUncategorized = splittingStrategy.allowUncategorized
960+
customInstructions = splittingStrategy.customInstructions
961+
minPagesPerSplit = splittingStrategy.minPagesPerSplit
911962
additionalProperties = splittingStrategy.additionalProperties.toMutableMap()
912963
}
913964

@@ -931,6 +982,46 @@ private constructor(
931982
this.allowUncategorized = allowUncategorized
932983
}
933984

985+
/** Free-form guidance for where segment boundaries are placed. */
986+
fun customInstructions(customInstructions: String?) =
987+
customInstructions(JsonField.ofNullable(customInstructions))
988+
989+
/**
990+
* Alias for calling [Builder.customInstructions] with
991+
* `customInstructions.orElse(null)`.
992+
*/
993+
fun customInstructions(customInstructions: Optional<String>) =
994+
customInstructions(customInstructions.getOrNull())
995+
996+
/**
997+
* Sets [Builder.customInstructions] to an arbitrary JSON value.
998+
*
999+
* You should usually call [Builder.customInstructions] with a well-typed [String]
1000+
* value instead. This method is primarily for setting the field to an undocumented
1001+
* or not yet supported value.
1002+
*/
1003+
fun customInstructions(customInstructions: JsonField<String>) = apply {
1004+
this.customInstructions = customInstructions
1005+
}
1006+
1007+
/**
1008+
* Minimum pages per segment. Shorter segments are merged into an adjacent segment;
1009+
* 1 disables merging.
1010+
*/
1011+
fun minPagesPerSplit(minPagesPerSplit: Long) =
1012+
minPagesPerSplit(JsonField.of(minPagesPerSplit))
1013+
1014+
/**
1015+
* Sets [Builder.minPagesPerSplit] to an arbitrary JSON value.
1016+
*
1017+
* You should usually call [Builder.minPagesPerSplit] with a well-typed [Long] value
1018+
* instead. This method is primarily for setting the field to an undocumented or not
1019+
* yet supported value.
1020+
*/
1021+
fun minPagesPerSplit(minPagesPerSplit: JsonField<Long>) = apply {
1022+
this.minPagesPerSplit = minPagesPerSplit
1023+
}
1024+
9341025
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
9351026
this.additionalProperties.clear()
9361027
putAllAdditionalProperties(additionalProperties)
@@ -959,7 +1050,12 @@ private constructor(
9591050
* Further updates to this [Builder] will not mutate the returned instance.
9601051
*/
9611052
fun build(): SplittingStrategy =
962-
SplittingStrategy(allowUncategorized, additionalProperties.toMutableMap())
1053+
SplittingStrategy(
1054+
allowUncategorized,
1055+
customInstructions,
1056+
minPagesPerSplit,
1057+
additionalProperties.toMutableMap(),
1058+
)
9631059
}
9641060

9651061
private var validated: Boolean = false
@@ -980,6 +1076,8 @@ private constructor(
9801076
}
9811077

9821078
allowUncategorized().ifPresent { it.validate() }
1079+
customInstructions()
1080+
minPagesPerSplit()
9831081
validated = true
9841082
}
9851083

@@ -999,7 +1097,9 @@ private constructor(
9991097
*/
10001098
@JvmSynthetic
10011099
internal fun validity(): Int =
1002-
(allowUncategorized.asKnown().getOrNull()?.validity() ?: 0)
1100+
(allowUncategorized.asKnown().getOrNull()?.validity() ?: 0) +
1101+
(if (customInstructions.asKnown().isPresent) 1 else 0) +
1102+
(if (minPagesPerSplit.asKnown().isPresent) 1 else 0)
10031103

10041104
/**
10051105
* Controls handling of pages that don't match any category. 'include': pages can be
@@ -1167,17 +1267,24 @@ private constructor(
11671267

11681268
return other is SplittingStrategy &&
11691269
allowUncategorized == other.allowUncategorized &&
1270+
customInstructions == other.customInstructions &&
1271+
minPagesPerSplit == other.minPagesPerSplit &&
11701272
additionalProperties == other.additionalProperties
11711273
}
11721274

11731275
private val hashCode: Int by lazy {
1174-
Objects.hash(allowUncategorized, additionalProperties)
1276+
Objects.hash(
1277+
allowUncategorized,
1278+
customInstructions,
1279+
minPagesPerSplit,
1280+
additionalProperties,
1281+
)
11751282
}
11761283

11771284
override fun hashCode(): Int = hashCode
11781285

11791286
override fun toString() =
1180-
"SplittingStrategy{allowUncategorized=$allowUncategorized, additionalProperties=$additionalProperties}"
1287+
"SplittingStrategy{allowUncategorized=$allowUncategorized, customInstructions=$customInstructions, minPagesPerSplit=$minPagesPerSplit, additionalProperties=$additionalProperties}"
11811288
}
11821289

11831290
override fun equals(other: Any?): Boolean {

0 commit comments

Comments
 (0)