20 lines
522 B
Rust
20 lines
522 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct OpenAiTranscriptionConfig {
|
|
pub endpoint: String,
|
|
pub model: String,
|
|
pub language: Option<String>,
|
|
}
|
|
|
|
impl Default for OpenAiTranscriptionConfig {
|
|
fn default() -> Self {
|
|
Self {
|
|
endpoint: "https://api.openai.com/v1/audio/transcriptions".to_string(),
|
|
model: "whisper-1".to_string(),
|
|
language: None,
|
|
}
|
|
}
|
|
}
|