[package]
edition = "2024"
rust-version = "1.94"
name = "instructors"
version = "1.3.0"
authors = [
"GOLIA株式会社",
"Li Hao <lihao@golia.jp>",
]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Type-safe structured output extraction from LLMs. The Rust instructor."
homepage = "https://github.com/goliajp/airs"
documentation = "https://docs.rs/instructors"
readme = "README.md"
keywords = [
"llm",
"openai",
"anthropic",
"structured-output",
"instructor",
]
categories = [
"api-bindings",
"data-structures",
]
license = "MIT"
repository = "https://github.com/goliajp/airs"
[features]
cost-tracking = ["tiktoken"]
default = ["cost-tracking"]
tracing = ["dep:tracing"]
[lib]
name = "instructors"
path = "src/lib.rs"
[[example]]
name = "basic"
path = "examples/basic.rs"
[[example]]
name = "batch"
path = "examples/batch.rs"
[[example]]
name = "entities"
path = "examples/entities.rs"
[[example]]
name = "fallback"
path = "examples/fallback.rs"
[[example]]
name = "hooks"
path = "examples/hooks.rs"
[[example]]
name = "image"
path = "examples/image.rs"
[[example]]
name = "streaming"
path = "examples/streaming.rs"
[[example]]
name = "validation"
path = "examples/validation.rs"
[[test]]
name = "anthropic"
path = "tests/anthropic.rs"
[[test]]
name = "backoff"
path = "tests/backoff.rs"
[[test]]
name = "batch"
path = "tests/batch.rs"
[[test]]
name = "features"
path = "tests/features.rs"
[[test]]
name = "gemini"
path = "tests/gemini.rs"
[[test]]
name = "openai"
path = "tests/openai.rs"
[[test]]
name = "timeout"
path = "tests/timeout.rs"
[[bench]]
name = "schema"
path = "benches/schema.rs"
harness = false
[dependencies.futures]
version = "0.3"
[dependencies.jsonrepair]
version = "0.1"
[dependencies.rand]
version = "0.9"
[dependencies.reqwest]
version = "0.13"
features = [
"json",
"rustls",
"stream",
]
default-features = false
[dependencies.schemars]
version = "1"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dependencies.tiktoken]
version = "3.1.2"
optional = true
[dependencies.tokio]
version = "1"
features = [
"sync",
"time",
]
[dependencies.tracing]
version = "0.1"
optional = true
[dev-dependencies.criterion]
version = "0.8"
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
]
[dev-dependencies.wiremock]
version = "0.6"