1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! # llmrix-rust-sdk
//!
//! Official Rust SDK for the [llmrix AI Agent Platform](https://github.com/llmrix/llmrix-rust-sdk).
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use llmrix_rust_sdk::{LlmrixClient, model::ConversationCreateRequest, streaming::event::StreamEvent};
//!
//! #[tokio::main]
//! async fn main() -> llmrix_rust_sdk::error::Result<()> {
//! let client = LlmrixClient::builder()
//! .base_url("http://localhost:8899")
//! .api_key("sk-xxx")
//! .build()?;
//!
//! let conv = client.conversations()
//! .create(ConversationCreateRequest { title: "Demo".into(), agent_id: None })
//! .await?;
//!
//! client.chat(&conv.id).send("Hello, Llmrix!", |event| {
//! if let StreamEvent::MessageChunk(e) = event {
//! print!("{}", e.content);
//! }
//! Ok(())
//! }).await?;
//!
//! Ok(())
//! }
//! ```
pub use ;
pub use ;