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
//! Dify client library.
//!
//! # Examples
//!
//! ```no_run
//! use dify_client::{request, Config, Client};
//! use std::time::Duration;
//!
//! #[tokio::main]
//! async fn main() {
//!     let config = Config {
//!         base_url: "https://api.dify.ai".into(),
//!         api_key: "API_KEY".into(),
//!         timeout: Duration::from_secs(60),
//!     };
//!     let client = Client::new_with_config(config);
//!
//!     // Use the client
//!     let msg = request::ChatMessageRequest {
//!         query: "What are the specs of the iPhone 13 Pro Max?".into(),
//!         user: "afa".into(),
//!         ..Default::default()
//!     };
//!     let result = client.chat_messages(msg).await;
//!     println!("{:?}", result);
//! }
//! ```

pub mod client;
pub mod request;
pub mod response;

pub use client::*;