define_model_type

Macro define_model_type 

Source
macro_rules! define_model_type {
    ($(#[$meta:meta])* $name:ident, $s:expr) => { ... };
}
Expand description

Macro for defining AI model types with standard implementations.

This macro generates a model type with the following implementations:

  • Debug and Clone traits
  • Into<String> for API identifier conversion
  • Serialize for JSON serialization
  • ModelName trait marker

§Usage Examples

// Basic model definition
define_model_type!(GLM4_5, "glm-4.5");

// Model with attributes
define_model_type!(
    #[allow(non_camel_case_types)]
    GLM4_5_flash,
    "glm-4.5-flash"
);