chat-rs 0.0.4

Build LLM clients with ease, attach them to your tools
Documentation
1
2
3
4
5
pub fn detect_mimetype(bytes: &[u8]) -> String {
    infer::get(bytes)
        .map(|kind| kind.mime_type().to_string())
        .unwrap_or_else(|| "application/octet-stream".to_string())
}