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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions src/asktable/resources/bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -89,6 +90,8 @@ def create(

sample_questions: 示例问题列表

webhooks: Webhook URL 列表

welcome_message: 欢迎消息

extra_headers: Send extra headers
Expand All @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -201,6 +206,8 @@ def update(

sample_questions: 示例问题列表

webhooks: Webhook URL 列表

welcome_message: 欢迎消息

extra_headers: Send extra headers
Expand All @@ -227,6 +234,7 @@ def update(
"name": name,
"publish": publish,
"sample_questions": sample_questions,
"webhooks": webhooks,
"welcome_message": welcome_message,
},
bot_update_params.BotUpdateParams,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -422,6 +431,8 @@ async def create(

sample_questions: 示例问题列表

webhooks: Webhook URL 列表

welcome_message: 欢迎消息

extra_headers: Send extra headers
Expand All @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -534,6 +547,8 @@ async def update(

sample_questions: 示例问题列表

webhooks: Webhook URL 列表

welcome_message: 欢迎消息

extra_headers: Send extra headers
Expand All @@ -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,
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 @@ -36,5 +36,8 @@ class BotCreateParams(TypedDict, total=False):
sample_questions: Optional[List[str]]
"""示例问题列表"""

webhooks: List[str]
"""Webhook URL 列表"""

welcome_message: Optional[str]
"""欢迎消息"""
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 @@ -39,5 +39,8 @@ class BotUpdateParams(TypedDict, total=False):
sample_questions: Optional[List[str]]
"""示例问题列表"""

webhooks: Optional[List[str]]
"""Webhook URL 列表"""

welcome_message: Optional[str]
"""欢迎消息"""
2 changes: 2 additions & 0 deletions src/asktable/types/chat_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 形式传递"""

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 @@ -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
"""欢迎消息"""
4 changes: 4 additions & 0 deletions tests/api_resources/test_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -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"])
Expand Down