language-model-type

Crates.iolanguage-model-type
lib.rslanguage-model-type
version0.1.3
created_at2025-03-31 05:14:49.515252+00
updated_at2025-07-13 10:23:55.172791+00
descriptionA Rust crate providing an enumeration for various language model types used in machine learning applications, enabling precise model specification through enums.
homepage
repositoryhttps://github.com/klebs6/klebs-general
max_upload_size
id1613030
size101,520
(klebs6)

documentation

README

language-model-type

language-model-type is a Rust crate providing an enumeration of supported language model types. It abstracts the identification of models such as GPT-3.5 Turbo, GPT-4 variations, and forthcoming O1 models within Rust applications. This facilitation enables developers to specify language model versions with precision, enhancing code readability and maintainability.

Features

  • Enumeration of Models: The LanguageModelType enum includes variants for models like Gpt3.5Turbo, Gpt4o, Gpt4oMini, Gpt4Turbo, O1Preview, O1Mini, and O1.
  • Serialization Support: Uses Serde with lowercase renaming for seamless serialization and deserialization.
  • Display Implementation: Custom fmt::Display trait implementation transforming enum to its respective string representation.

Installation

Add language-model-type to your Cargo.toml:

[dependencies]
language-model-type = "0.1.0"

Usage

Import and utilize LanguageModelType in your projects:

use language_model_type::LanguageModelType;

fn main() {
    let model = LanguageModelType::Gpt3_5Turbo;
    println!("Using model: {}", model);
}

This demonstrates the enum's application in selecting and displaying a language model type. Each variant maps to a corresponding string identifier used in practical settings.

Author

Developed by klebs (<klebs tpk3.mx@gmail.com>).

License

Licensed under the MIT License.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


Note: This README.md file was generated by an AI model and may not be 100% accurate. However, it strives to provide accurate and helpful information.

Commit count: 634

cargo fmt