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-b9ad19bf46b9a414b4ff6438ad9ffa5c53c7fada3e16c499d80781588de65487.yml
openapi_spec_hash: 62e3136712b5e1451cc1aabd1b3aa7fa
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-512767dff0175da9132c01730e3f35cac9f21977a1247ea5c9dd8f42748f3acc.yml
openapi_spec_hash: b9bcb2feb162291377970459d2c0dfe7
config_hash: 575ddfb316392e5f7f3c7b7999796a03
4 changes: 2 additions & 2 deletions src/asktable/resources/chats/chats.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def create(
name: Optional[str] | NotGiven = NOT_GIVEN,
role_id: Optional[str] | NotGiven = NOT_GIVEN,
role_variables: Optional[Dict[str, Union[str, int, bool]]] | NotGiven = NOT_GIVEN,
user_profile: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
user_profile: Optional[Dict[str, Union[str, int, bool]]] | 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.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -263,7 +263,7 @@ async def create(
name: Optional[str] | NotGiven = NOT_GIVEN,
role_id: Optional[str] | NotGiven = NOT_GIVEN,
role_variables: Optional[Dict[str, Union[str, int, bool]]] | NotGiven = NOT_GIVEN,
user_profile: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
user_profile: Optional[Dict[str, Union[str, int, bool]]] | 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.
extra_headers: Headers | None = None,
Expand Down
2 changes: 1 addition & 1 deletion src/asktable/types/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ class Chat(BaseModel):
role_variables: Optional[Dict[str, Union[str, int, bool]]] = None
"""在扮演这个角色时需要传递的变量值,用 Key-Value 形式传递"""

user_profile: Optional[Dict[str, str]] = None
user_profile: Optional[Dict[str, Union[str, int, bool]]] = None
"""用户信息,用于在对话中传递用户的信息,用 Key-Value 形式传递"""
2 changes: 1 addition & 1 deletion src/asktable/types/chat_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ class ChatCreateParams(TypedDict, total=False):
role_variables: Optional[Dict[str, Union[str, int, bool]]]
"""在扮演这个角色时需要传递的变量值,用 Key-Value 形式传递"""

user_profile: Optional[Dict[str, str]]
user_profile: Optional[Dict[str, Union[str, int, bool]]]
"""用户信息,用于在对话中传递用户的信息,用 Key-Value 形式传递"""
2 changes: 1 addition & 1 deletion src/asktable/types/chat_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ChatRetrieveResponse(BaseModel):

sample_questions: Optional[List[str]] = None

user_profile: Optional[Dict[str, str]] = None
user_profile: Optional[Dict[str, Union[str, int, bool]]] = None
"""用户信息,用于在对话中传递用户的信息,用 Key-Value 形式传递"""

welcome_message: Optional[str] = None
8 changes: 4 additions & 4 deletions tests/api_resources/test_chats.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
role_id="role_42",
role_variables={"id": "123123123"},
user_profile={
"age": "string",
"is_male": "string",
"age": 18,
"is_male": True,
"name": "张三",
},
)
Expand Down Expand Up @@ -184,8 +184,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
role_id="role_42",
role_variables={"id": "123123123"},
user_profile={
"age": "string",
"is_male": "string",
"age": 18,
"is_male": True,
"name": "张三",
},
)
Expand Down