(
&self,
request: &MessageRequest,
)
| 215 | } |
| 216 | |
| 217 | pub async fn stream_message( |
| 218 | &self, |
| 219 | request: &MessageRequest, |
| 220 | ) -> Result<MessageStream, ApiError> { |
| 221 | let response = self |
| 222 | .send_with_retry(&request.clone().with_streaming()) |
| 223 | .await?; |
| 224 | Ok(MessageStream { |
| 225 | request_id: request_id_from_headers(response.headers()), |
| 226 | response, |
| 227 | parser: SseParser::new(), |
| 228 | pending: VecDeque::new(), |
| 229 | done: false, |
| 230 | }) |
| 231 | } |
| 232 | |
| 233 | pub async fn exchange_oauth_code( |
| 234 | &self, |