Skip to content

Commit d6d57bc

Browse files
feat(api): api update (#192)
1 parent 5a0c771 commit d6d57bc

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 96
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-b9ad19bf46b9a414b4ff6438ad9ffa5c53c7fada3e16c499d80781588de65487.yml
3-
openapi_spec_hash: 62e3136712b5e1451cc1aabd1b3aa7fa
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-512767dff0175da9132c01730e3f35cac9f21977a1247ea5c9dd8f42748f3acc.yml
3+
openapi_spec_hash: b9bcb2feb162291377970459d2c0dfe7
44
config_hash: 575ddfb316392e5f7f3c7b7999796a03

src/asktable/resources/chats/chats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def create(
6767
name: Optional[str] | NotGiven = NOT_GIVEN,
6868
role_id: Optional[str] | NotGiven = NOT_GIVEN,
6969
role_variables: Optional[Dict[str, Union[str, int, bool]]] | NotGiven = NOT_GIVEN,
70-
user_profile: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
70+
user_profile: Optional[Dict[str, Union[str, int, bool]]] | NotGiven = NOT_GIVEN,
7171
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7272
# The extra values given here take precedence over values defined on the client or passed to this method.
7373
extra_headers: Headers | None = None,
@@ -263,7 +263,7 @@ async def create(
263263
name: Optional[str] | NotGiven = NOT_GIVEN,
264264
role_id: Optional[str] | NotGiven = NOT_GIVEN,
265265
role_variables: Optional[Dict[str, Union[str, int, bool]]] | NotGiven = NOT_GIVEN,
266-
user_profile: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
266+
user_profile: Optional[Dict[str, Union[str, int, bool]]] | NotGiven = NOT_GIVEN,
267267
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
268268
# The extra values given here take precedence over values defined on the client or passed to this method.
269269
extra_headers: Headers | None = None,

src/asktable/types/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ class Chat(BaseModel):
4343
role_variables: Optional[Dict[str, Union[str, int, bool]]] = None
4444
"""在扮演这个角色时需要传递的变量值,用 Key-Value 形式传递"""
4545

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

src/asktable/types/chat_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ class ChatCreateParams(TypedDict, total=False):
2727
role_variables: Optional[Dict[str, Union[str, int, bool]]]
2828
"""在扮演这个角色时需要传递的变量值,用 Key-Value 形式传递"""
2929

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

src/asktable/types/chat_retrieve_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ChatRetrieveResponse(BaseModel):
4747

4848
sample_questions: Optional[List[str]] = None
4949

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

5353
welcome_message: Optional[str] = None

tests/api_resources/test_chats.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
3131
role_id="role_42",
3232
role_variables={"id": "123123123"},
3333
user_profile={
34-
"age": "string",
35-
"is_male": "string",
34+
"age": 18,
35+
"is_male": True,
3636
"name": "张三",
3737
},
3838
)
@@ -184,8 +184,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
184184
role_id="role_42",
185185
role_variables={"id": "123123123"},
186186
user_profile={
187-
"age": "string",
188-
"is_male": "string",
187+
"age": 18,
188+
"is_male": True,
189189
"name": "张三",
190190
},
191191
)

0 commit comments

Comments
 (0)