Cargo Features

[dependencies]
misanthropic = { version = "0.4.2", default-features = false, features = ["image", "beta", "jpeg", "png", "gif", "webp", "prompt-caching", "log", "rustls-tls", "markdown", "partial_eq", "langsan"] }
default = langsan, rustls-tls

rustls because I am sick of getting Dependabot alerts for OpenSSL.

image gif? jpeg? png? webp?

Image crate support. Note that images are supported without this feature but you must handle encoding/decoding yourself. This is mostly for interop with the image crate.

Enables image

Affects message::ImageDecodeError, message::UnsupportedImageFormat

beta prompt-caching?

A beta has been enabled. It is not necessary to set this manually. Only one beta can be enabled at a time (for example, prompt-caching).

jpeg = image

Use the image crate to support JPEG images.

Enables jpeg of image

png = image

Use the image crate to support PNG images.

Enables png of image

gif = image

Use the image crate to support GIF images.

Enables gif of image

webp = image

Use the image crate to support WEBP images.

Enables webp of image

prompt-caching = beta

Enable prompt caching (recommended, however limits model choices)

Affects message::CacheControl, message::Usage.cache_creation_input_tokens, message::Usage.cache_read_input_tokens, tool::Tool.cache_control, tool::Use.cache_control, tool::Result.cache_control

log

Enable logging

Enables log

rustls-tls default

Use rustls instead of the system SSL, such as OpenSSL.

Enables rustls-tls of reqwest

rustls because I am sick of getting Dependabot alerts for OpenSSL.

markdown

Use pulldown-cmark for markdown parsing and pulldown-cmark-to-cmark for converting to CommonMark.

Enables pulldown-cmark and pulldown-cmark-to-cmark ^17

pulldown-cmark:

markdown support

Affects misanthropic::markdown

partial_eq

Derive PartialEq for all structs and enums.

langsan default

Input and output sanitization

Enables langsan