Crate rstructor

Crate rstructor 

Source

Re-exports§

pub use error::ApiErrorKind;
pub use error::RStructorError;
pub use error::Result;
pub use model::Instructor;
pub use schema::CustomTypeSchema;
pub use schema::Schema;
pub use schema::SchemaBuilder;
pub use schema::SchemaType;

Modules§

error
logging
Logging functionality for rstructor
model
schema

Macros§

impl_client_builder_methods
Macro to generate standard builder methods for LLM clients.

Structs§

AnthropicClient
Anthropic client for generating completions
ChatMessage
A chat message for conversation history.
GeminiClient
Gemini client for generating completions
GenerateResult
Result of a generate call, containing the text and optional usage information.
GrokClient
Grok client for generating completions
MaterializeResult
Result of a materialize call, containing both the data and optional usage information.
ModelInfo
Information about an available model from an LLM provider.
OpenAIClient
OpenAI client for generating completions
TokenUsage
Token usage information from an LLM API call.

Enums§

AnthropicModel
Anthropic models available for completion
ChatRole
Role of a chat message participant.
GeminiModel
Gemini models available for completion
GrokModel
Grok models available for completion
OpenAIModel
OpenAI models available for completion
ThinkingLevel
Thinking level configuration for models that support extended reasoning.

Traits§

LLMClient
LLMClient trait defines the interface for all LLM API clients.

Derive Macros§

Instructor
Derive macro for implementing Instructor and SchemaType