Skip to main content

alchemy_llm/
lib.rs

1pub mod error;
2pub mod models;
3pub mod providers;
4pub mod stream;
5pub mod transform;
6pub mod types;
7pub mod utils;
8
9#[cfg(test)]
10pub(crate) mod test_helpers;
11
12pub use error::{Error, Result};
13pub use models::{
14    claude_haiku_4_5, claude_opus_4_6, claude_sonnet_4_6, featherless_model, glm_4_32b_0414_128k,
15    glm_4_5, glm_4_5_air, glm_4_5_airx, glm_4_5_flash, glm_4_5_x, glm_4_6, glm_4_7, glm_4_7_flash,
16    glm_4_7_flashx, glm_5, kimi_k2_5, minimax_cn_m2, minimax_cn_m2_1, minimax_cn_m2_1_highspeed,
17    minimax_cn_m2_5, minimax_cn_m2_5_highspeed, minimax_cn_m2_7, minimax_cn_m2_7_highspeed,
18    minimax_m2, minimax_m2_1, minimax_m2_1_highspeed, minimax_m2_5, minimax_m2_5_highspeed,
19    minimax_m2_7, minimax_m2_7_highspeed,
20};
21pub use providers::{
22    get_env_api_key, stream_anthropic_messages, stream_kimi_messages, stream_minimax_completions,
23    stream_openai_completions, OpenAICompletionsOptions,
24};
25pub use stream::{complete, stream, AssistantMessageEventStream};
26pub use transform::{transform_messages, transform_messages_simple, TargetModel};
27pub use utils::{
28    is_context_overflow, parse_streaming_json, parse_streaming_json_smart, sanitize_for_api,
29    sanitize_surrogates, validate_tool_arguments, validate_tool_call, ThinkFragment,
30    ThinkTagParser,
31};