Skip to main content

rskit_ai/
lib.rs

1//! Shared AI vocabulary for rskit AI/ML crates.
2//!
3//! This crate contains data shapes only: no I/O, providers, registries, or runtime logic.
4
5#![warn(missing_docs)]
6
7/// Budget vocabulary shared by GenAI orchestration layers.
8pub mod budget;
9/// Chat-completion-specific types.
10pub mod chat;
11/// Multimodal content and tool block vocabulary.
12pub mod content;
13/// Typed GenAI error sentinels.
14pub mod error;
15/// Provider and model identity vocabulary.
16pub mod model;
17/// Prompt templates, registries, and renderers.
18pub mod prompt;
19/// Canonical AI message roles.
20pub mod role;
21/// OpenTelemetry AI semantic convention keys.
22pub mod semconv;
23/// Streaming response event vocabulary.
24pub mod stream;
25/// Usage and cost vocabulary.
26pub mod usage;
27/// Vector math helpers shared across AI crates.
28pub mod vector;
29
30pub use budget::{Budget, BudgetExceededReason};
31pub use content::{ContentPart, ToolResultBlock, ToolUseBlock, text_content, text_of};
32pub use error::GenAiError;
33pub use model::{Capabilities, Model, Provider};
34pub use prompt::{
35    Builder, PromptError, PromptIdentity, PromptTemplate, Registry, RenderContext, RenderToMessage,
36    Template, ValidationFinding, ValidationFindingKind, VariableDecl, VariableType, render,
37    validate,
38};
39pub use role::Role;
40pub use stream::{
41    ErrorEvent, FinishReason, MessageStart, MessageStop, ReasoningDelta, StreamEvent,
42    StreamEventRef, TextDelta, ToolUseDelta, ToolUseStart, ToolUseStop, UsageDelta,
43};
44pub use usage::{Cost, Money, Usage};
45
46#[cfg(test)]
47mod tests;