package io.synor.compute;

/**
 * Model categories.
 */
public enum ModelCategory {
    /** Large Language Models */
    LLM("llm"),
    /** Embedding models */
    EMBEDDING("embedding"),
    /** Image generation models */
    IMAGE_GENERATION("image_generation"),
    /** Image classification models */
    IMAGE_CLASSIFICATION("image_classification"),
    /** Object detection models */
    OBJECT_DETECTION("object_detection"),
    /** Speech-to-text models */
    SPEECH_TO_TEXT("speech_to_text"),
    /** Text-to-speech models */
    TEXT_TO_SPEECH("text_to_speech"),
    /** Code generation models */
    CODE("code"),
    /** Custom user-uploaded models */
    CUSTOM("custom");

    private final String value;

    ModelCategory(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static ModelCategory fromValue(String value) {
        for (ModelCategory c : values()) {
            if (c.value.equalsIgnoreCase(value)) {
                return c;
            }
        }
        throw new IllegalArgumentException("Unknown model category: " + value);
    }
}
