#![allow(unused_imports)]
use axum::{Json, Router, extract, routing::post};
use openai::schemas::{
CreateSpeechRequest, CreateTranscriptionRequest, CreateTranscriptionResponseJson,
CreateTranslationRequest, CreateTranslationResponseJson,
};
pub fn routes() -> Router {
Router::new()
.route("/speech", post(create_speech))
.route("/transcriptions", post(create_transcription))
.route("/translations", post(create_translation))
}
#[axum::debug_handler]
async fn create_speech(extract::Json(_): extract::Json<CreateSpeechRequest>) -> Vec<u8> {
Vec::new() }
#[axum::debug_handler]
async fn create_transcription(
extract::Json(_): extract::Json<CreateTranscriptionRequest>,
) -> Json<CreateTranscriptionResponseJson> {
Json(CreateTranscriptionResponseJson {
text: String::new(), logprobs: None,
})
}
#[axum::debug_handler]
async fn create_translation(
extract::Json(_): extract::Json<CreateTranslationRequest>,
) -> Json<CreateTranslationResponseJson> {
Json(CreateTranslationResponseJson::default()) }