You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:param metadata: The assistant metadata. It can store up to 16 key-value pairs where each key's length is less than 64 and value's length is less than 512.
:param metadata: The assistant metadata. It can store up to 16 key-value pairs where each key's length is less than 64 and value's length is less than 512.
:param metadata: The chat metadata. It can store up to 16 key-value pairs where each key's length is less than 64 and value's length is less than 512.
78
-
:return: The assistant object.
79
+
:return: The created chat object.
79
80
"""
80
81
81
82
api_instance=get_assistant_api_instance()
@@ -93,15 +94,15 @@ def create_chat(
93
94
defupdate_chat(
94
95
assistant_id: str,
95
96
chat_id: str,
96
-
metadata: Dict,
97
+
metadata: Dict[str, str],
97
98
) ->Chat:
98
99
"""
99
100
Update a chat.
100
101
101
102
:param assistant_id: The ID of the assistant.
102
103
:param chat_id: The ID of the chat.
103
104
:param metadata: The assistant metadata. It can store up to 16 key-value pairs where each key's length is less than 64 and value's length is less than 512.
:param order: The order of the messages. It can be "asc" or "desc".
30
33
:param limit: The maximum number of messages to return.
31
34
:param after: The cursor to get the next page of messages.
@@ -78,7 +81,7 @@ def create_user_message(
78
81
assistant_id: str,
79
82
chat_id: str,
80
83
text: str,
81
-
metadata: Optional[Dict] =None,
84
+
metadata: Optional[Dict[str, str]] =None,
82
85
) ->Message:
83
86
"""
84
87
Create a message.
@@ -87,7 +90,7 @@ def create_user_message(
87
90
:param chat_id: The ID of the chat.
88
91
:param text: The text content of the message.
89
92
:param metadata: The message metadata. It can store up to 16 key-value pairs where each key's length is less than 64 and value's length is less than 512.
90
-
:return: The assistant object.
93
+
:return: The created message object.
91
94
"""
92
95
93
96
api_instance=get_assistant_api_instance()
@@ -108,15 +111,15 @@ def create_user_message(
108
111
defupdate_message(
109
112
assistant_id: str,
110
113
message_id: str,
111
-
metadata: Dict,
114
+
metadata: Dict[str, str],
112
115
) ->Message:
113
116
"""
114
117
Update a message.
115
118
116
119
:param assistant_id: The ID of the assistant.
117
120
:param message_id: The ID of the message.
118
121
:param metadata: The assistant metadata. It can store up to 16 key-value pairs where each key's length is less than 64 and value's length is less than 512.
:param metadata: The message metadata. It can store up to 16 key-value pairs where each key's length is less than 64 and value's length is less than 512.
0 commit comments