Skip to content

Commit 896b130

Browse files
feat(api): api update (#15)
1 parent 3571e95 commit 896b130

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
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: 68
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-f8d4f4ee9ccccf65054df0c205156f6022a8d207441b1494fa56bd950b44593b.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-5a9109fc8f9582302303552d39c74bc3af915eef21cb43843469b45d1cf9c66d.yml

src/asktable/resources/bots.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +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-
sample_questions: Optional[str] | NotGiven = NOT_GIVEN,
61+
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
6262
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
6363
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6464
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -168,7 +168,7 @@ def update(
168168
max_rows: Optional[int] | NotGiven = NOT_GIVEN,
169169
name: Optional[str] | NotGiven = NOT_GIVEN,
170170
publish: Optional[bool] | NotGiven = NOT_GIVEN,
171-
sample_questions: Optional[str] | NotGiven = NOT_GIVEN,
171+
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
172172
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
173173
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
174174
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -390,7 +390,7 @@ async def create(
390390
magic_input: Optional[str] | NotGiven = NOT_GIVEN,
391391
max_rows: int | NotGiven = NOT_GIVEN,
392392
publish: bool | NotGiven = NOT_GIVEN,
393-
sample_questions: Optional[str] | NotGiven = NOT_GIVEN,
393+
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
394394
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
395395
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
396396
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -500,7 +500,7 @@ async def update(
500500
max_rows: Optional[int] | NotGiven = NOT_GIVEN,
501501
name: Optional[str] | NotGiven = NOT_GIVEN,
502502
publish: Optional[bool] | NotGiven = NOT_GIVEN,
503-
sample_questions: Optional[str] | NotGiven = NOT_GIVEN,
503+
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
504504
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
505505
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
506506
# The extra values given here take precedence over values defined on the client or passed to this method.

src/asktable/types/bot_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BotCreateParams(TypedDict, total=False):
3333
publish: bool
3434
"""是否公开"""
3535

36-
sample_questions: Optional[str]
36+
sample_questions: Optional[List[str]]
3737
"""示例问题列表"""
3838

3939
welcome_message: Optional[str]

src/asktable/types/bot_update_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BotUpdateParams(TypedDict, total=False):
3636
publish: Optional[bool]
3737
"""是否公开"""
3838

39-
sample_questions: Optional[str]
39+
sample_questions: Optional[List[str]]
4040
"""示例问题列表"""
4141

4242
welcome_message: Optional[str]

src/asktable/types/chat_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ChatBot(BaseModel):
4444
publish: Optional[bool] = None
4545
"""是否公开"""
4646

47-
sample_questions: Optional[str] = None
47+
sample_questions: Optional[List[str]] = None
4848
"""示例问题列表"""
4949

5050
welcome_message: Optional[str] = None

tests/api_resources/test_bots.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
3939
magic_input="magic_input",
4040
max_rows=50,
4141
publish=True,
42-
sample_questions="你好!今天中午有什么适合我的午餐?",
42+
sample_questions=["你好!今天中午有什么适合我的午餐?"],
4343
welcome_message="欢迎使用AskTable",
4444
)
4545
assert_matches_type(ChatBot, bot, path=["response"])
@@ -128,7 +128,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None:
128128
max_rows=50,
129129
name="name",
130130
publish=True,
131-
sample_questions="你好!今天中午有什么适合我的午餐?",
131+
sample_questions=["你好!今天中午有什么适合我的午餐?"],
132132
welcome_message="欢迎使用AskTable",
133133
)
134134
assert_matches_type(ChatBot, bot, path=["response"])
@@ -301,7 +301,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
301301
magic_input="magic_input",
302302
max_rows=50,
303303
publish=True,
304-
sample_questions="你好!今天中午有什么适合我的午餐?",
304+
sample_questions=["你好!今天中午有什么适合我的午餐?"],
305305
welcome_message="欢迎使用AskTable",
306306
)
307307
assert_matches_type(ChatBot, bot, path=["response"])
@@ -390,7 +390,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable)
390390
max_rows=50,
391391
name="name",
392392
publish=True,
393-
sample_questions="你好!今天中午有什么适合我的午餐?",
393+
sample_questions=["你好!今天中午有什么适合我的午餐?"],
394394
welcome_message="欢迎使用AskTable",
395395
)
396396
assert_matches_type(ChatBot, bot, path=["response"])

0 commit comments

Comments
 (0)