mirror of https://github.com/Mai-with-u/MaiBot.git
fix:表情包获取问题
parent
02f674494c
commit
f61273f4fc
|
|
@ -19,6 +19,8 @@ logger = get_logger("llm_api")
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_available_models() -> Dict[str, Any]:
|
def get_available_models() -> Dict[str, Any]:
|
||||||
"""获取所有可用的模型配置
|
"""获取所有可用的模型配置
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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'模型配置"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue