Skip to content

Commit 3dc865c

Browse files
feat(sdk): order properties as in spec
1 parent 27162f3 commit 3dc865c

31 files changed

Lines changed: 447 additions & 447 deletions

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-fa910a5a3d1321234423bd8c042d202a64d4d956ef45847b4de358cb18e447eb.yml
33
openapi_spec_hash: 926b9b619c15e8570e496e11d4fb753e
4-
config_hash: 14b7f54005fa53738489a6f68b06a35c
4+
config_hash: a23e347480e00cefa57ce68b1de9e16d

src/isaacus/resources/classifications/universal.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ def create(
5050
model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
5151
query: str,
5252
texts: SequenceNotStr[str],
53-
chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
5453
is_iql: bool | Omit = omit,
5554
scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
55+
chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
5656
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5757
# The extra values given here take precedence over values defined on the client or passed to this method.
5858
extra_headers: Headers | None = None,
@@ -80,8 +80,6 @@ def create(
8080
8181
Each text must contain at least one non-whitespace character.
8282
83-
chunking_options: Options for how to split text into smaller chunks.
84-
8583
is_iql: Whether the query should be interpreted as an
8684
[IQL](https://docs.isaacus.com/iql) query or else as a statement.
8785
@@ -97,6 +95,8 @@ def create(
9795
9896
`chunk_min` uses the lowest confidence score of all of the texts' chunks.
9997
98+
chunking_options: Options for how to split text into smaller chunks.
99+
100100
extra_headers: Send extra headers
101101
102102
extra_query: Add additional query parameters to the request
@@ -112,9 +112,9 @@ def create(
112112
"model": model,
113113
"query": query,
114114
"texts": texts,
115-
"chunking_options": chunking_options,
116115
"is_iql": is_iql,
117116
"scoring_method": scoring_method,
117+
"chunking_options": chunking_options,
118118
},
119119
universal_create_params.UniversalCreateParams,
120120
),
@@ -151,9 +151,9 @@ async def create(
151151
model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
152152
query: str,
153153
texts: SequenceNotStr[str],
154-
chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
155154
is_iql: bool | Omit = omit,
156155
scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
156+
chunking_options: Optional[universal_create_params.ChunkingOptions] | Omit = omit,
157157
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
158158
# The extra values given here take precedence over values defined on the client or passed to this method.
159159
extra_headers: Headers | None = None,
@@ -181,8 +181,6 @@ async def create(
181181
182182
Each text must contain at least one non-whitespace character.
183183
184-
chunking_options: Options for how to split text into smaller chunks.
185-
186184
is_iql: Whether the query should be interpreted as an
187185
[IQL](https://docs.isaacus.com/iql) query or else as a statement.
188186
@@ -198,6 +196,8 @@ async def create(
198196
199197
`chunk_min` uses the lowest confidence score of all of the texts' chunks.
200198
199+
chunking_options: Options for how to split text into smaller chunks.
200+
201201
extra_headers: Send extra headers
202202
203203
extra_query: Add additional query parameters to the request
@@ -213,9 +213,9 @@ async def create(
213213
"model": model,
214214
"query": query,
215215
"texts": texts,
216-
"chunking_options": chunking_options,
217216
"is_iql": is_iql,
218217
"scoring_method": scoring_method,
218+
"chunking_options": chunking_options,
219219
},
220220
universal_create_params.UniversalCreateParams,
221221
),

src/isaacus/resources/embeddings.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def create(
4949
*,
5050
model: Literal["kanon-2-embedder"],
5151
texts: Union[SequenceNotStr[str], str],
52-
dimensions: Optional[int] | Omit = omit,
53-
overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
5452
task: Optional[Literal["retrieval/query", "retrieval/document"]] | Omit = omit,
53+
overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
54+
dimensions: Optional[int] | Omit = omit,
5555
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5656
# The extra values given here take precedence over values defined on the client or passed to this method.
5757
extra_headers: Headers | None = None,
@@ -72,7 +72,13 @@ def create(
7272
7373
No more than 128 texts can be embedded in a single request.
7474
75-
dimensions: A whole number greater than or equal to 1.
75+
task: The task the embeddings will be used for.
76+
77+
`retrieval/query` is meant for queries and statements, and `retrieval/document`
78+
is meant for anything to be retrieved using query embeddings.
79+
80+
If `null`, which is the default setting, embeddings will not be optimized for
81+
any particular task.
7682
7783
overflow_strategy: The strategy to employ when content exceeds the model's maximum input length.
7884
@@ -82,13 +88,7 @@ def create(
8288
If `null`, an error will be raised if any content exceeds the model's maximum
8389
input length.
8490
85-
task: The task the embeddings will be used for.
86-
87-
`retrieval/query` is meant for queries and statements, and `retrieval/document`
88-
is meant for anything to be retrieved using query embeddings.
89-
90-
If `null`, which is the default setting, embeddings will not be optimized for
91-
any particular task.
91+
dimensions: A whole number greater than or equal to 1.
9292
9393
extra_headers: Send extra headers
9494
@@ -104,9 +104,9 @@ def create(
104104
{
105105
"model": model,
106106
"texts": texts,
107-
"dimensions": dimensions,
108-
"overflow_strategy": overflow_strategy,
109107
"task": task,
108+
"overflow_strategy": overflow_strategy,
109+
"dimensions": dimensions,
110110
},
111111
embedding_create_params.EmbeddingCreateParams,
112112
),
@@ -142,9 +142,9 @@ async def create(
142142
*,
143143
model: Literal["kanon-2-embedder"],
144144
texts: Union[SequenceNotStr[str], str],
145-
dimensions: Optional[int] | Omit = omit,
146-
overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
147145
task: Optional[Literal["retrieval/query", "retrieval/document"]] | Omit = omit,
146+
overflow_strategy: Optional[Literal["drop_end"]] | Omit = omit,
147+
dimensions: Optional[int] | Omit = omit,
148148
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
149149
# The extra values given here take precedence over values defined on the client or passed to this method.
150150
extra_headers: Headers | None = None,
@@ -165,7 +165,13 @@ async def create(
165165
166166
No more than 128 texts can be embedded in a single request.
167167
168-
dimensions: A whole number greater than or equal to 1.
168+
task: The task the embeddings will be used for.
169+
170+
`retrieval/query` is meant for queries and statements, and `retrieval/document`
171+
is meant for anything to be retrieved using query embeddings.
172+
173+
If `null`, which is the default setting, embeddings will not be optimized for
174+
any particular task.
169175
170176
overflow_strategy: The strategy to employ when content exceeds the model's maximum input length.
171177
@@ -175,13 +181,7 @@ async def create(
175181
If `null`, an error will be raised if any content exceeds the model's maximum
176182
input length.
177183
178-
task: The task the embeddings will be used for.
179-
180-
`retrieval/query` is meant for queries and statements, and `retrieval/document`
181-
is meant for anything to be retrieved using query embeddings.
182-
183-
If `null`, which is the default setting, embeddings will not be optimized for
184-
any particular task.
184+
dimensions: A whole number greater than or equal to 1.
185185
186186
extra_headers: Send extra headers
187187
@@ -197,9 +197,9 @@ async def create(
197197
{
198198
"model": model,
199199
"texts": texts,
200-
"dimensions": dimensions,
201-
"overflow_strategy": overflow_strategy,
202200
"task": task,
201+
"overflow_strategy": overflow_strategy,
202+
"dimensions": dimensions,
203203
},
204204
embedding_create_params.EmbeddingCreateParams,
205205
),

src/isaacus/resources/extractions/qa.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ def create(
5050
model: Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"],
5151
query: str,
5252
texts: SequenceNotStr[str],
53-
chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
5453
ignore_inextractability: bool | Omit = omit,
5554
top_k: int | Omit = omit,
55+
chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
5656
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5757
# The extra values given here take precedence over values defined on the client or passed to this method.
5858
extra_headers: Headers | None = None,
@@ -82,8 +82,6 @@ def create(
8282
8383
Each text must contain at least one non-whitespace character.
8484
85-
chunking_options: Options for how to split text into smaller chunks.
86-
8785
ignore_inextractability: Whether to, if the model's score of the likelihood that an answer can not be
8886
extracted from a text is greater than the highest score of all possible answers,
8987
still return the highest scoring answers for that text.
@@ -96,6 +94,8 @@ def create(
9694
9795
If `null`, which is the default, all answers will be returned.
9896
97+
chunking_options: Options for how to split text into smaller chunks.
98+
9999
extra_headers: Send extra headers
100100
101101
extra_query: Add additional query parameters to the request
@@ -111,9 +111,9 @@ def create(
111111
"model": model,
112112
"query": query,
113113
"texts": texts,
114-
"chunking_options": chunking_options,
115114
"ignore_inextractability": ignore_inextractability,
116115
"top_k": top_k,
116+
"chunking_options": chunking_options,
117117
},
118118
qa_create_params.QACreateParams,
119119
),
@@ -150,9 +150,9 @@ async def create(
150150
model: Literal["kanon-answer-extractor", "kanon-answer-extractor-mini"],
151151
query: str,
152152
texts: SequenceNotStr[str],
153-
chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
154153
ignore_inextractability: bool | Omit = omit,
155154
top_k: int | Omit = omit,
155+
chunking_options: Optional[qa_create_params.ChunkingOptions] | Omit = omit,
156156
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
157157
# The extra values given here take precedence over values defined on the client or passed to this method.
158158
extra_headers: Headers | None = None,
@@ -182,8 +182,6 @@ async def create(
182182
183183
Each text must contain at least one non-whitespace character.
184184
185-
chunking_options: Options for how to split text into smaller chunks.
186-
187185
ignore_inextractability: Whether to, if the model's score of the likelihood that an answer can not be
188186
extracted from a text is greater than the highest score of all possible answers,
189187
still return the highest scoring answers for that text.
@@ -196,6 +194,8 @@ async def create(
196194
197195
If `null`, which is the default, all answers will be returned.
198196
197+
chunking_options: Options for how to split text into smaller chunks.
198+
199199
extra_headers: Send extra headers
200200
201201
extra_query: Add additional query parameters to the request
@@ -211,9 +211,9 @@ async def create(
211211
"model": model,
212212
"query": query,
213213
"texts": texts,
214-
"chunking_options": chunking_options,
215214
"ignore_inextractability": ignore_inextractability,
216215
"top_k": top_k,
216+
"chunking_options": chunking_options,
217217
},
218218
qa_create_params.QACreateParams,
219219
),

src/isaacus/resources/rerankings.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ def create(
5050
model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
5151
query: str,
5252
texts: SequenceNotStr[str],
53-
chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
53+
top_n: Optional[int] | Omit = omit,
5454
is_iql: bool | Omit = omit,
5555
scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
56-
top_n: Optional[int] | Omit = omit,
56+
chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
5757
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5858
# The extra values given here take precedence over values defined on the client or passed to this method.
5959
extra_headers: Headers | None = None,
@@ -82,7 +82,7 @@ def create(
8282
8383
Each text must contain at least one non-whitespace character.
8484
85-
chunking_options: Options for how to split text into smaller chunks.
85+
top_n: A whole number greater than or equal to 1.
8686
8787
is_iql: Whether the query should be interpreted as an
8888
[Isaacus Query Language (IQL)](https://docs.isaacus.com/iql) query, which is not
@@ -104,7 +104,7 @@ def create(
104104
105105
`chunk_min` uses the lowest relevance score of all of a text's chunks.
106106
107-
top_n: A whole number greater than or equal to 1.
107+
chunking_options: Options for how to split text into smaller chunks.
108108
109109
extra_headers: Send extra headers
110110
@@ -121,10 +121,10 @@ def create(
121121
"model": model,
122122
"query": query,
123123
"texts": texts,
124-
"chunking_options": chunking_options,
124+
"top_n": top_n,
125125
"is_iql": is_iql,
126126
"scoring_method": scoring_method,
127-
"top_n": top_n,
127+
"chunking_options": chunking_options,
128128
},
129129
reranking_create_params.RerankingCreateParams,
130130
),
@@ -161,10 +161,10 @@ async def create(
161161
model: Literal["kanon-universal-classifier", "kanon-universal-classifier-mini"],
162162
query: str,
163163
texts: SequenceNotStr[str],
164-
chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
164+
top_n: Optional[int] | Omit = omit,
165165
is_iql: bool | Omit = omit,
166166
scoring_method: Literal["auto", "chunk_max", "chunk_avg", "chunk_min"] | Omit = omit,
167-
top_n: Optional[int] | Omit = omit,
167+
chunking_options: Optional[reranking_create_params.ChunkingOptions] | Omit = omit,
168168
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169169
# The extra values given here take precedence over values defined on the client or passed to this method.
170170
extra_headers: Headers | None = None,
@@ -193,7 +193,7 @@ async def create(
193193
194194
Each text must contain at least one non-whitespace character.
195195
196-
chunking_options: Options for how to split text into smaller chunks.
196+
top_n: A whole number greater than or equal to 1.
197197
198198
is_iql: Whether the query should be interpreted as an
199199
[Isaacus Query Language (IQL)](https://docs.isaacus.com/iql) query, which is not
@@ -215,7 +215,7 @@ async def create(
215215
216216
`chunk_min` uses the lowest relevance score of all of a text's chunks.
217217
218-
top_n: A whole number greater than or equal to 1.
218+
chunking_options: Options for how to split text into smaller chunks.
219219
220220
extra_headers: Send extra headers
221221
@@ -232,10 +232,10 @@ async def create(
232232
"model": model,
233233
"query": query,
234234
"texts": texts,
235-
"chunking_options": chunking_options,
235+
"top_n": top_n,
236236
"is_iql": is_iql,
237237
"scoring_method": scoring_method,
238-
"top_n": top_n,
238+
"chunking_options": chunking_options,
239239
},
240240
reranking_create_params.RerankingCreateParams,
241241
),

0 commit comments

Comments
 (0)