#!/usr/bin/env python3 """ 모델 프로필 관리 """ # from .polyglot_ko_1_3b import PolyglotKo13bProfile # from .dialogpt_medium import DialoGPTMediumProfile # from .kanana_1_5_2_1b_instruct import Kanana15V21bInstructProfile # from .kanana_nano_2_1b_instruct import KananaNano21bInstructProfile # from .mistral_7b_instruct import Mistral7bInstructProfile # from .polyglot_ko_5_8b import PolyglotKo58bProfile from .polyglot_ko_1_3b_chat import PolyglotKo13bChatProfile from .kanana_1_5_v_3b_instruct import Kanana15V3bInstructProfile from .polyglot_ko_5_8b_chat import PolyglotKo58bChatProfile # 사용 가능한 모델 프로필들 AVAILABLE_MODELS = { "polyglot-ko-1.3b-chat": PolyglotKo13bChatProfile, "kanana-1.5-v-3b-instruct": Kanana15V3bInstructProfile, "polyglot-ko-5.8b-chat": PolyglotKo58bChatProfile, } def get_model_profile(model_id: str): """모델 ID로 프로필 가져오기""" if model_id not in AVAILABLE_MODELS: raise ValueError(f"알 수 없는 모델 ID: {model_id}") return AVAILABLE_MODELS[model_id]() def list_available_models(): """사용 가능한 모델 목록 반환""" models = [] for model_id, profile_class in AVAILABLE_MODELS.items(): profile = profile_class() model_info = profile.get_model_info() models.append({ "model_id": model_id, "name": model_info["display_name"], "description": model_info["description"], "language": model_info["language"], "model_size": model_info["model_size"], "multimodal": model_info.get("multimodal", False) }) return models