给nodes里面节点的execute函数添加whitelist装饰器
This commit is contained in:
parent
04c9445d88
commit
ffa30beaa8
@ -267,7 +267,7 @@ export class FlowExecutor {
|
||||
edges: this.edges
|
||||
};
|
||||
|
||||
const response = await fetch(`/api/action/jingrow.ai.pagetype.ai_agent.nodes.${node.type}.${node.type}.execute`, {
|
||||
const response = await fetch(`/api/action/jingrow.ai.nodes.${node.type}.${node.type}.execute`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@ -5,6 +5,7 @@ import jingrow
|
||||
from jingrow.utils.jingrow_cloud import call_ai_model
|
||||
from jingrow.utils.jinja import render_template
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None):
|
||||
"""
|
||||
AI内容生成节点 - 适配自 jingrow 系统
|
||||
|
||||
@ -11,6 +11,7 @@ from jingrow.ai.api.comfyui_sd import call_jingrow_sd_api
|
||||
from jingrow.ai.api.midjourney import process_midjourney_node_task
|
||||
from jingrow.utils.jinja import render_template
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None):
|
||||
"""
|
||||
AI图像生成节点 - 适配自 jingrow 系统
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import json
|
||||
import jingrow
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None, **kwargs):
|
||||
"""条件判断节点:检查指定pagetype的记录是否满足条件"""
|
||||
if context is None:
|
||||
|
||||
@ -3,6 +3,7 @@ from typing import Dict, Any, Optional
|
||||
|
||||
import jingrow
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None):
|
||||
"""
|
||||
创建记录节点 - 适配自 jingrow 系统
|
||||
|
||||
@ -4,6 +4,7 @@ import json
|
||||
|
||||
import jingrow
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None, **kwargs):
|
||||
"""
|
||||
获取指定记录的 name 值(简化版)
|
||||
|
||||
@ -15,6 +15,7 @@ def log_error(message):
|
||||
"""记录错误日志"""
|
||||
print(f"[ERROR] {message}")
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None, **kwargs):
|
||||
if context is None:
|
||||
context = kwargs.get("context", {})
|
||||
|
||||
@ -3,6 +3,7 @@ import sys
|
||||
import os
|
||||
import jingrow
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None, **kwargs):
|
||||
if context is None:
|
||||
context = kwargs.get("context", {})
|
||||
|
||||
@ -1252,7 +1252,7 @@ async def crawl_and_create_list(crawler, start_url: str, config: Dict[str, Any],
|
||||
"failed_records": failed_records
|
||||
}
|
||||
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None, **kwargs):
|
||||
"""
|
||||
网站采集并创建记录节点(一体化)
|
||||
|
||||
@ -3,6 +3,7 @@ from typing import Dict, Any, Optional
|
||||
|
||||
import jingrow
|
||||
|
||||
@jingrow.whitelist()
|
||||
def execute(context=None, inputs=None, config=None):
|
||||
"""
|
||||
更新记录节点 - 适配自 jingrow 系统
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user