Currently, the FromStr implementation for the EmbeddingModel enum looks through the model_code field to determine the correct enum variant, which is causing some issues when there are quantized versions available. For example, the EmbeddingModel::NomicEmbedTextV15 and the quantized version EmbeddingModel::NomicEmbedTextV15Q share the same model code, causing issues with the lookup.
Maybe the model codes should be made unique?
Currently, the
FromStrimplementation for theEmbeddingModelenum looks through themodel_codefield to determine the correct enum variant, which is causing some issues when there are quantized versions available. For example, theEmbeddingModel::NomicEmbedTextV15and the quantized versionEmbeddingModel::NomicEmbedTextV15Qshare the same model code, causing issues with the lookup.Maybe the model codes should be made unique?