#![allow(clippy::upper_case_acronyms)]
pub mod accounting;
pub mod agent;
pub mod attachment;
pub mod batch;
pub mod cached_content;
pub mod chat;
pub mod config;
pub mod context;
pub mod cost;
pub mod embedding;
pub mod error;
pub mod evaluation;
pub mod files;
pub mod image;
pub mod instrumentation;
pub mod judge;
pub mod mcp;
pub mod message;
pub mod model;
pub mod models;
pub mod moderation;
pub mod ocr;
pub mod open_telemetry;
pub mod progress;
pub mod prompt;
pub mod protocols;
pub mod provider_tools;
pub mod providers;
pub mod request_shape;
pub mod rerank;
pub mod search_results;
pub mod speech;
pub mod support;
pub mod thinking;
pub mod tokenization;
pub mod tokens;
pub mod tool;
pub mod tool_search;
pub mod transcription;
pub mod transport;
pub mod video;
pub mod workflow;
pub use agent::Agent;
pub use attachment::{Attachment, Resolution};
pub use batch::{Batch, BatchResult, BatchStatus, EmbeddingRequest, batch, embed_later};
pub use cached_content::{CacheOptions, CachedContent, Ttl, cache};
pub use chat::{CancelHandle, Chat, Fallback, FallbackAttempt};
pub use config::{Config, config, configure};
pub use context::{Context, context};
pub use cost::Cost;
pub use embedding::{EmbedOptions, Embedding, SparseVectors, Vectors, embed};
pub use error::{Error, ErrorKind, Result};
pub use files::{DownloadedFile, FileOptions, UploadOptions, UploadedFile, download, upload};
pub use image::{Image, Images, PaintOptions, paint};
pub use instrumentation::{Instrumenter, instrument};
pub use judge::{
Answer, Dynamic, Judge, JudgeOptions, Judgment, QuestionType, judge, list_judgment_models,
};
pub use mcp::{InputRequest, Mcp, McpResult, McpTool};
pub use message::{
Chunk, Citation, FinishReason, Message, Role, Thinking, ToolCall, UsageEntry, UsageStatus,
};
pub use model::Model;
pub use models::models;
pub use moderation::{ModerateOptions, Moderation, ModerationInput, ModerationResult, moderate};
pub use ocr::{Ocr, OcrOptions, Page as OcrPage, ocr};
pub use progress::Progress;
pub use prompt::{Prompt, render_prompt};
pub use protocols::{Caching, ToolCalls, ToolChoice};
pub use provider_tools::ProviderTool;
pub use providers::{ProtocolName, Provider};
pub use request_shape::RequestShape;
pub use rerank::{Rerank, RerankOptions, RerankResult, rerank};
pub use search_results::SearchResults;
pub use speech::{SpeakOptions, Speech, SpeechChunk, speak, speak_stream};
pub use thinking::{Display as ThinkingDisplay, ThinkingConfig};
pub use tokenization::{Tokenization, TokenizeOptions, tokenize};
pub use tokens::Tokens;
pub use tool::{FnTool, Parameter, SharedTool, Tool, ToolError, ToolResult, schema_for};
pub use transcription::{
TranscribeOptions, Transcription, TranscriptionChunk, transcribe, transcribe_stream,
};
pub use video::{
AnimateOptions, Video, VideoJob, VideoSource, VideoStatus, animate, animate_later,
};
pub use workflow::{Workflow, workflow};
pub fn chat() -> Result<Chat> {
Chat::new(None, None)
}
pub fn chat_with(model: &str) -> Result<Chat> {
Chat::new(Some(model), None)
}
pub async fn count_tokens(text: &str, model: Option<&str>, provider: Option<&str>) -> Result<i64> {
Chat::new(model, provider)?.count_tokens(Some(text)).await
}
pub const VERSION: &str = "2.1.1";