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:
DebugandClonetraitsInto<String>for API identifier conversionSerializefor JSON serializationModelNametrait 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"
);