Skip to main content

rig_cat/
lib.rs

1//! # rig-cat
2//!
3//! An LLM agent framework built on `comp-cat-rs`.
4//!
5//! No async, no tokio.  All effects are `Io<Error, A>`, all
6//! concurrency is `Fiber`, all streaming is `Stream`.
7//! The entire runtime is synchronous composition with
8//! thread-based parallelism when needed.
9//!
10//! ## Quick start
11//!
12//! ```rust,ignore
13//! use rig_cat::provider::openai::{OpenAiCompletion, ApiKey, ModelName};
14//! use rig_cat::agent::AgentBuilder;
15//!
16//! let model = OpenAiCompletion::new(
17//!     ApiKey::new(std::env::var("OPENAI_API_KEY")?),
18//!     ModelName::new("gpt-4o".into()),
19//! );
20//!
21//! let agent = AgentBuilder::new(model)
22//!     .preamble("You are a helpful assistant.")
23//!     .temperature(0.7)
24//!     .build();
25//!
26//! let response = agent.prompt("What is a Kan extension?").run()?;
27//! println!("{response}");
28//! ```
29
30pub mod error;
31pub mod model;
32pub mod embedding;
33pub mod tool;
34pub mod vector_store;
35pub mod agent;
36pub mod provider;
37pub mod pipeline;