#![allow(unused_imports)]
use axum::{
Json, Router, extract,
routing::{delete, get, post},
};
use openai::schemas::{CreateResponse, Error, Response, ResponseItemList, ResponseStreamEvent};
pub fn routes() -> Router {
Router::new()
.route("/", post(create))
.route("/{response_id}", get(get_))
.route("/{response_id}", delete(delete_))
.route("/{response_id}/input_items", get(input_items))
}
#[axum::debug_handler]
async fn create(extract::Json(_): extract::Json<CreateResponse>) -> Json<Response> {
todo!()
}
#[axum::debug_handler]
async fn get_(extract::Path(_): extract::Path<String>) -> Json<Response> {
todo!()
}
#[axum::debug_handler]
async fn delete_(extract::Path(_): extract::Path<String>) -> Json<Error> {
Json(Error::default()) }
#[axum::debug_handler]
async fn input_items(extract::Path(_): extract::Path<String>) -> Json<ResponseItemList> {
Json(ResponseItemList {
object: "list".into(),
data: vec![], first_id: "".into(),
last_id: "".into(),
has_more: false,
})
}