agentsdk 0.6.2

An open-source Rust library for building AI-powered applications, inspired by the Vercel AI SDK. It provides a robust, type-safe, and easy-to-use interface for interacting with various Large Language Models (LLMs).
Documentation
#![deny(missing_docs)]

//! `agentsdk` is An open-source Rust library for building AI-powered applications, inspired by the Vercel AI SDK.
//! It provides a type-safe interface for interacting with Large Language Models (LLMs).

pub mod core;
pub mod error;
pub mod extensions;
pub mod integrations;
#[cfg(feature = "prompt")]
pub mod prompt;
pub mod providers;

// re-exports
pub use agentsdk_macros::tool;
pub use error::{Error, Result};

// Core re-exports
pub use core::language_model::{LanguageModel, LanguageModelStreamChunkType};
#[cfg(feature = "language-model-request")]
pub use core::language_model::{
    generate_text::GenerateTextResponse, request::LanguageModelRequest,
    stream_text::StreamTextResponse,
};

pub use core::embedding_model::EmbeddingModel;
#[cfg(feature = "embedding-model-request")]
pub use core::embedding_model::EmbeddingModelRequest;

pub use core::messages::{AssistantMessage, Message, Messages, Role, SystemMessage, UserMessage};
pub use core::provider::Provider;
pub use core::tools::{Tool, ToolCallInfo, ToolContext, ToolResultInfo};

/// Macros module for backward compatibility.
pub mod macros {
    pub use agentsdk_macros::tool;
}

/// Re-exports modules required by the `agentsdk_macros::tool` macro.
pub mod __private {
    pub use schemars;
    pub use serde_json;
}