feat: add transcription backend contracts
This commit is contained in:
1 parent
3b05cb22a0
commit
54e8b42330
9 files changed
+461
No files matched your search
@@ -0,0 +1,19 @@
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user