1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![deny(missing_docs)]
3#![cfg_attr(
4 test,
5 allow(
6 clippy::expect_used,
7 clippy::indexing_slicing,
8 clippy::panic,
9 clippy::unwrap_used,
10 clippy::unreachable
11 )
12)]
13extern crate self as rig;
22
23#[doc(hidden)]
24pub use rig_core as __core;
25
26pub mod agent;
27pub mod completion;
28pub mod extractor;
29pub mod handlers;
30pub mod integrations;
32pub(crate) use rig_core::json_utils;
33pub mod prelude;
34pub mod run;
35pub mod streaming;
36#[cfg(any(test, feature = "test-utils"))]
37#[cfg_attr(docsrs, doc(cfg(feature = "test-utils")))]
38pub mod test_utils;
39pub mod tool;
40
41pub use agent::TypedPromptResponse;
42pub use agent::{
43 Agent, AgentBuilder, AgentHook, AgentRun, AgentRunner, HookContext, ModelHandle, ModelRef,
44 ModelSelection, ModelSelectionAction,
45};
46
47#[cfg(feature = "derive")]
48#[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
49pub use rig_derive::rig_tool;
50
51#[cfg(not(target_family = "wasm"))]
54const _: fn() = || {
55 fn assert_send_sync_static<T: Send + Sync + 'static>() {}
56 assert_send_sync_static::<Agent>();
57 assert_send_sync_static::<AgentRunner>();
58 assert_send_sync_static::<ModelHandle>();
59 assert_send_sync_static::<agent::MultiTurnStreamItem>();
60 assert_send_sync_static::<agent::RunEvents>();
61 assert_send_sync_static::<agent::PromptResponse>();
62 assert_send_sync_static::<tool::server::ToolServerHandle>();
63 assert_send_sync_static::<tool::ToolSet>();
64 assert_send_sync_static::<tool::ToolCatalog>();
65};