|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
| 5 | +import typing_extensions |
5 | 6 | from typing import Iterable, Optional |
6 | 7 |
|
7 | 8 | import httpx |
@@ -43,6 +44,7 @@ def with_streaming_response(self) -> ChatResourceWithStreamingResponse: |
43 | 44 | """ |
44 | 45 | return ChatResourceWithStreamingResponse(self) |
45 | 46 |
|
| 47 | + @typing_extensions.deprecated("deprecated") |
46 | 48 | def send_message( |
47 | 49 | self, |
48 | 50 | agent_id: str, |
@@ -113,6 +115,7 @@ def with_streaming_response(self) -> AsyncChatResourceWithStreamingResponse: |
113 | 115 | """ |
114 | 116 | return AsyncChatResourceWithStreamingResponse(self) |
115 | 117 |
|
| 118 | + @typing_extensions.deprecated("deprecated") |
116 | 119 | async def send_message( |
117 | 120 | self, |
118 | 121 | agent_id: str, |
@@ -167,33 +170,41 @@ class ChatResourceWithRawResponse: |
167 | 170 | def __init__(self, chat: ChatResource) -> None: |
168 | 171 | self._chat = chat |
169 | 172 |
|
170 | | - self.send_message = to_raw_response_wrapper( |
171 | | - chat.send_message, |
| 173 | + self.send_message = ( # pyright: ignore[reportDeprecated] |
| 174 | + to_raw_response_wrapper( |
| 175 | + chat.send_message, # pyright: ignore[reportDeprecated], |
| 176 | + ) |
172 | 177 | ) |
173 | 178 |
|
174 | 179 |
|
175 | 180 | class AsyncChatResourceWithRawResponse: |
176 | 181 | def __init__(self, chat: AsyncChatResource) -> None: |
177 | 182 | self._chat = chat |
178 | 183 |
|
179 | | - self.send_message = async_to_raw_response_wrapper( |
180 | | - chat.send_message, |
| 184 | + self.send_message = ( # pyright: ignore[reportDeprecated] |
| 185 | + async_to_raw_response_wrapper( |
| 186 | + chat.send_message, # pyright: ignore[reportDeprecated], |
| 187 | + ) |
181 | 188 | ) |
182 | 189 |
|
183 | 190 |
|
184 | 191 | class ChatResourceWithStreamingResponse: |
185 | 192 | def __init__(self, chat: ChatResource) -> None: |
186 | 193 | self._chat = chat |
187 | 194 |
|
188 | | - self.send_message = to_streamed_response_wrapper( |
189 | | - chat.send_message, |
| 195 | + self.send_message = ( # pyright: ignore[reportDeprecated] |
| 196 | + to_streamed_response_wrapper( |
| 197 | + chat.send_message, # pyright: ignore[reportDeprecated], |
| 198 | + ) |
190 | 199 | ) |
191 | 200 |
|
192 | 201 |
|
193 | 202 | class AsyncChatResourceWithStreamingResponse: |
194 | 203 | def __init__(self, chat: AsyncChatResource) -> None: |
195 | 204 | self._chat = chat |
196 | 205 |
|
197 | | - self.send_message = async_to_streamed_response_wrapper( |
198 | | - chat.send_message, |
| 206 | + self.send_message = ( # pyright: ignore[reportDeprecated] |
| 207 | + async_to_streamed_response_wrapper( |
| 208 | + chat.send_message, # pyright: ignore[reportDeprecated], |
| 209 | + ) |
199 | 210 | ) |
0 commit comments