safi 0.1.0

Safi API Client for consuming chat, transcription, and translation APIs.
Documentation
  • Coverage
  • 0%
    0 out of 7 items documented0 out of 3 items with examples
  • Size
  • Source code size: 36.26 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.95 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m Average build duration of successful builds.
  • all releases: 1m Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • muayyat

The API is easy to use:

use safi_api_client::{chat::chat, transcription::transcribe, translation::translate}; use tokio;

#[tokio::main] async fn main() { let api_key = "your-api-key";

// Example usage of chat API
match chat("Hello, Safi!", api_key).await {
    Ok(response) => println!("Chat response: {}", response),
    Err(e) => eprintln!("Error: {}", e),
}

// Example usage of transcription API
match transcribe("https://safi.insolify.com/audio.mp3", api_key).await {
    Ok(response) => println!("Transcription: {}", response),
    Err(e) => eprintln!("Error: {}", e),
}

// Example usage of translation API
match translate("How far bro", "pidgin", api_key).await {
    Ok(response) => println!("Translation: {}", response),
    Err(e) => eprintln!("Error: {}", e),
}

}