|
7 | 7 | //! - Returns final JSON response |
8 | 8 |
|
9 | 9 | use async_trait::async_trait; |
10 | | -use axum::{http::StatusCode, response::{IntoResponse, Response}, Json}; |
| 10 | +use axum::{ |
| 11 | + http::StatusCode, |
| 12 | + response::{IntoResponse, Response}, |
| 13 | + Json, |
| 14 | +}; |
11 | 15 | use tracing::warn; |
12 | 16 |
|
13 | 17 | use super::PipelineStage; |
@@ -37,7 +41,9 @@ impl PipelineStage for PersistenceStage { |
37 | 41 | RequestType::Responses(req) => req, |
38 | 42 | RequestType::Chat(_) => { |
39 | 43 | // For chat requests, just return the JSON response |
40 | | - return Ok(Some((StatusCode::OK, Json(processed.json_response)).into_response())); |
| 44 | + return Ok(Some( |
| 45 | + (StatusCode::OK, Json(processed.json_response)).into_response(), |
| 46 | + )); |
41 | 47 | } |
42 | 48 | }; |
43 | 49 |
|
@@ -100,9 +106,7 @@ mod tests { |
100 | 106 | chat::{ChatCompletionRequest, ChatMessage, MessageContent}, |
101 | 107 | responses::{ResponseInput, ResponsesRequest}, |
102 | 108 | }, |
103 | | - routers::openai::context::{ |
104 | | - ProcessedResponse, RequestInput, SharedComponents, |
105 | | - }, |
| 109 | + routers::openai::context::{ProcessedResponse, RequestInput, SharedComponents}, |
106 | 110 | }; |
107 | 111 |
|
108 | 112 | async fn create_test_components(worker_urls: Vec<String>) -> Arc<SharedComponents> { |
|
0 commit comments