Skip to content

Commit addbcf9

Browse files
feat(api): api update (#196)
1 parent fb83cf4 commit addbcf9

File tree

6 files changed

+31
-2
lines changed

6 files changed

+31
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 96
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-1362c05de3e337a1faaaca4272f9b49578a55958f36132e3ca1f4500ecc18221.yml
3-
openapi_spec_hash: 736ffbb33ae592972c2eb93b597f36f5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-5f188889fe648ea83d57911900fe61825d9d7d1446fce966ffca7a9bbe2e3079.yml
3+
openapi_spec_hash: 42af219a138819686969b60410be0cb6
44
config_hash: 575ddfb316392e5f7f3c7b7999796a03

src/asktable/resources/bots.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def create(
5858
magic_input: Optional[str] | NotGiven = NOT_GIVEN,
5959
max_rows: int | NotGiven = NOT_GIVEN,
6060
publish: bool | NotGiven = NOT_GIVEN,
61+
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
6162
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
6263
webhooks: List[str] | NotGiven = NOT_GIVEN,
6364
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -88,6 +89,8 @@ def create(
8889
8990
publish: 是否公开
9091
92+
query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数
93+
9194
sample_questions: 示例问题列表
9295
9396
webhooks: Webhook URL 列表
@@ -114,6 +117,7 @@ def create(
114117
"magic_input": magic_input,
115118
"max_rows": max_rows,
116119
"publish": publish,
120+
"query_balance": query_balance,
117121
"sample_questions": sample_questions,
118122
"webhooks": webhooks,
119123
"welcome_message": welcome_message,
@@ -172,6 +176,7 @@ def update(
172176
max_rows: Optional[int] | NotGiven = NOT_GIVEN,
173177
name: Optional[str] | NotGiven = NOT_GIVEN,
174178
publish: Optional[bool] | NotGiven = NOT_GIVEN,
179+
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
175180
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
176181
webhooks: Optional[List[str]] | NotGiven = NOT_GIVEN,
177182
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -204,6 +209,8 @@ def update(
204209
205210
publish: 是否公开
206211
212+
query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数
213+
207214
sample_questions: 示例问题列表
208215
209216
webhooks: Webhook URL 列表
@@ -233,6 +240,7 @@ def update(
233240
"max_rows": max_rows,
234241
"name": name,
235242
"publish": publish,
243+
"query_balance": query_balance,
236244
"sample_questions": sample_questions,
237245
"webhooks": webhooks,
238246
"welcome_message": welcome_message,
@@ -403,6 +411,7 @@ async def create(
403411
magic_input: Optional[str] | NotGiven = NOT_GIVEN,
404412
max_rows: int | NotGiven = NOT_GIVEN,
405413
publish: bool | NotGiven = NOT_GIVEN,
414+
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
406415
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
407416
webhooks: List[str] | NotGiven = NOT_GIVEN,
408417
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -433,6 +442,8 @@ async def create(
433442
434443
publish: 是否公开
435444
445+
query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数
446+
436447
sample_questions: 示例问题列表
437448
438449
webhooks: Webhook URL 列表
@@ -459,6 +470,7 @@ async def create(
459470
"magic_input": magic_input,
460471
"max_rows": max_rows,
461472
"publish": publish,
473+
"query_balance": query_balance,
462474
"sample_questions": sample_questions,
463475
"webhooks": webhooks,
464476
"welcome_message": welcome_message,
@@ -517,6 +529,7 @@ async def update(
517529
max_rows: Optional[int] | NotGiven = NOT_GIVEN,
518530
name: Optional[str] | NotGiven = NOT_GIVEN,
519531
publish: Optional[bool] | NotGiven = NOT_GIVEN,
532+
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
520533
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
521534
webhooks: Optional[List[str]] | NotGiven = NOT_GIVEN,
522535
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -549,6 +562,8 @@ async def update(
549562
550563
publish: 是否公开
551564
565+
query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数
566+
552567
sample_questions: 示例问题列表
553568
554569
webhooks: Webhook URL 列表
@@ -578,6 +593,7 @@ async def update(
578593
"max_rows": max_rows,
579594
"name": name,
580595
"publish": publish,
596+
"query_balance": query_balance,
581597
"sample_questions": sample_questions,
582598
"webhooks": webhooks,
583599
"welcome_message": welcome_message,

src/asktable/types/bot_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class BotCreateParams(TypedDict, total=False):
3333
publish: bool
3434
"""是否公开"""
3535

36+
query_balance: Optional[int]
37+
"""bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数"""
38+
3639
sample_questions: Optional[List[str]]
3740
"""示例问题列表"""
3841

src/asktable/types/bot_update_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class BotUpdateParams(TypedDict, total=False):
3636
publish: Optional[bool]
3737
"""是否公开"""
3838

39+
query_balance: Optional[int]
40+
"""bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数"""
41+
3942
sample_questions: Optional[List[str]]
4043
"""示例问题列表"""
4144

src/asktable/types/chatbot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class Chatbot(BaseModel):
4444
publish: Optional[bool] = None
4545
"""是否公开"""
4646

47+
query_balance: Optional[int] = None
48+
"""bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 1 的整数"""
49+
4750
sample_questions: Optional[List[str]] = None
4851
"""示例问题列表"""
4952

tests/api_resources/test_bots.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
3737
magic_input="magic_input",
3838
max_rows=50,
3939
publish=True,
40+
query_balance=100,
4041
sample_questions=["你好!今天中午有什么适合我的午餐?"],
4142
webhooks=["string"],
4243
welcome_message="欢迎使用AskTable",
@@ -127,6 +128,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None:
127128
max_rows=50,
128129
name="name",
129130
publish=True,
131+
query_balance=100,
130132
sample_questions=["你好!今天中午有什么适合我的午餐?"],
131133
webhooks=["string"],
132134
welcome_message="欢迎使用AskTable",
@@ -302,6 +304,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
302304
magic_input="magic_input",
303305
max_rows=50,
304306
publish=True,
307+
query_balance=100,
305308
sample_questions=["你好!今天中午有什么适合我的午餐?"],
306309
webhooks=["string"],
307310
welcome_message="欢迎使用AskTable",
@@ -392,6 +395,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable)
392395
max_rows=50,
393396
name="name",
394397
publish=True,
398+
query_balance=100,
395399
sample_questions=["你好!今天中午有什么适合我的午餐?"],
396400
webhooks=["string"],
397401
welcome_message="欢迎使用AskTable",

0 commit comments

Comments
 (0)