aether-llm 0.9.13

Multi-provider LLM abstraction layer for the Aether AI agent framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Result;
use crate::providers::http::{SseData, open_sse, responses_code};
use crate::providers::response_stream::OpenedStream;
use reqwest::header::ACCEPT;
use reqwest::{Client, header::HeaderMap};

pub(crate) async fn send(
    http: &Client,
    url: &str,
    headers: HeaderMap,
    body: serde_json::Value,
) -> Result<OpenedStream<SseData>> {
    open_sse(http.post(url).headers(headers).header(ACCEPT, "text/event-stream").json(&body), responses_code).await
}