This commit is contained in:
yumoqing 2026-03-06 10:53:11 +08:00
parent a1a239f659
commit cb5d7af4d9
3 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,9 @@ order by a.enabled_date desc"""
return recs[0].id return recs[0].id
return None return None
async def pingpang(request, params_kw=None):
return f'乒乓应答:{params_kw}'
async def text2video(request, params_kw=None): async def text2video(request, params_kw=None):
providerid = params_kw.providerid providerid = params_kw.providerid
add_files = params_kw.add_files add_files = params_kw.add_files

View File

@ -2,6 +2,7 @@ from ahserver.serverenv import ServerEnv
# from .agent import skillagent # from .agent import skillagent
from .skillengine import IndustrialSkillEngine from .skillengine import IndustrialSkillEngine
from .call import ( from .call import (
pingpang,
text2video, text2video,
image2video image2video
) )
@ -12,4 +13,5 @@ def load_skillagent():
# env.skillagent = skillagent # env.skillagent = skillagent
env.image2video = image2video env.image2video = image2video
env.text2video = text2video env.text2video = text2video
env.pingpang = pingpang

View File

@ -160,6 +160,7 @@ class IndustrialSkillEngine:
if res.return_code != 0: if res.return_code != 0:
# 工业级特性:自动将错误回传给 LLM 进行自愈 (Self-healing) # 工业级特性:自动将错误回传给 LLM 进行自愈 (Self-healing)
error(f"Command failed: {res.stderr}") error(f"Command failed: {res.stderr}")
raise Exception(f"Error: {res.stderr}")
if retry_count > 0: if retry_count > 0:
print(f"⚠️ 执行失败,尝试让 AI 自愈修复参数...") print(f"⚠️ 执行失败,尝试让 AI 自愈修复参数...")
new_prompt = f"命令 '{command}' 失败,错误信息: {res.stderr}。请根据错误重新生成正确的命令,或提示用户补全参数。" new_prompt = f"命令 '{command}' 失败,错误信息: {res.stderr}。请根据错误重新生成正确的命令,或提示用户补全参数。"