anyllm_translate 0.9.7

Pure translation layer between Anthropic Messages API and OpenAI Chat Completions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

/// Errors that can occur during API format translation.
#[derive(Error, Debug, Clone)]
pub enum TranslateError {
    /// The model name did not match any entry in the translation config.
    #[error("unknown model: {0}")]
    UnknownModel(String),

    /// A translation step failed (validation, unsupported feature with strict config, etc.).
    #[error("translation error: {0}")]
    Translation(String),

    /// A required field was missing from the input.
    #[error("missing field: {0}")]
    MissingField(String),
}