llmkit-core 0.1.0

Core traits, types, and errors for llmkit-rs — no I/O, runtime-agnostic
Documentation
//! Core traits, types, and errors shared by every `llmkit` crate.
//!
//! This crate has no I/O and no async runtime dependency. Provider adapters
//! ([`llmkit-openai`], [`llmkit-anthropic`], [`llmkit-ollama`]) implement
//! [`LlmProvider`] against these types; middleware and the facade crate build on
//! top of them.
//!
//! [`llmkit-openai`]: https://docs.rs/llmkit-openai
//! [`llmkit-anthropic`]: https://docs.rs/llmkit-anthropic
//! [`llmkit-ollama`]: https://docs.rs/llmkit-ollama

#![forbid(unsafe_code)]
#![deny(missing_docs)]

pub mod error;
pub mod provider;
pub mod stream;
pub mod tools;
pub mod types;
pub mod usage;

pub use error::{LlmError, LlmResult};
pub use provider::LlmProvider;
pub use stream::{ChatStream, StreamDelta};
pub use tools::{Tool, ToolCall, ToolChoice, ToolResult, ToolSchema};
pub use types::{
    ChatRequest, ChatRequestBuilder, ChatResponse, ContentPart, EmbedRequest, EmbedResponse,
    FinishReason, Message, MessageContent, Role,
};
pub use usage::{pricing, CostEstimate, ModelPricing, TokenUsage};