mutil-ai 0.7.0

A beginner-friendly, provider-neutral Rust AI SDK with a strict normalization layer.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![cfg(feature = "blocking")]

use mutil_ai::{BlockingAdapter, Error, OpenAIChat};

#[test]
fn blocking_adapter_rejects_async_context() {
    let runtime = tokio::runtime::Runtime::new().unwrap();
    runtime.block_on(async {
        let error = BlockingAdapter::new(OpenAIChat::new("blocking-test"))
            .err()
            .unwrap();
        assert!(matches!(error, Error::InvalidRequest(message) if message.contains("async")));
    });
}