diff --git a/.stats.yml b/.stats.yml index 1c1af62e..17ea7ce7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/src/asktable/resources/bots.py b/src/asktable/resources/bots.py index b803683c..1cfc9725 100644 --- a/src/asktable/resources/bots.py +++ b/src/asktable/resources/bots.py @@ -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, @@ -88,6 +89,8 @@ def create( publish: 是否公开 + query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数 + sample_questions: 示例问题列表 webhooks: Webhook URL 列表 @@ -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, @@ -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, @@ -204,6 +209,8 @@ def update( publish: 是否公开 + query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数 + sample_questions: 示例问题列表 webhooks: Webhook URL 列表 @@ -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, @@ -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, @@ -433,6 +442,8 @@ async def create( publish: 是否公开 + query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数 + sample_questions: 示例问题列表 webhooks: Webhook URL 列表 @@ -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, @@ -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, @@ -549,6 +562,8 @@ async def update( publish: 是否公开 + query_balance: bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数 + sample_questions: 示例问题列表 webhooks: Webhook URL 列表 @@ -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, diff --git a/src/asktable/types/bot_create_params.py b/src/asktable/types/bot_create_params.py index 6454305c..7e0ada9e 100644 --- a/src/asktable/types/bot_create_params.py +++ b/src/asktable/types/bot_create_params.py @@ -33,6 +33,9 @@ class BotCreateParams(TypedDict, total=False): publish: bool """是否公开""" + query_balance: Optional[int] + """bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数""" + sample_questions: Optional[List[str]] """示例问题列表""" diff --git a/src/asktable/types/bot_update_params.py b/src/asktable/types/bot_update_params.py index fc4d2073..e5946079 100644 --- a/src/asktable/types/bot_update_params.py +++ b/src/asktable/types/bot_update_params.py @@ -36,6 +36,9 @@ class BotUpdateParams(TypedDict, total=False): publish: Optional[bool] """是否公开""" + query_balance: Optional[int] + """bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 0 的整数""" + sample_questions: Optional[List[str]] """示例问题列表""" diff --git a/src/asktable/types/chatbot.py b/src/asktable/types/chatbot.py index 63782dae..5f86403e 100644 --- a/src/asktable/types/chatbot.py +++ b/src/asktable/types/chatbot.py @@ -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 """示例问题列表""" diff --git a/tests/api_resources/test_bots.py b/tests/api_resources/test_bots.py index afd2b6ab..787b84d8 100644 --- a/tests/api_resources/test_bots.py +++ b/tests/api_resources/test_bots.py @@ -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", @@ -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", @@ -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", @@ -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",