Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 96
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-1362c05de3e337a1faaaca4272f9b49578a55958f36132e3ca1f4500ecc18221.yml
openapi_spec_hash: 736ffbb33ae592972c2eb93b597f36f5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-5f188889fe648ea83d57911900fe61825d9d7d1446fce966ffca7a9bbe2e3079.yml
openapi_spec_hash: 42af219a138819686969b60410be0cb6
config_hash: 575ddfb316392e5f7f3c7b7999796a03
16 changes: 16 additions & 0 deletions src/asktable/resources/bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def create(
magic_input: Optional[str] | NotGiven = NOT_GIVEN,
max_rows: int | NotGiven = NOT_GIVEN,
publish: bool | NotGiven = NOT_GIVEN,
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
webhooks: List[str] | NotGiven = NOT_GIVEN,
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -88,6 +89,8 @@ def create(

publish: 是否公开

query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数

sample_questions: 示例问题列表

webhooks: Webhook URL 列表
Expand All @@ -114,6 +117,7 @@ def create(
"magic_input": magic_input,
"max_rows": max_rows,
"publish": publish,
"query_balance": query_balance,
"sample_questions": sample_questions,
"webhooks": webhooks,
"welcome_message": welcome_message,
Expand Down Expand Up @@ -172,6 +176,7 @@ def update(
max_rows: Optional[int] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
publish: Optional[bool] | NotGiven = NOT_GIVEN,
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
webhooks: Optional[List[str]] | NotGiven = NOT_GIVEN,
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -204,6 +209,8 @@ def update(

publish: 是否公开

query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数

sample_questions: 示例问题列表

webhooks: Webhook URL 列表
Expand Down Expand Up @@ -233,6 +240,7 @@ def update(
"max_rows": max_rows,
"name": name,
"publish": publish,
"query_balance": query_balance,
"sample_questions": sample_questions,
"webhooks": webhooks,
"welcome_message": welcome_message,
Expand Down Expand Up @@ -403,6 +411,7 @@ async def create(
magic_input: Optional[str] | NotGiven = NOT_GIVEN,
max_rows: int | NotGiven = NOT_GIVEN,
publish: bool | NotGiven = NOT_GIVEN,
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
webhooks: List[str] | NotGiven = NOT_GIVEN,
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -433,6 +442,8 @@ async def create(

publish: 是否公开

query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数

sample_questions: 示例问题列表

webhooks: Webhook URL 列表
Expand All @@ -459,6 +470,7 @@ async def create(
"magic_input": magic_input,
"max_rows": max_rows,
"publish": publish,
"query_balance": query_balance,
"sample_questions": sample_questions,
"webhooks": webhooks,
"welcome_message": welcome_message,
Expand Down Expand Up @@ -517,6 +529,7 @@ async def update(
max_rows: Optional[int] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
publish: Optional[bool] | NotGiven = NOT_GIVEN,
query_balance: Optional[int] | NotGiven = NOT_GIVEN,
sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN,
webhooks: Optional[List[str]] | NotGiven = NOT_GIVEN,
welcome_message: Optional[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -549,6 +562,8 @@ async def update(

publish: 是否公开

query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数

sample_questions: 示例问题列表

webhooks: Webhook URL 列表
Expand Down Expand Up @@ -578,6 +593,7 @@ async def update(
"max_rows": max_rows,
"name": name,
"publish": publish,
"query_balance": query_balance,
"sample_questions": sample_questions,
"webhooks": webhooks,
"welcome_message": welcome_message,
Expand Down
3 changes: 3 additions & 0 deletions src/asktable/types/bot_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class BotCreateParams(TypedDict, total=False):
publish: bool
"""是否公开"""

query_balance: Optional[int]
"""bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数"""

sample_questions: Optional[List[str]]
"""示例问题列表"""

Expand Down
3 changes: 3 additions & 0 deletions src/asktable/types/bot_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class BotUpdateParams(TypedDict, total=False):
publish: Optional[bool]
"""是否公开"""

query_balance: Optional[int]
"""bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数"""

sample_questions: Optional[List[str]]
"""示例问题列表"""

Expand Down
3 changes: 3 additions & 0 deletions src/asktable/types/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class Chatbot(BaseModel):
publish: Optional[bool] = None
"""是否公开"""

query_balance: Optional[int] = None
"""bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 1 的整数"""

sample_questions: Optional[List[str]] = None
"""示例问题列表"""

Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
magic_input="magic_input",
max_rows=50,
publish=True,
query_balance=100,
sample_questions=["你好!今天中午有什么适合我的午餐?"],
webhooks=["string"],
welcome_message="欢迎使用AskTable",
Expand Down Expand Up @@ -127,6 +128,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None:
max_rows=50,
name="name",
publish=True,
query_balance=100,
sample_questions=["你好!今天中午有什么适合我的午餐?"],
webhooks=["string"],
welcome_message="欢迎使用AskTable",
Expand Down Expand Up @@ -302,6 +304,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
magic_input="magic_input",
max_rows=50,
publish=True,
query_balance=100,
sample_questions=["你好!今天中午有什么适合我的午餐?"],
webhooks=["string"],
welcome_message="欢迎使用AskTable",
Expand Down Expand Up @@ -392,6 +395,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable)
max_rows=50,
name="name",
publish=True,
query_balance=100,
sample_questions=["你好!今天中午有什么适合我的午餐?"],
webhooks=["string"],
welcome_message="欢迎使用AskTable",
Expand Down