bugfix
This commit is contained in:
parent
a1a239f659
commit
cb5d7af4d9
@ -18,6 +18,9 @@ order by a.enabled_date desc"""
|
||||
return recs[0].id
|
||||
return None
|
||||
|
||||
async def pingpang(request, params_kw=None):
|
||||
return f'乒乓应答:{params_kw}'
|
||||
|
||||
async def text2video(request, params_kw=None):
|
||||
providerid = params_kw.providerid
|
||||
add_files = params_kw.add_files
|
||||
|
||||
@ -2,6 +2,7 @@ from ahserver.serverenv import ServerEnv
|
||||
# from .agent import skillagent
|
||||
from .skillengine import IndustrialSkillEngine
|
||||
from .call import (
|
||||
pingpang,
|
||||
text2video,
|
||||
image2video
|
||||
)
|
||||
@ -12,4 +13,5 @@ def load_skillagent():
|
||||
# env.skillagent = skillagent
|
||||
env.image2video = image2video
|
||||
env.text2video = text2video
|
||||
env.pingpang = pingpang
|
||||
|
||||
|
||||
@ -160,6 +160,7 @@ class IndustrialSkillEngine:
|
||||
if res.return_code != 0:
|
||||
# 工业级特性:自动将错误回传给 LLM 进行自愈 (Self-healing)
|
||||
error(f"Command failed: {res.stderr}")
|
||||
raise Exception(f"Error: {res.stderr}")
|
||||
if retry_count > 0:
|
||||
print(f"⚠️ 执行失败,尝试让 AI 自愈修复参数...")
|
||||
new_prompt = f"命令 '{command}' 失败,错误信息: {res.stderr}。请根据错误重新生成正确的命令,或提示用户补全参数。"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user