[router] responses api POST and GET with local storage (#10581)
Co-authored-by: key4ng <rukeyang@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@ use std::fmt::Debug;
|
||||
|
||||
use crate::protocols::spec::{
|
||||
ChatCompletionRequest, CompletionRequest, EmbeddingRequest, GenerateRequest, RerankRequest,
|
||||
ResponsesRequest,
|
||||
ResponsesGetParams, ResponsesRequest,
|
||||
};
|
||||
|
||||
pub mod factory;
|
||||
@@ -82,7 +82,12 @@ pub trait RouterTrait: Send + Sync + Debug {
|
||||
) -> Response;
|
||||
|
||||
/// Retrieve a stored/background response by id
|
||||
async fn get_response(&self, headers: Option<&HeaderMap>, response_id: &str) -> Response;
|
||||
async fn get_response(
|
||||
&self,
|
||||
headers: Option<&HeaderMap>,
|
||||
response_id: &str,
|
||||
params: &ResponsesGetParams,
|
||||
) -> Response;
|
||||
|
||||
/// Cancel a background response by id
|
||||
async fn cancel_response(&self, headers: Option<&HeaderMap>, response_id: &str) -> Response;
|
||||
|
||||
Reference in New Issue
Block a user