diff --git a/.stats.yml b/.stats.yml index b3564fbc..b16356ee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 96 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-10d44714ee3dc6026ddd16d5f97af6c5f5807d40d0333deb20cb458d2b79047a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-a4c91d7713c87ff56f393709ecda79c31ce7ceee1507b9421fb92da28489a073.yml diff --git a/src/asktable/resources/bots.py b/src/asktable/resources/bots.py index 6ce7781e..40985b20 100644 --- a/src/asktable/resources/bots.py +++ b/src/asktable/resources/bots.py @@ -59,6 +59,7 @@ def create( max_rows: int | NotGiven = NOT_GIVEN, publish: bool | NotGiven = NOT_GIVEN, sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN, + webhooks: List[str] | NotGiven = NOT_GIVEN, welcome_message: Optional[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -89,6 +90,8 @@ def create( sample_questions: 示例问题列表 + webhooks: Webhook URL 列表 + welcome_message: 欢迎消息 extra_headers: Send extra headers @@ -112,6 +115,7 @@ def create( "max_rows": max_rows, "publish": publish, "sample_questions": sample_questions, + "webhooks": webhooks, "welcome_message": welcome_message, }, bot_create_params.BotCreateParams, @@ -169,6 +173,7 @@ def update( name: Optional[str] | NotGiven = NOT_GIVEN, publish: Optional[bool] | 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, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -201,6 +206,8 @@ def update( sample_questions: 示例问题列表 + webhooks: Webhook URL 列表 + welcome_message: 欢迎消息 extra_headers: Send extra headers @@ -227,6 +234,7 @@ def update( "name": name, "publish": publish, "sample_questions": sample_questions, + "webhooks": webhooks, "welcome_message": welcome_message, }, bot_update_params.BotUpdateParams, @@ -392,6 +400,7 @@ async def create( max_rows: int | NotGiven = NOT_GIVEN, publish: bool | NotGiven = NOT_GIVEN, sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN, + webhooks: List[str] | NotGiven = NOT_GIVEN, welcome_message: Optional[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -422,6 +431,8 @@ async def create( sample_questions: 示例问题列表 + webhooks: Webhook URL 列表 + welcome_message: 欢迎消息 extra_headers: Send extra headers @@ -445,6 +456,7 @@ async def create( "max_rows": max_rows, "publish": publish, "sample_questions": sample_questions, + "webhooks": webhooks, "welcome_message": welcome_message, }, bot_create_params.BotCreateParams, @@ -502,6 +514,7 @@ async def update( name: Optional[str] | NotGiven = NOT_GIVEN, publish: Optional[bool] | 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, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -534,6 +547,8 @@ async def update( sample_questions: 示例问题列表 + webhooks: Webhook URL 列表 + welcome_message: 欢迎消息 extra_headers: Send extra headers @@ -560,6 +575,7 @@ async def update( "name": name, "publish": publish, "sample_questions": sample_questions, + "webhooks": webhooks, "welcome_message": welcome_message, }, bot_update_params.BotUpdateParams, diff --git a/src/asktable/types/bot_create_params.py b/src/asktable/types/bot_create_params.py index 43088a3f..6454305c 100644 --- a/src/asktable/types/bot_create_params.py +++ b/src/asktable/types/bot_create_params.py @@ -36,5 +36,8 @@ class BotCreateParams(TypedDict, total=False): sample_questions: Optional[List[str]] """示例问题列表""" + webhooks: List[str] + """Webhook URL 列表""" + welcome_message: Optional[str] """欢迎消息""" diff --git a/src/asktable/types/bot_update_params.py b/src/asktable/types/bot_update_params.py index 239c8e71..fc4d2073 100644 --- a/src/asktable/types/bot_update_params.py +++ b/src/asktable/types/bot_update_params.py @@ -39,5 +39,8 @@ class BotUpdateParams(TypedDict, total=False): sample_questions: Optional[List[str]] """示例问题列表""" + webhooks: Optional[List[str]] + """Webhook URL 列表""" + welcome_message: Optional[str] """欢迎消息""" diff --git a/src/asktable/types/chat_retrieve_response.py b/src/asktable/types/chat_retrieve_response.py index 2999466c..3ade0700 100644 --- a/src/asktable/types/chat_retrieve_response.py +++ b/src/asktable/types/chat_retrieve_response.py @@ -45,6 +45,8 @@ class ChatRetrieveResponse(BaseModel): role_variables: Optional[Dict[str, Union[str, int, bool]]] = None """在扮演这个角色时需要传递的变量值,用 Key-Value 形式传递""" + sample_questions: Optional[List[str]] = None + user_profile: Optional[Dict[str, str]] = None """用户信息,用于在对话中传递用户的信息,用 Key-Value 形式传递""" diff --git a/src/asktable/types/chatbot.py b/src/asktable/types/chatbot.py index 616249e5..63782dae 100644 --- a/src/asktable/types/chatbot.py +++ b/src/asktable/types/chatbot.py @@ -47,5 +47,8 @@ class Chatbot(BaseModel): sample_questions: Optional[List[str]] = None """示例问题列表""" + webhooks: Optional[List[str]] = None + """Webhook URL 列表""" + welcome_message: Optional[str] = None """欢迎消息""" diff --git a/tests/api_resources/test_bots.py b/tests/api_resources/test_bots.py index 37748566..50f88b41 100644 --- a/tests/api_resources/test_bots.py +++ b/tests/api_resources/test_bots.py @@ -38,6 +38,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None: max_rows=50, publish=True, sample_questions=["你好!今天中午有什么适合我的午餐?"], + webhooks=["string"], welcome_message="欢迎使用AskTable", ) assert_matches_type(Chatbot, bot, path=["response"]) @@ -127,6 +128,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None: name="name", publish=True, sample_questions=["你好!今天中午有什么适合我的午餐?"], + webhooks=["string"], welcome_message="欢迎使用AskTable", ) assert_matches_type(Chatbot, bot, path=["response"]) @@ -300,6 +302,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable) max_rows=50, publish=True, sample_questions=["你好!今天中午有什么适合我的午餐?"], + webhooks=["string"], welcome_message="欢迎使用AskTable", ) assert_matches_type(Chatbot, bot, path=["response"]) @@ -389,6 +392,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable) name="name", publish=True, sample_questions=["你好!今天中午有什么适合我的午餐?"], + webhooks=["string"], welcome_message="欢迎使用AskTable", ) assert_matches_type(Chatbot, bot, path=["response"])