fix:表情包获取问题

This commit is contained in:
SengokuCola
2025-07-15 20:55:31 +08:00
parent 02f674494c
commit f61273f4fc
2 changed files with 3 additions and 1 deletions

View File

@@ -19,6 +19,8 @@ logger = get_logger("llm_api")
# ============================================================================= # =============================================================================
def get_available_models() -> Dict[str, Any]: def get_available_models() -> Dict[str, Any]:
"""获取所有可用的模型配置 """获取所有可用的模型配置

View File

@@ -106,7 +106,7 @@ class EmojiAction(BaseAction):
# 5. 调用LLM # 5. 调用LLM
models = llm_api.get_available_models() models = llm_api.get_available_models()
chat_model_config = getattr(models, "utils_small", None) # 默认使用chat模型 chat_model_config = models.get("utils_small") # 使用字典访问方式
if not chat_model_config: if not chat_model_config:
logger.error(f"{self.log_prefix} 未找到'utils_small'模型配置无法调用LLM") logger.error(f"{self.log_prefix} 未找到'utils_small'模型配置无法调用LLM")
return False, "未找到'utils_small'模型配置" return False, "未找到'utils_small'模型配置"