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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Official Floopy AI Gateway SDK for Rust.
//!
//! `floopy-sdk` wraps the official [`async_openai`] crate and points it at
//! the Floopy gateway, so `chat`/`embeddings`/`models` stay a 1:1 drop-in
//! replacement, and adds typed Floopy-only resources (feedback, decisions,
//! experiments, constraints, decision export, evaluations, routing dry-run,
//! sessions) on top. It mirrors the Node, Python and Go SDKs so behaviour
//! stays in lockstep across languages.
//!
//! ```no_run
//! use floopy::Floopy;
//! use async_openai::types::chat::{
//! ChatCompletionRequestUserMessageArgs, CreateChatCompletionRequestArgs,
//! };
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let client = Floopy::new(std::env::var("FLOOPY_API_KEY")?)?;
//!
//! let request = CreateChatCompletionRequestArgs::default()
//! .model("gpt-4o")
//! .messages(vec![ChatCompletionRequestUserMessageArgs::default()
//! .content("Hello from Floopy!")
//! .build()?
//! .into()])
//! .build()?;
//!
//! let response = client.openai().chat().create(request).await?;
//! println!("{:?}", response.choices[0].message.content);
//! # Ok(())
//! # }
//! ```
//!
//! Every Floopy-only call returns [`Result<T, Error>`](Error). Errors from
//! the OpenAI-compatible surface come from [`async_openai`] instead.
pub use ;
pub use ;
pub use ;
pub use ;
// Re-export the wrapped OpenAI crate so consumers can build chat/embedding
// requests without a separate `async-openai` dependency declaration.
pub use async_openai;