diff --git a/src/main.rs b/src/main.rs index e7a11a9..6712f98 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,18 @@ +use elevenlabs_rs::elevenlabs_api::ElevenLabsAPI; +use openai_rs::context::Context; + +fn get_file(name: &str) -> anyhow::Result { + Ok(std::fs::read_to_string(std::path::Path::new(name))?.trim().to_string()) +} + +fn get_openai() -> anyhow::Result { + Ok(Context::new(get_file("openai.key")?)) +} + +fn get_elevenlabs() -> anyhow::Result { + Ok(ElevenLabsAPI::new(get_file("elevenlabs.key")?)) +} + fn main() { println!("Hello, world!"); }