Skip to content

Commit 328bd3d

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#46)
1 parent ffbf632 commit 328bd3d

File tree

16 files changed

+157
-9
lines changed

16 files changed

+157
-9
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 81
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-f78191153cae54be3e273ca76fbb91453dec4696f00fc6d679ca2ffc3d533ede.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-4bee800ad604492e6ee5776c10e1668037755aeaae6ff6faa2d09a0c3763eeee.yml

src/asktable/resources/datasources/datasources.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def create(
9696
*,
9797
engine: Literal["mysql", "tidb", "postgresql", "oceanbase", "clickhouse", "csv", "excel", "starrocks"],
9898
async_process_meta: bool | NotGiven = NOT_GIVEN,
99+
value_index: bool | NotGiven = NOT_GIVEN,
99100
access_config: Optional[datasource_create_params.AccessConfig] | NotGiven = NOT_GIVEN,
100101
name: Optional[str] | NotGiven = NOT_GIVEN,
101102
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -139,7 +140,11 @@ def create(
139140
extra_body=extra_body,
140141
timeout=timeout,
141142
query=maybe_transform(
142-
{"async_process_meta": async_process_meta}, datasource_create_params.DatasourceCreateParams
143+
{
144+
"async_process_meta": async_process_meta,
145+
"value_index": value_index,
146+
},
147+
datasource_create_params.DatasourceCreateParams,
143148
),
144149
),
145150
cast_to=Datasource,
@@ -340,6 +345,7 @@ def create_from_file(
340345
file: FileTypes,
341346
async_process_meta: bool | NotGiven = NOT_GIVEN,
342347
name: str | NotGiven = NOT_GIVEN,
348+
value_index: bool | NotGiven = NOT_GIVEN,
343349
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
344350
# The extra values given here take precedence over values defined on the client or passed to this method.
345351
extra_headers: Headers | None = None,
@@ -378,6 +384,7 @@ def create_from_file(
378384
{
379385
"async_process_meta": async_process_meta,
380386
"name": name,
387+
"value_index": value_index,
381388
},
382389
datasource_create_from_file_params.DatasourceCreateFromFileParams,
383390
),
@@ -423,6 +430,7 @@ async def create(
423430
*,
424431
engine: Literal["mysql", "tidb", "postgresql", "oceanbase", "clickhouse", "csv", "excel", "starrocks"],
425432
async_process_meta: bool | NotGiven = NOT_GIVEN,
433+
value_index: bool | NotGiven = NOT_GIVEN,
426434
access_config: Optional[datasource_create_params.AccessConfig] | NotGiven = NOT_GIVEN,
427435
name: Optional[str] | NotGiven = NOT_GIVEN,
428436
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -466,7 +474,11 @@ async def create(
466474
extra_body=extra_body,
467475
timeout=timeout,
468476
query=await async_maybe_transform(
469-
{"async_process_meta": async_process_meta}, datasource_create_params.DatasourceCreateParams
477+
{
478+
"async_process_meta": async_process_meta,
479+
"value_index": value_index,
480+
},
481+
datasource_create_params.DatasourceCreateParams,
470482
),
471483
),
472484
cast_to=Datasource,
@@ -667,6 +679,7 @@ async def create_from_file(
667679
file: FileTypes,
668680
async_process_meta: bool | NotGiven = NOT_GIVEN,
669681
name: str | NotGiven = NOT_GIVEN,
682+
value_index: bool | NotGiven = NOT_GIVEN,
670683
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
671684
# The extra values given here take precedence over values defined on the client or passed to this method.
672685
extra_headers: Headers | None = None,
@@ -705,6 +718,7 @@ async def create_from_file(
705718
{
706719
"async_process_meta": async_process_meta,
707720
"name": name,
721+
"value_index": value_index,
708722
},
709723
datasource_create_from_file_params.DatasourceCreateFromFileParams,
710724
),

src/asktable/resources/datasources/meta.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def create(
5454
datasource_id: str,
5555
*,
5656
name: str,
57+
async_process_meta: bool | NotGiven = NOT_GIVEN,
58+
value_index: bool | NotGiven = NOT_GIVEN,
5759
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
5860
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5961
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -88,6 +90,8 @@ def create(
8890
datasource_id: str,
8991
*,
9092
body: None,
93+
async_process_meta: bool | NotGiven = NOT_GIVEN,
94+
value_index: bool | NotGiven = NOT_GIVEN,
9195
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9296
# The extra values given here take precedence over values defined on the client or passed to this method.
9397
extra_headers: Headers | None = None,
@@ -119,6 +123,8 @@ def create(
119123
datasource_id: str,
120124
*,
121125
name: str | NotGiven = NOT_GIVEN,
126+
async_process_meta: bool | NotGiven = NOT_GIVEN,
127+
value_index: bool | NotGiven = NOT_GIVEN,
122128
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
123129
body: None | NotGiven = NOT_GIVEN,
124130
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -141,7 +147,17 @@ def create(
141147
meta_create_params.MetaCreateParams,
142148
),
143149
options=make_request_options(
144-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150+
extra_headers=extra_headers,
151+
extra_query=extra_query,
152+
extra_body=extra_body,
153+
timeout=timeout,
154+
query=maybe_transform(
155+
{
156+
"async_process_meta": async_process_meta,
157+
"value_index": value_index,
158+
},
159+
meta_create_params.MetaCreateParams,
160+
),
145161
),
146162
cast_to=object,
147163
)
@@ -331,6 +347,8 @@ async def create(
331347
datasource_id: str,
332348
*,
333349
name: str,
350+
async_process_meta: bool | NotGiven = NOT_GIVEN,
351+
value_index: bool | NotGiven = NOT_GIVEN,
334352
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
335353
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
336354
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -365,6 +383,8 @@ async def create(
365383
datasource_id: str,
366384
*,
367385
body: None,
386+
async_process_meta: bool | NotGiven = NOT_GIVEN,
387+
value_index: bool | NotGiven = NOT_GIVEN,
368388
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
369389
# The extra values given here take precedence over values defined on the client or passed to this method.
370390
extra_headers: Headers | None = None,
@@ -396,6 +416,8 @@ async def create(
396416
datasource_id: str,
397417
*,
398418
name: str | NotGiven = NOT_GIVEN,
419+
async_process_meta: bool | NotGiven = NOT_GIVEN,
420+
value_index: bool | NotGiven = NOT_GIVEN,
399421
schemas: Dict[str, meta_create_params.MetaCreateSchemas] | NotGiven = NOT_GIVEN,
400422
body: None | NotGiven = NOT_GIVEN,
401423
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -418,7 +440,17 @@ async def create(
418440
meta_create_params.MetaCreateParams,
419441
),
420442
options=make_request_options(
421-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
443+
extra_headers=extra_headers,
444+
extra_query=extra_query,
445+
extra_body=extra_body,
446+
timeout=timeout,
447+
query=await async_maybe_transform(
448+
{
449+
"async_process_meta": async_process_meta,
450+
"value_index": value_index,
451+
},
452+
meta_create_params.MetaCreateParams,
453+
),
422454
),
423455
cast_to=object,
424456
)

src/asktable/resources/integration.py

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def create_excel_ds(
5151
self,
5252
*,
5353
file_url: str,
54+
value_index: bool | NotGiven = NOT_GIVEN,
5455
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5556
# The extra values given here take precedence over values defined on the client or passed to this method.
5657
extra_headers: Headers | None = None,
@@ -78,7 +79,11 @@ def create_excel_ds(
7879
extra_body=extra_body,
7980
timeout=timeout,
8081
query=maybe_transform(
81-
{"file_url": file_url}, integration_create_excel_ds_params.IntegrationCreateExcelDsParams
82+
{
83+
"file_url": file_url,
84+
"value_index": value_index,
85+
},
86+
integration_create_excel_ds_params.IntegrationCreateExcelDsParams,
8287
),
8388
),
8489
cast_to=Datasource,
@@ -89,6 +94,7 @@ def excel_csv_ask(
8994
*,
9095
file_url: str,
9196
question: str,
97+
value_index: bool | NotGiven = NOT_GIVEN,
9298
with_json: Optional[bool] | NotGiven = NOT_GIVEN,
9399
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
94100
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -126,7 +132,13 @@ def excel_csv_ask(
126132
integration_excel_csv_ask_params.IntegrationExcelCsvAskParams,
127133
),
128134
options=make_request_options(
129-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
135+
extra_headers=extra_headers,
136+
extra_query=extra_query,
137+
extra_body=extra_body,
138+
timeout=timeout,
139+
query=maybe_transform(
140+
{"value_index": value_index}, integration_excel_csv_ask_params.IntegrationExcelCsvAskParams
141+
),
130142
),
131143
cast_to=FileAskResponse,
132144
)
@@ -156,6 +168,7 @@ async def create_excel_ds(
156168
self,
157169
*,
158170
file_url: str,
171+
value_index: bool | NotGiven = NOT_GIVEN,
159172
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
160173
# The extra values given here take precedence over values defined on the client or passed to this method.
161174
extra_headers: Headers | None = None,
@@ -183,7 +196,11 @@ async def create_excel_ds(
183196
extra_body=extra_body,
184197
timeout=timeout,
185198
query=await async_maybe_transform(
186-
{"file_url": file_url}, integration_create_excel_ds_params.IntegrationCreateExcelDsParams
199+
{
200+
"file_url": file_url,
201+
"value_index": value_index,
202+
},
203+
integration_create_excel_ds_params.IntegrationCreateExcelDsParams,
187204
),
188205
),
189206
cast_to=Datasource,
@@ -194,6 +211,7 @@ async def excel_csv_ask(
194211
*,
195212
file_url: str,
196213
question: str,
214+
value_index: bool | NotGiven = NOT_GIVEN,
197215
with_json: Optional[bool] | NotGiven = NOT_GIVEN,
198216
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
199217
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -231,7 +249,13 @@ async def excel_csv_ask(
231249
integration_excel_csv_ask_params.IntegrationExcelCsvAskParams,
232250
),
233251
options=make_request_options(
234-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
252+
extra_headers=extra_headers,
253+
extra_query=extra_query,
254+
extra_body=extra_body,
255+
timeout=timeout,
256+
query=await async_maybe_transform(
257+
{"value_index": value_index}, integration_excel_csv_ask_params.IntegrationExcelCsvAskParams
258+
),
235259
),
236260
cast_to=FileAskResponse,
237261
)

src/asktable/resources/sys/projects/projects.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def update(
130130
self,
131131
project_id: str,
132132
*,
133+
llm_model_group: Optional[str] | NotGiven = NOT_GIVEN,
133134
locked: Optional[bool] | NotGiven = NOT_GIVEN,
134135
name: Optional[str] | NotGiven = NOT_GIVEN,
135136
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -143,6 +144,8 @@ def update(
143144
Update Project
144145
145146
Args:
147+
llm_model_group: 模型组
148+
146149
locked: 是否锁定
147150
148151
name: 项目名称
@@ -161,6 +164,7 @@ def update(
161164
f"/sys/projects/{project_id}",
162165
body=maybe_transform(
163166
{
167+
"llm_model_group": llm_model_group,
164168
"locked": locked,
165169
"name": name,
166170
},
@@ -352,6 +356,7 @@ async def update(
352356
self,
353357
project_id: str,
354358
*,
359+
llm_model_group: Optional[str] | NotGiven = NOT_GIVEN,
355360
locked: Optional[bool] | NotGiven = NOT_GIVEN,
356361
name: Optional[str] | NotGiven = NOT_GIVEN,
357362
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -365,6 +370,8 @@ async def update(
365370
Update Project
366371
367372
Args:
373+
llm_model_group: 模型组
374+
368375
locked: 是否锁定
369376
370377
name: 项目名称
@@ -383,6 +390,7 @@ async def update(
383390
f"/sys/projects/{project_id}",
384391
body=await async_maybe_transform(
385392
{
393+
"llm_model_group": llm_model_group,
386394
"locked": locked,
387395
"name": name,
388396
},

src/asktable/types/datasource_create_from_file_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ class DatasourceCreateFromFileParams(TypedDict, total=False):
1515
async_process_meta: bool
1616

1717
name: str
18+
19+
value_index: bool

src/asktable/types/datasource_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class DatasourceCreateParams(TypedDict, total=False):
1414

1515
async_process_meta: bool
1616

17+
value_index: bool
18+
1719
access_config: Optional[AccessConfig]
1820
"""不同引擎有不同的配置"""
1921

src/asktable/types/datasources/meta_create_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class MetaCreate(TypedDict, total=False):
1919
name: Required[str]
2020
"""metadata_name"""
2121

22+
async_process_meta: bool
23+
24+
value_index: bool
25+
2226
schemas: Dict[str, MetaCreateSchemas]
2327

2428

@@ -62,5 +66,9 @@ class MetaCreateSchemas(TypedDict, total=False):
6266
class Variant1(TypedDict, total=False):
6367
body: Required[None]
6468

69+
async_process_meta: bool
70+
71+
value_index: bool
72+
6573

6674
MetaCreateParams: TypeAlias = Union[MetaCreate, Variant1]

src/asktable/types/integration_create_excel_ds_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@
99

1010
class IntegrationCreateExcelDsParams(TypedDict, total=False):
1111
file_url: Required[str]
12+
13+
value_index: bool

src/asktable/types/integration_excel_csv_ask_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ class IntegrationExcelCsvAskParams(TypedDict, total=False):
1515
question: Required[str]
1616
"""用户问题"""
1717

18+
value_index: bool
19+
1820
with_json: Optional[bool]
1921
"""是否将数据作为 json 附件返回"""

0 commit comments

Comments
 (0)