zai-rs 0.5.1

一个 Rust SDK, 用于调用 智谱AI API
Documentation
1
2
3
4
5
6
7
8
9
10
use zai_rs::client::ZaiClient;
use zai_rs::knowledge::KnowledgeCapacityRequest;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = ZaiClient::from_env()?;
    let resp = KnowledgeCapacityRequest::new().send_via(&client).await?;
    println!("{resp:#?}");
    Ok(())
}