feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

View File

@@ -0,0 +1,837 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package adaptor
import (
"context"
"io"
"net"
"net/http"
"net/http/httptest"
"os"
"strings"
"testing"
"time"
"github.com/bytedance/mockey"
"github.com/cloudwego/eino/schema"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
userentity "github.com/coze-dev/coze-studio/backend/domain/user/entity"
"github.com/coze-dev/coze-studio/backend/domain/workflow"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/code"
crossdatabase "github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/database"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/database/databasemock"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/knowledge"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/knowledge/knowledgemock"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/model"
mockmodel "github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/model/modelmock"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/plugin"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/plugin/pluginmock"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/variable"
mockvar "github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/variable/varmock"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/compose"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute"
mockWorkflow "github.com/coze-dev/coze-studio/backend/internal/mock/domain/workflow"
mockcode "github.com/coze-dev/coze-studio/backend/internal/mock/domain/workflow/crossdomain/code"
"github.com/coze-dev/coze-studio/backend/internal/testutil"
"github.com/coze-dev/coze-studio/backend/pkg/ctxcache"
"github.com/coze-dev/coze-studio/backend/pkg/sonic"
"github.com/coze-dev/coze-studio/backend/types/consts"
)
func TestIntentDetectorAndDatabase(t *testing.T) {
mockey.PatchConvey("intent detector & database custom sql", t, func() {
data, err := os.ReadFile("../examples/intent_detector_database_custom_sql.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
assert.NoError(t, err)
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockey.Mock(execute.GetExeCtx).Return(&execute.Context{
RootCtx: execute.RootCtx{
ExeCfg: vo.ExecuteConfig{
Mode: vo.ExecuteModeDebug,
Operator: 123,
BizType: vo.BizTypeWorkflow,
},
},
}).Build()
mockModelManager := mockmodel.NewMockManager(ctrl)
mockey.Mock(model.GetManager).Return(mockModelManager).Build()
chatModel := &testutil.UTChatModel{
InvokeResultProvider: func(_ int, in []*schema.Message) (*schema.Message, error) {
return &schema.Message{
Role: schema.Assistant,
Content: `{"classificationId":1,"reason":"choice branch 1 "}`,
ResponseMeta: &schema.ResponseMeta{
Usage: &schema.TokenUsage{
PromptTokens: 1,
CompletionTokens: 2,
TotalTokens: 3,
},
},
}, nil
},
}
mockModelManager.EXPECT().GetModel(gomock.Any(), gomock.Any()).Return(chatModel, nil, nil).AnyTimes()
mockDatabaseOperator := databasemock.NewMockDatabaseOperator(ctrl)
n := int64(2)
resp := &crossdatabase.Response{
Objects: []crossdatabase.Object{
{
"v2": "123",
},
{
"v2": "345",
},
},
RowNumber: &n,
}
mockDatabaseOperator.EXPECT().Execute(gomock.Any(), gomock.Any()).Return(resp, nil).AnyTimes()
mockey.Mock(crossdatabase.GetDatabaseOperator).Return(mockDatabaseOperator).Build()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC, compose.WithIDAsName(2))
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"input": "what's your name?",
})
assert.NoError(t, err)
output := response["output"]
bs, _ := sonic.Marshal(output)
ret := make([]map[string]interface{}, 0)
err = sonic.Unmarshal(bs, &ret)
assert.NoError(t, err)
assert.Equal(t, ret[0]["v2"], int64(123))
assert.Equal(t, ret[1]["v2"], int64(345))
number := response["number"].(int64)
assert.Equal(t, int64(2), number)
})
}
func mockUpdate(t *testing.T) func(context.Context, *crossdatabase.UpdateRequest) (*crossdatabase.Response, error) {
return func(ctx context.Context, req *crossdatabase.UpdateRequest) (*crossdatabase.Response, error) {
assert.Equal(t, req.ConditionGroup.Conditions[0], &crossdatabase.Condition{
Left: "v2",
Operator: "=",
Right: int64(1),
})
assert.Equal(t, req.ConditionGroup.Conditions[1], &crossdatabase.Condition{
Left: "v1",
Operator: "=",
Right: "abc",
})
assert.Equal(t, req.ConditionGroup.Relation, crossdatabase.ClauseRelationAND)
assert.Equal(t, req.Fields, map[string]interface{}{
"1783392627713": int64(123),
})
return &crossdatabase.Response{}, nil
}
}
func mockInsert(t *testing.T) func(ctx context.Context, request *crossdatabase.InsertRequest) (*crossdatabase.Response, error) {
return func(ctx context.Context, req *crossdatabase.InsertRequest) (*crossdatabase.Response, error) {
v := req.Fields["1785960530945"]
assert.Equal(t, v, int64(123))
vs := req.Fields["1783122026497"]
assert.Equal(t, vs, "input for database curd")
n := int64(10)
return &crossdatabase.Response{
RowNumber: &n,
}, nil
}
}
func mockQuery(t *testing.T) func(ctx context.Context, request *crossdatabase.QueryRequest) (*crossdatabase.Response, error) {
return func(ctx context.Context, req *crossdatabase.QueryRequest) (*crossdatabase.Response, error) {
assert.Equal(t, req.ConditionGroup.Conditions[0], &crossdatabase.Condition{
Left: "v1",
Operator: "=",
Right: "abc",
})
assert.Equal(t, req.SelectFields, []string{
"1783122026497", "1784288924673", "1783392627713",
})
n := int64(10)
return &crossdatabase.Response{
RowNumber: &n,
Objects: []crossdatabase.Object{
{"v1": "vv"},
},
}, nil
}
}
func mockDelete(t *testing.T) func(context.Context, *crossdatabase.DeleteRequest) (*crossdatabase.Response, error) {
return func(ctx context.Context, req *crossdatabase.DeleteRequest) (*crossdatabase.Response, error) {
nn := int64(10)
assert.Equal(t, req.ConditionGroup.Conditions[0], &crossdatabase.Condition{
Left: "v2",
Operator: "=",
Right: nn,
})
n := int64(1)
return &crossdatabase.Response{
RowNumber: &n,
}, nil
}
}
func TestDatabaseCURD(t *testing.T) {
mockey.PatchConvey("database curd", t, func() {
data, err := os.ReadFile("../examples/database_curd.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
_ = ctx
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockDatabaseOperator := databasemock.NewMockDatabaseOperator(ctrl)
mockey.Mock(crossdatabase.GetDatabaseOperator).Return(mockDatabaseOperator).Build()
mockDatabaseOperator.EXPECT().Query(gomock.Any(), gomock.Any()).DoAndReturn(mockQuery(t))
mockDatabaseOperator.EXPECT().Update(gomock.Any(), gomock.Any()).DoAndReturn(mockUpdate(t))
mockDatabaseOperator.EXPECT().Insert(gomock.Any(), gomock.Any()).DoAndReturn(mockInsert(t))
mockDatabaseOperator.EXPECT().Delete(gomock.Any(), gomock.Any()).DoAndReturn(mockDelete(t))
mockey.Mock(execute.GetExeCtx).Return(&execute.Context{
RootCtx: execute.RootCtx{
ExeCfg: vo.ExecuteConfig{
Mode: vo.ExecuteModeDebug,
Operator: 123,
BizType: vo.BizTypeWorkflow,
},
},
}).Build()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
wf, err := compose.NewWorkflow(ctx, workflowSC, compose.WithIDAsName(2))
assert.NoError(t, err)
mockRepo := mockWorkflow.NewMockRepository(ctrl)
mockey.Mock(workflow.GetRepository).Return(mockRepo).Build()
mockRepo.EXPECT().GenID(gomock.Any()).Return(time.Now().UnixNano(), nil).AnyTimes()
mockRepo.EXPECT().GetWorkflowCancelFlag(gomock.Any(), gomock.Any()).Return(false, nil).AnyTimes()
output, err := wf.SyncRun(ctx, map[string]any{
"input": "input for database curd",
"v2": int64(123),
})
assert.NoError(t, err)
assert.Equal(t, map[string]any{
"output": int64(1),
}, output)
})
}
func TestHttpRequester(t *testing.T) {
listener, err := net.Listen("tcp", "127.0.0.1:8080") // 指定IP和端口
assert.NoError(t, err)
ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/http_error" {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
}
if r.URL.Path == "/file" {
_, _ = w.Write([]byte(strings.Repeat("A", 1024*2)))
}
if r.URL.Path == "/no_auth_no_body" {
assert.Equal(t, "h_v1", r.Header.Get("h1"))
assert.Equal(t, "h_v2", r.Header.Get("h2"))
assert.Equal(t, "abc", r.Header.Get("h3"))
assert.Equal(t, "v1", r.URL.Query().Get("query_v1"))
assert.Equal(t, "v2", r.URL.Query().Get("query_v2"))
response := map[string]string{
"message": "no_auth_no_body",
}
bs, _ := sonic.Marshal(response)
_, _ = w.Write(bs)
}
if r.URL.Path == "/bear_auth_no_body" {
assert.Equal(t, "Bearer bear_token", r.Header.Get("Authorization"))
response := map[string]string{
"message": "bear_auth_no_body",
}
bs, _ := sonic.Marshal(response)
_, _ = w.Write(bs)
}
if r.URL.Path == "/custom_auth_no_body" {
assert.Equal(t, "authValue", r.URL.Query().Get("authKey"))
response := map[string]string{
"message": "custom_auth_no_body",
}
bs, _ := sonic.Marshal(response)
_, _ = w.Write(bs)
}
if r.URL.Path == "/custom_auth_json_body" {
body, err := io.ReadAll(r.Body)
if err != nil {
t.Fatal(err)
return
}
jsonRet := make(map[string]string)
err = sonic.Unmarshal(body, &jsonRet)
assert.NoError(t, err)
assert.Equal(t, jsonRet["v1"], "1")
assert.Equal(t, jsonRet["v2"], "json_body")
response := map[string]string{
"message": "custom_auth_json_body",
}
bs, _ := sonic.Marshal(response)
_, _ = w.Write(bs)
}
if r.URL.Path == "/custom_auth_form_data_body" {
file, _, err := r.FormFile("file_v1")
assert.NoError(t, err)
fileBs, err := io.ReadAll(file)
assert.NoError(t, err)
assert.Equal(t, fileBs, []byte(strings.Repeat("A", 1024*2)))
response := map[string]string{
"message": "custom_auth_form_data_body",
}
bs, _ := sonic.Marshal(response)
_, _ = w.Write(bs)
}
if r.URL.Path == "/custom_auth_form_url_body" {
err := r.ParseForm()
assert.NoError(t, err)
assert.Equal(t, "formUrlV1", r.Form.Get("v1"))
assert.Equal(t, "formUrlV2", r.Form.Get("v2"))
response := map[string]string{
"message": "custom_auth_form_url_body",
}
bs, _ := sonic.Marshal(response)
_, _ = w.Write(bs)
}
if r.URL.Path == "/custom_auth_file_body" {
body, err := io.ReadAll(r.Body)
assert.NoError(t, err)
defer func() {
_ = r.Body.Close()
}()
assert.Equal(t, strings.TrimSpace(strings.Repeat("A", 1024*2)), string(body))
response := map[string]string{
"message": "custom_auth_file_body",
}
bs, _ := sonic.Marshal(response)
_, _ = w.Write(bs)
}
if r.URL.Path == "/http_error" {
w.WriteHeader(http.StatusInternalServerError)
}
}))
ts.Listener = listener
ts.Start()
defer ts.Close()
defer func() {
_ = listener.Close()
}()
mockey.PatchConvey("http requester no auth and no body", t, func() {
data, err := os.ReadFile("../examples/httprequester/no_auth_no_body.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
wf, err := compose.NewWorkflow(ctx, workflowSC, compose.WithIDAsName(3))
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, `{"message":"no_auth_no_body"}`)
assert.Equal(t, response["h2_v2"], "h_v2")
})
mockey.PatchConvey("http requester has bear auth and no body", t, func() {
data, err := os.ReadFile("../examples/httprequester/bear_auth_no_body.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
wf, err := compose.NewWorkflow(ctx, workflowSC, compose.WithIDAsName(2))
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
"token": "bear_token",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, `{"message":"bear_auth_no_body"}`)
assert.Equal(t, response["h2_v2"], "h_v2")
})
mockey.PatchConvey("http requester custom auth and no body", t, func() {
data, err := os.ReadFile("../examples/httprequester/custom_auth_no_body.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
"auth_key": "authKey",
"auth_value": "authValue",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, `{"message":"custom_auth_no_body"}`)
assert.Equal(t, response["h2_v2"], "h_v2")
})
mockey.PatchConvey("http requester custom auth and json body", t, func() {
data, err := os.ReadFile("../examples/httprequester/custom_auth_json_body.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC, compose.WithIDAsName(2))
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
"auth_key": "authKey",
"auth_value": "authValue",
"json_key": "json_body",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, `{"message":"custom_auth_json_body"}`)
assert.Equal(t, response["h2_v2"], "h_v2")
})
mockey.PatchConvey("http requester custom auth and form data body", t, func() {
data, err := os.ReadFile("../examples/httprequester/custom_auth_form_data_body.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
"auth_key": "authKey",
"auth_value": "authValue",
"form_key_v1": "value1",
"form_key_v2": "http://127.0.0.1:8080/file",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, `{"message":"custom_auth_form_data_body"}`)
assert.Equal(t, response["h2_v2"], "h_v2")
})
mockey.PatchConvey("http requester custom auth and form url body", t, func() {
data, err := os.ReadFile("../examples/httprequester/custom_auth_form_url_body.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
"auth_key": "authKey",
"auth_value": "authValue",
"form_url_v1": "formUrlV1",
"form_url_v2": "formUrlV2",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, `{"message":"custom_auth_form_url_body"}`)
assert.Equal(t, response["h2_v2"], "h_v2")
})
mockey.PatchConvey("http requester custom auth and file body", t, func() {
data, err := os.ReadFile("../examples/httprequester/custom_auth_file_body.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
"auth_key": "authKey",
"auth_value": "authValue",
"file": "http://127.0.0.1:8080/file",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, `{"message":"custom_auth_file_body"}`)
assert.Equal(t, response["h2_v2"], "h_v2")
})
mockey.PatchConvey("http requester with url template", t, func() {
data, err := os.ReadFile("../examples/httprequester/http_with_url_template.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"input": "input",
"m": map[string]any{
"m1": "m1_v1",
},
})
assert.NoError(t, err)
output := response["output"].(string)
result := make(map[string]any)
err = sonic.UnmarshalString(output, &result)
assert.NoError(t, err)
assert.Equal(t, result["data"].(string), `input`)
assert.Equal(t, result["args"], map[string]any{
"var": "input",
"var2": "m1_v1",
})
})
mockey.PatchConvey("http requester error", t, func() {
data, err := os.ReadFile("../examples/httprequester/http_error.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v1": "v1",
"v2": "v2",
"h_v1": "h_v1",
"h_v2": "h_v2",
"auth_key": "authKey",
"auth_value": "authValue",
})
assert.NoError(t, err)
body := response["body"].(string)
assert.Equal(t, body, "v1")
})
}
func TestKnowledgeNodes(t *testing.T) {
mockey.PatchConvey("knowledge indexer & retriever", t, func() {
data, err := os.ReadFile("../examples/knowledge.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockKnowledgeOperator := knowledgemock.NewMockKnowledgeOperator(ctrl)
mockey.Mock(knowledge.GetKnowledgeOperator).Return(mockKnowledgeOperator).Build()
response := &knowledge.CreateDocumentResponse{
DocumentID: int64(1),
}
mockKnowledgeOperator.EXPECT().Store(gomock.Any(), gomock.Any()).Return(response, nil)
rResponse := &knowledge.RetrieveResponse{
Slices: []*knowledge.Slice{
{
DocumentID: "v1",
Output: "v1",
},
{
DocumentID: "v2",
Output: "v2",
},
},
}
mockKnowledgeOperator.EXPECT().Retrieve(gomock.Any(), gomock.Any()).Return(rResponse, nil)
mockGlobalAppVarStore := mockvar.NewMockStore(ctrl)
mockGlobalAppVarStore.EXPECT().Get(gomock.Any(), gomock.Any()).Return("v1", nil).AnyTimes()
mockGlobalAppVarStore.EXPECT().Set(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
variable.SetVariableHandler(&variable.Handler{
AppVarStore: mockGlobalAppVarStore,
})
ctx := t.Context()
ctx = ctxcache.Init(ctx)
ctxcache.Store(ctx, consts.SessionDataKeyInCtx, &userentity.Session{
UserID: 123,
})
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
resp, err := wf.Runner.Invoke(ctx, map[string]any{
"file": "http://127.0.0.1:8080/file?x-wf-file_name=file_v1.docx",
"v1": "v1",
})
assert.NoError(t, err)
assert.Equal(t, map[string]any{
"success": []any{
map[string]any{
"documentId": "v1",
"output": "v1",
},
map[string]any{
"documentId": "v2",
"output": "v2",
},
},
"v1": "v1",
}, resp)
})
}
func TestKnowledgeDeleter(t *testing.T) {
mockey.PatchConvey("knowledge deleter", t, func() {
data, err := os.ReadFile("../examples/knowledge_delete.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockKnowledgeOperator := knowledgemock.NewMockKnowledgeOperator(ctrl)
mockey.Mock(knowledge.GetKnowledgeOperator).Return(mockKnowledgeOperator).Build()
storeResponse := &knowledge.CreateDocumentResponse{
DocumentID: int64(1),
FileName: "1706.03762v7.pdf",
FileURL: "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/5264fa1295da4a6483cd236b1316c454.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1782379180&x-signature=mlaXPIk9VJjOXu87xGaRmNRg9%2BA%3D&x-wf-file_name=1706.03762v7.pdf",
}
mockKnowledgeOperator.EXPECT().Store(gomock.Any(), gomock.Any()).Return(storeResponse, nil)
deleteResponse := &knowledge.DeleteDocumentResponse{
IsSuccess: true,
}
mockKnowledgeOperator.EXPECT().Delete(gomock.Any(), gomock.Any()).Return(deleteResponse, nil)
ctx := t.Context()
ctx = ctxcache.Init(ctx)
ctxcache.Store(ctx, consts.SessionDataKeyInCtx, &userentity.Session{
UserID: 123,
})
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
resp, err := wf.Runner.Invoke(ctx, map[string]any{})
assert.NoError(t, err)
assert.Equal(t, map[string]any{"output": true}, resp)
})
}
func TestCodeAndPluginNodes(t *testing.T) {
mockey.PatchConvey("code & plugin ", t, func() {
data, err := os.ReadFile("../examples/code_plugin.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockCodeRunner := mockcode.NewMockRunner(ctrl)
mockey.Mock(code.GetCodeRunner).Return(mockCodeRunner).Build()
mockCodeRunner.EXPECT().Run(gomock.Any(), gomock.Any()).Return(&code.RunResponse{
Result: map[string]any{
"key0": "value0",
"key1": []string{"value1", "value2"},
"key11": "value11",
},
}, nil)
mockToolService := pluginmock.NewMockService(ctrl)
mockey.Mock(plugin.GetPluginService).Return(mockToolService).Build()
mockToolService.EXPECT().ExecutePlugin(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(),
gomock.Any()).Return(map[string]any{
"log_id": "20240617191637796DF3F4453E16AF3615",
"msg": "success",
"code": 0,
"data": map[string]interface{}{
"image_url": "image_url",
"prompt": "小狗在草地上",
},
}, nil).AnyTimes()
ctx := t.Context()
ctx = ctxcache.Init(ctx)
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
resp, err := wf.Runner.Invoke(ctx, map[string]any{
"code_input": "v1",
"code_input_2": "v2",
"model_type": int64(123),
})
assert.NoError(t, err)
assert.Equal(t, map[string]any{
"output": "value0",
"output2": "20240617191637796DF3F4453E16AF3615",
}, resp)
})
}
func TestVariableAggregatorNode(t *testing.T) {
mockey.PatchConvey("Variable aggregator ", t, func() {
data, err := os.ReadFile("../examples/variable_aggregate/variable_aggregator.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
ctx := t.Context()
workflowSC, err := CanvasToWorkflowSchema(ctx, c)
assert.NoError(t, err)
wf, err := compose.NewWorkflow(ctx, workflowSC)
assert.NoError(t, err)
response, err := wf.Runner.Invoke(ctx, map[string]any{
"v11": "v11",
})
assert.NoError(t, err)
assert.Equal(t, map[string]any{
"g1": "v11",
"g2": int64(100),
}, response)
})
}
func TestPruneIsolatedNodes(t *testing.T) {
data, err := os.ReadFile("../examples/validate/workflow_of_prune_isolate.json")
assert.NoError(t, err)
c := &vo.Canvas{}
err = sonic.Unmarshal(data, c)
assert.NoError(t, err)
c.Nodes, c.Edges = PruneIsolatedNodes(c.Nodes, c.Edges, nil)
qaNodeID := "147187"
blockTextProcessNodeID := "102623"
for _, n := range c.Nodes {
if n.ID == qaNodeID {
t.Fatal("qa node id should not exist")
}
if len(n.Blocks) > 0 {
for _, b := range n.Blocks {
if b.ID == blockTextProcessNodeID {
t.Fatal("text process node id should not exist")
}
}
}
}
}

View File

@@ -0,0 +1,241 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package adaptor
import (
"context"
"fmt"
einoCompose "github.com/cloudwego/eino/compose"
"golang.org/x/exp/maps"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/compose"
)
func WorkflowSchemaFromNode(ctx context.Context, c *vo.Canvas, nodeID string) (
*compose.WorkflowSchema, error) {
var (
n *vo.Node
nodeFinder func(nodes []*vo.Node) *vo.Node
)
nodeFinder = func(nodes []*vo.Node) *vo.Node {
for i := range nodes {
if nodes[i].ID == nodeID {
return nodes[i]
}
if len(nodes[i].Blocks) > 0 {
if n := nodeFinder(nodes[i].Blocks); n != nil {
return n
}
}
}
return nil
}
n = nodeFinder(c.Nodes)
if n == nil {
return nil, fmt.Errorf("node %s not found", nodeID)
}
batchN, enabled, err := parseBatchMode(n)
if err != nil {
return nil, err
}
if enabled {
n = batchN
}
implicitDependencies, err := extractImplicitDependency(n, c.Nodes)
if err != nil {
return nil, err
}
opts := make([]OptionFn, 0, 1)
if len(implicitDependencies) > 0 {
opts = append(opts, WithImplicitNodeDependencies(implicitDependencies))
}
nsList, hierarchy, err := NodeToNodeSchema(ctx, n, opts...)
if err != nil {
return nil, err
}
var (
ns *compose.NodeSchema
innerNodes map[vo.NodeKey]*compose.NodeSchema // inner nodes of the composite node if nodeKey is composite
connections []*compose.Connection
)
if len(nsList) == 1 {
ns = nsList[0]
} else {
innerNodes = make(map[vo.NodeKey]*compose.NodeSchema)
for i := range nsList {
one := nsList[i]
if _, ok := hierarchy[one.Key]; ok {
innerNodes[one.Key] = one
if one.Type == entity.NodeTypeContinue || one.Type == entity.NodeTypeBreak {
connections = append(connections, &compose.Connection{
FromNode: one.Key,
ToNode: vo.NodeKey(nodeID),
})
}
} else {
ns = one
}
}
}
if ns == nil {
panic("impossible")
}
const inputFillerKey = "input_filler"
connections = append(connections, &compose.Connection{
FromNode: einoCompose.START,
ToNode: inputFillerKey,
}, &compose.Connection{
FromNode: inputFillerKey,
ToNode: ns.Key,
}, &compose.Connection{
FromNode: ns.Key,
ToNode: einoCompose.END,
})
if len(n.Edges) > 0 { // only need to keep the connections for inner nodes of composite node
for i := range n.Edges {
conn := EdgeToConnection(n.Edges[i])
connections = append(connections, conn)
}
allN := make(map[string]*vo.Node)
allN[string(ns.Key)] = n
for i := range n.Blocks {
inner := n.Blocks[i]
allN[inner.ID] = inner
}
connections, err = normalizePorts(connections, allN)
if err != nil {
return nil, err
}
}
startOutputTypes := maps.Clone(ns.InputTypes)
// For chosen node, change input sources to be from einoCompose.START,
// unless it's static value or from variables.
// Also change the FromPath to be the same as Path.
newInputSources := make([]*vo.FieldInfo, 0, len(ns.InputSources))
for i := range ns.InputSources {
input := ns.InputSources[i]
if input.Source.Ref != nil && input.Source.Ref.VariableType != nil {
// from variables
newInputSources = append(newInputSources, input)
} else if input.Source.Ref == nil {
// static values
newInputSources = append(newInputSources, input)
} else {
newInputSources = append(newInputSources, &vo.FieldInfo{
Path: input.Path,
Source: vo.FieldSource{Ref: &vo.Reference{
FromNodeKey: inputFillerKey,
FromPath: input.Path,
}},
})
}
}
ns.InputSources = newInputSources
// for inner node, change input sources to be from einoCompose.START,
// unless it's static value, from variables, from parent, or from other inner nodes
// Also change the FromPath to be the same as Path.
for key := range innerNodes {
inner := innerNodes[key]
innerInputSources := make([]*vo.FieldInfo, 0, len(inner.InputSources))
for i := range inner.InputSources {
input := inner.InputSources[i]
if input.Source.Ref != nil && input.Source.Ref.VariableType != nil {
// from variables
innerInputSources = append(innerInputSources, input)
} else if input.Source.Ref == nil {
// static values
innerInputSources = append(innerInputSources, input)
} else if input.Source.Ref.FromNodeKey == ns.Key {
// from parent
innerInputSources = append(innerInputSources, input)
} else if _, ok := innerNodes[input.Source.Ref.FromNodeKey]; ok {
// from other inner nodes
innerInputSources = append(innerInputSources, input)
} else {
innerInputSources = append(innerInputSources, &vo.FieldInfo{
Path: input.Path,
Source: vo.FieldSource{Ref: &vo.Reference{
FromNodeKey: inputFillerKey,
FromPath: input.Path,
}},
})
startOutputTypes[input.Path[0]] = inner.InputTypes[input.Path[0]]
}
}
inner.InputSources = innerInputSources
}
i := func(ctx context.Context, output map[string]any) (map[string]any, error) {
newOutput := make(map[string]any)
for k := range output {
newOutput[k] = output[k]
}
for k, tInfo := range startOutputTypes {
if err := compose.FillIfNotRequired(tInfo, newOutput, k, compose.FillNil, false); err != nil {
return nil, err
}
}
return newOutput, nil
}
inputFiller := &compose.NodeSchema{
Key: inputFillerKey,
Type: entity.NodeTypeLambda,
Lambda: einoCompose.InvokableLambda(i),
InputSources: []*vo.FieldInfo{
{
Path: einoCompose.FieldPath{},
Source: vo.FieldSource{
Ref: &vo.Reference{
FromNodeKey: einoCompose.START,
FromPath: einoCompose.FieldPath{},
},
},
},
},
OutputTypes: startOutputTypes,
}
trimmedSC := &compose.WorkflowSchema{
Nodes: append([]*compose.NodeSchema{ns, inputFiller}, maps.Values(innerNodes)...),
Connections: connections,
Hierarchy: hierarchy,
}
if enabled {
trimmedSC.GeneratedNodes = append(trimmedSC.GeneratedNodes, ns.Key)
}
return trimmedSC, nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,250 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 26.700000000000003
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1300,
"y": 13.700000000000003
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "159154",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "159154",
"type": "21",
"meta": {
"position": {
"x": 740,
"y": 0
},
"canvasPosition": {
"x": 560,
"y": 319.4
}
},
"data": {
"nodeMeta": {
"title": "循环",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Loop-v2.jpg",
"description": "用于通过设定循环次数和逻辑,重复执行一系列任务",
"mainColor": "#00B2B2",
"subTitle": "循环"
},
"inputs": {
"loopType": "array",
"loopCount": {
"type": "integer",
"value": {
"type": "literal",
"content": "10"
}
},
"variableParameters": [
{
"name": "vars",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "input",
"input": {
"type": "list",
"value": {
"type": "literal",
"content": "[\"1\"]",
"rawMeta": {
"type": 99
}
},
"schema": {
"type": "string"
}
}
}
]
},
"outputs": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "159154",
"name": "vars"
},
"rawMeta": {
"type": 1
}
}
}
}
]
},
"blocks": [
{
"id": "108785",
"type": "40",
"meta": {
"position": {
"x": 180,
"y": 0
}
},
"data": {
"nodeMeta": {
"title": "变量赋值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/Variable.jpg",
"description": "用于给支持写入的变量赋值,包括应用变量、用户变量",
"mainColor": "#FF811A",
"subTitle": "变量赋值"
},
"inputs": {
"inputParameters": [
{
"name": "appv1",
"left": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"appv1"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"variableTypeMap": {
"appv1": "global_variable_app"
}
},
"outputs": [
{
"name": "isSuccess",
"type": "boolean"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "159154",
"targetNodeID": "108785",
"sourcePortID": "loop-function-inline-output"
},
{
"sourceNodeID": "108785",
"targetNodeID": "159154",
"targetPortID": "loop-function-inline-input"
}
]
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "159154"
},
{
"sourceNodeID": "159154",
"targetNodeID": "900001",
"sourcePortID": "loop-output"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,323 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input_array",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
},
{
"name": "batch_concurrency",
"required": true,
"type": "integer"
},
{
"name": "optional",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": -10.588288288288288,
"y": -166.3
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "163658",
"name": "USER_RESPONSE_list",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "output"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1039.3313063063065,
"y": -179.3
}
},
"type": "2"
},
{
"blocks": [
{
"blocks": [],
"data": {
"inputs": {
"outputSchema": "[{\"type\":\"string\",\"name\":\"input\",\"required\":true}]"
},
"nodeMeta": {
"title": "receiver"
},
"outputs": [
{
"name": "input",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "165663",
"meta": {
"position": {
"x": -180.51644144144146,
"y": 76.74533360653558
}
},
"type": "30"
},
{
"blocks": [],
"data": {
"inputs": {
"answer_type": "text",
"dynamic_option": {
"type": "string",
"value": {
"content": {
"blockID": "",
"name": "",
"source": "block-output"
},
"type": "ref"
}
},
"extra_output": false,
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "163658",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "arr_item"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "165663",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "user_input"
}
],
"limit": 3,
"llmParam": {
"generationDiversity": "balance",
"maxTokens": 1024,
"modelName": "doubao function calling",
"modelType": 1706077826,
"responseFormat": 2,
"systemPrompt": "",
"temperature": 1,
"topP": 0.7
},
"option_type": "static",
"options": [
{
"name": ""
}
],
"question": "{{arr_item}} {{user_input}}"
},
"nodeMeta": {
"title": "qa"
},
"outputs": [
{
"name": "USER_RESPONSE",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "197297",
"meta": {
"position": {
"x": 358.2819819819821,
"y": 37.74533360653553
}
},
"type": "18"
}
],
"data": {
"inputs": {
"batchSize": {
"type": "integer",
"value": {
"content": "100",
"type": "literal"
}
},
"concurrentSize": {
"type": "integer",
"value": {
"content": {
"blockID": "100001",
"name": "batch_concurrency",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"inputParameters": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "input_array",
"source": "block-output"
},
"type": "ref"
}
},
"name": "input"
}
]
},
"nodeMeta": {
"title": "batch"
},
"outputs": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "197297",
"name": "USER_RESPONSE",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "USER_RESPONSE_list"
}
]
},
"edges": [
{
"sourceNodeID": "163658",
"targetNodeID": "165663",
"sourcePortID": "batch-function-inline-output"
},
{
"sourceNodeID": "165663",
"targetNodeID": "197297",
"sourcePortID": ""
},
{
"sourceNodeID": "197297",
"targetNodeID": "163658",
"sourcePortID": "",
"targetPortID": "batch-function-inline-input"
}
],
"id": "163658",
"meta": {
"canvasPosition": {
"x": 389.04110360360346,
"y": 88.16987652593423
},
"position": {
"x": 477.92387387387384,
"y": -180
}
},
"type": "28"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "163658",
"sourcePortID": ""
},
{
"sourceNodeID": "163658",
"targetNodeID": "900001",
"sourcePortID": "batch-output"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,471 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": -90.5329099821747,
"y": -323.84999999999985
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"schema": {
"schema": [
{
"name": "output",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
},
{
"name": "input",
"required": false,
"type": "string"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": {
"blockID": "178876",
"name": "outputList",
"source": "block-output"
},
"rawMeta": {
"type": 103
},
"type": "ref"
}
},
"name": "output"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1209.0861892268267,
"y": -336.84999999999985
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"batch": {
"batchEnable": true,
"batchSize": 100,
"concurrentSize": 10,
"inputLists": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "item1"
}
]
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "180671",
"name": "item1",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "item1"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "input_from_entry"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1737521813",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "4096",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "0",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "{{item1}}\nall questions:\n{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"description": "调用大语言模型,使用变量和提示词生成回复",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "大模型",
"title": "大模型"
},
"outputs": [
{
"name": "outputList",
"schema": {
"schema": [
{
"name": "output",
"type": "string"
}
],
"type": "object"
},
"type": "list"
}
],
"version": "3"
},
"edges": null,
"id": "180671",
"meta": {
"position": {
"x": 342.6734564208258,
"y": -363.54999999999984
}
},
"type": "3"
},
{
"blocks": [],
"data": {
"inputs": {
"batch": {
"batchEnable": true,
"batchSize": 100,
"concurrentSize": 10,
"inputLists": [
{
"input": {
"schema": {
"schema": [
{
"name": "output",
"type": "string"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": {
"blockID": "180671",
"name": "outputList",
"source": "block-output"
},
"rawMeta": {
"type": 103
},
"type": "ref"
}
},
"name": "item1"
}
]
},
"inputDefs": [
{
"input": {},
"name": "input",
"required": false,
"type": "string"
}
],
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "178876",
"name": "item1.output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"settingOnError": {
"dataOnErr": "{\n \"outputList\": [\n {\n \"output\": []\n }\n ]\n}",
"switch": false
},
"spaceId": "7309328955423670309",
"type": 0,
"workflowId": "7469707607914217512",
"workflowVersion": "v0.0.1"
},
"nodeMeta": {
"description": "文本处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false,
"title": "text_processing"
},
"outputs": [
{
"name": "outputList",
"schema": {
"schema": [
{
"name": "output",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
},
{
"name": "input",
"required": false,
"type": "string"
}
],
"type": "object"
},
"type": "list"
}
]
},
"edges": null,
"id": "178876",
"meta": {
"position": {
"x": 775.8798228238263,
"y": -337.54999999999984
}
},
"type": "9"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "180671",
"sourcePortID": ""
},
{
"sourceNodeID": "178876",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "180671",
"targetNodeID": "178876",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,259 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": [
{
"name": "input",
"required": false,
"type": "string"
}
]
},
"edges": null,
"id": "100001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "192899",
"name": "output",
"source": "block-output"
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 993,
"y": -12.999999999999986
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "String"
}
],
"method": "split",
"splitParams": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": [
"。",
""
],
"type": "literal"
}
},
"name": "delimiters"
},
{
"input": {
"schema": {
"schema": [
{
"name": "label",
"required": true,
"type": "string"
},
{
"name": "value",
"required": true,
"type": "string"
},
{
"name": "isDefault",
"required": true,
"type": "boolean"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": [
{
"isDefault": true,
"label": "换行",
"value": "\n"
},
{
"isDefault": true,
"label": "制表符",
"value": "\t"
},
{
"isDefault": true,
"label": "句号",
"value": "。"
},
{
"isDefault": true,
"label": "逗号",
"value": ""
},
{
"isDefault": true,
"label": "分号",
"value": ""
},
{
"isDefault": true,
"label": "空格",
"value": " "
}
],
"type": "literal"
}
},
"name": "allDelimiters"
}
]
},
"nodeMeta": {
"description": "用于处理多个字符串类型变量的格式",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"mainColor": "#3071F2",
"subTitle": "文本处理",
"title": "文本处理"
},
"outputs": [
{
"name": "output",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
}
]
},
"edges": null,
"id": "192899",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 491.5,
"y": -13.949999999999989
}
},
"type": "15"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "192899",
"sourcePortID": ""
},
{
"sourceNodeID": "192899",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,407 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -744.3383265685363,
"y": -243.19932319428818
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "code_input",
"required": true
},
{
"type": "string",
"name": "code_input_2",
"required": true
},
{
"type": "integer",
"name": "model_type",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "code_input",
"required": true
},
{
"type": "string",
"name": "code_input_2",
"required": true
},
{
"type": "integer",
"name": "model_type",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 717.4514215854077,
"y": -243.19932319428818
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "140645",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "output2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "194114",
"name": "log_id"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "194114",
"type": "4",
"meta": {
"position": {
"x": 181.651290527654,
"y": -270.5993231942882
}
},
"data": {
"nodeMeta": {
"title": "ImageToolPro",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Plugin-v2.jpg",
"subtitle": "ByteArtist:ImageToolPro",
"description": "根据用户的描述生成多种风格的图片\n"
},
"inputs": {
"apiParam": [
{
"name": "apiID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7348853341923016714",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "apiName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "ImageToolPro",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7348853341922983946",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "ByteArtist",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginVersion",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "tips",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "outDocLink",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "model_type",
"input": {
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "model_type"
},
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "prompt",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "140645",
"name": "key11"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "image_url",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "ImageURL",
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "log_id",
"required": false
},
{
"type": "string",
"name": "msg",
"required": false
},
{
"type": "float",
"name": "code",
"required": false
},
{
"type": "object",
"name": "data",
"schema": [
{
"type": "string",
"name": "image_url",
"required": false,
"description": "生成图片的地址"
},
{
"type": "string",
"name": "prompt",
"required": false,
"description": "生成图片的描述"
}
],
"required": false
}
]
}
},
{
"id": "140645",
"type": "5",
"meta": {
"position": {
"x": -228.95588048315332,
"y": -203.30700572155118
}
},
"data": {
"nodeMeta": {
"title": "代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "code_input"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "input_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "code_input_2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "# 在这里,您可以通过 args 获取节点中的输入变量,并通过 'ret' 输出结果\n# 'args' 和 'ret' 已经被正确地注入到环境中\n# 下面是一个示例首先获取节点的全部输入参数params其次获取其中参数名为input的值\n# params = args.params; \n# input = params.input;\n# 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n# ret: Output = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync def main(args: Args) -> Output:\n params = args.params\n # 构建输出对象\n ret: Output = {\n \"key0\": params['input'] + params['input'], # 拼接两次入参 input 的值\n \"key11\": params['input'] + params['input'], # 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"]\n }\n return ret",
"language": 3,
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "string",
"name": "key11"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "140645"
},
{
"sourceNodeID": "194114",
"targetNodeID": "900001"
},
{
"sourceNodeID": "140645",
"targetNodeID": "194114"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,291 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -50,
"y": -47
}
},
"data": {
"nodeMeta": {
"description": "The starting node of the workflow, used to set the information needed to initiate the workflow.",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start.png",
"subTitle": "",
"title": "Start"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 973,
"y": -116
}
},
"data": {
"nodeMeta": {
"description": "The final node of the workflow, used to return the result information after the workflow runs.",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End.png",
"subTitle": "",
"title": "End"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
}
}
}
}
]
}
}
},
{
"id": "123065",
"type": "4",
"meta": {
"position": {
"x": 402.4428571428571,
"y": -271.6142857142857
}
},
"data": {
"nodeMeta": {
"title": "top_news",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Plugin-v2.jpg",
"subtitle": "p1:top_news",
"description": "帮助用户获取搜狐网上的每日热闻"
},
"inputs": {
"apiParam": [
{
"name": "apiID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7516515616698662912",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "apiName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "p1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7516515556770447360",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "p1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginVersion",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "0",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "tips",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "outDocLink",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "count",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 12,
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "q",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "object",
"name": "data",
"schema": [
{
"type": "object",
"name": "coze_ark_001",
"schema": [
{
"type": "list",
"name": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "object",
"name": "[Array Item]",
"schema": [
{
"type": "string",
"name": "url"
},
{
"type": "string",
"name": "brief"
},
{
"type": "string",
"name": "title"
}
]
}
]
}
}
]
}
]
},
{
"type": "float",
"name": "total"
},
{
"type": "string",
"name": "message"
},
{
"type": "boolean",
"name": "success"
},
{
"type": "string",
"name": "traceId"
},
{
"type": "float",
"name": "code"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "123065"
},
{
"sourceNodeID": "123065",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,121 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start.png",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 971,
"y": -149
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End.png",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "166612",
"type": "9",
"meta": {
"position": {
"x": 418,
"y": -191.5
}
},
"data": {
"nodeMeta": {
"title": "child_child_3",
"description": "3",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7515027249628708864",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "166612"
},
{
"sourceNodeID": "166612",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,79 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 49,
"y": -53
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start.png",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 739,
"y": -104
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End.png",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,121 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -5,
"y": -112
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start.png",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 931,
"y": -94
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End.png",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "155865",
"type": "9",
"meta": {
"position": {
"x": 442,
"y": -195
}
},
"data": {
"nodeMeta": {
"title": "child_child_child_4",
"description": "4",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7515027325977624576",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "155865"
},
{
"sourceNodeID": "155865",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,926 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 35.2
}
},
"data": {
"nodeMeta": {
"description": "The starting node of the workflow, used to set the information needed to initiate the workflow.",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "Start"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2883.4601226993864,
"y": -172.42576687116565
}
},
"data": {
"nodeMeta": {
"description": "The final node of the workflow, used to return the result information after the workflow runs.",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "End"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "float",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "137942",
"name": "total"
},
"rawMeta": {
"type": 4
}
}
}
}
]
}
}
},
{
"id": "137942",
"type": "4",
"meta": {
"position": {
"x": 1967.239263803681,
"y": -430.7699386503067
}
},
"data": {
"nodeMeta": {
"title": "top_news",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Plugin-v2.jpg",
"subtitle": "p1:top_news",
"description": "帮助用户获取搜狐网上的每日热闻"
},
"inputs": {
"apiParam": [
{
"name": "apiID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7521710149602377728",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "apiName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "p1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7521710098171822080",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "p1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginVersion",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "0",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "tips",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "outDocLink",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "count",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 1,
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "q",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "float",
"name": "total"
},
{
"type": "string",
"name": "message"
},
{
"type": "boolean",
"name": "success"
},
{
"type": "string",
"name": "traceId"
},
{
"type": "float",
"name": "code"
},
{
"type": "object",
"name": "data",
"schema": [
{
"type": "object",
"name": "coze_ark_001",
"schema": [
{
"type": "list",
"name": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "object",
"name": "[Array Item]",
"schema": [
{
"type": "string",
"name": "title"
},
{
"type": "string",
"name": "url"
},
{
"type": "string",
"name": "brief"
}
]
}
]
}
}
]
}
]
}
]
}
},
{
"id": "139459",
"type": "43",
"meta": {
"position": {
"x": 2448.0245398773004,
"y": -313.6687116564417
}
},
"data": {
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7522311426006843392"
}
],
"selectParam": {
"condition": {
"conditionList": [
[
{
"name": "left",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v1"
}
}
},
{
"name": "operation",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "IS_NOT_NULL"
}
}
},
null
]
],
"logic": "AND"
},
"orderByList": [],
"limit": 100,
"fieldList": [
{
"fieldID": 102,
"isDistinct": false
}
]
},
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": [
{
"type": "integer",
"name": "id"
}
]
}
},
{
"type": "integer",
"name": "rowNum"
}
],
"nodeMeta": {
"title": "Query Data",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icaon-database-select.jpg",
"description": "Query data from the table, and the user can define query conditions, select columns, etc., and output the data that meets the conditions",
"mainColor": "#F2B600",
"subTitle": "Query Data"
}
}
},
{
"id": "118229",
"type": "4",
"meta": {
"position": {
"x": 1486.4539877300615,
"y": -338.180981595092
}
},
"data": {
"nodeMeta": {
"title": "job_recommendation",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Plugin-v2.jpg",
"subtitle": "猎聘:job_recommendation",
"description": "帮助用户搜索工作招聘,基于用户的工作经验、教育经历、地理位置、薪水、职位名称、工作性质等"
},
"inputs": {
"apiParam": [
{
"name": "apiID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "130001",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "apiName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "猎聘",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "13",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "猎聘",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginVersion",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "tips",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "outDocLink",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [],
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "list",
"name": "data",
"schema": {
"type": "object",
"schema": [
{
"type": "object",
"name": "[Array Item]",
"schema": [
{
"type": "string",
"name": "compIndustry"
},
{
"type": "string",
"name": "compName"
},
{
"type": "string",
"name": "compScale"
},
{
"type": "string",
"name": "compStage"
},
{
"type": "string",
"name": "dq"
},
{
"type": "string",
"name": "jobDetailLink"
},
{
"type": "string",
"name": "recruiterPhoto"
},
{
"type": "string",
"name": "salary"
},
{
"type": "string",
"name": "compLogo"
},
{
"type": "list",
"name": "labels",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "[Array Item]"
}
]
}
},
{
"type": "string",
"name": "recruiterName"
},
{
"type": "string",
"name": "title"
}
]
}
]
}
}
]
}
},
{
"id": "145498",
"type": "4",
"meta": {
"position": {
"x": 556.2944785276075,
"y": -140.25644171779138
}
},
"data": {
"nodeMeta": {
"title": "top_news_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Plugin-v2.jpg",
"subtitle": "p1_copy:top_news",
"description": "帮助用户获取搜狐网上的每日热闻"
},
"inputs": {
"apiParam": [
{
"name": "apiID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7521710447641231360",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "apiName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "p1_copy",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7521710447590899712",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "p1_copy",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginVersion",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v0.0.1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "tips",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "outDocLink",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "count",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 12,
"rawMeta": {
"type": 2
}
}
}
}
],
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "float",
"name": "code"
},
{
"type": "object",
"name": "data",
"schema": [
{
"type": "object",
"name": "coze_ark_001",
"schema": [
{
"type": "list",
"name": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "object",
"name": "[Array Item]",
"schema": [
{
"type": "string",
"name": "title"
},
{
"type": "string",
"name": "url"
},
{
"type": "string",
"name": "brief"
}
]
}
]
}
}
]
}
]
},
{
"type": "float",
"name": "total"
},
{
"type": "string",
"name": "message"
},
{
"type": "boolean",
"name": "success"
},
{
"type": "string",
"name": "traceId"
}
]
}
},
{
"id": "159358",
"type": "6",
"meta": {
"position": {
"x": 1038.6625766871166,
"y": -279.6564417177914
}
},
"data": {
"nodeMeta": {
"title": "Knowledge retrieval",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-KnowledgeQuery-v2.jpg",
"description": "In the selected knowledge, the best matching information is recalled based on the input variable and returned as an Array.",
"mainColor": "#FF811A",
"subTitle": "Knowledge retrieval"
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"inputs": {
"datasetParam": [
{
"name": "datasetList",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "literal",
"content": [
"7522316202157277184"
]
}
}
},
{
"name": "topK",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 5
}
}
},
{
"name": "useRerank",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "useRewrite",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "isPersonalOnly",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "minScore",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": 0.5
}
}
},
{
"name": "strategy",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 1
}
}
}
],
"inputParameters": [
{
"name": "Query",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "145498"
},
{
"sourceNodeID": "139459",
"targetNodeID": "900001"
},
{
"sourceNodeID": "118229",
"targetNodeID": "137942"
},
{
"sourceNodeID": "137942",
"targetNodeID": "139459"
},
{
"sourceNodeID": "159358",
"targetNodeID": "118229"
},
{
"sourceNodeID": "145498",
"targetNodeID": "159358"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,79 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 25,
"y": -36
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start.png",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 615,
"y": -156
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End.png",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,205 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -135,
"y": -63
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start.png",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1313,
"y": 19.25
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End.png",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "191100",
"type": "9",
"meta": {
"position": {
"x": 634.5,
"y": -171
}
},
"data": {
"nodeMeta": {
"title": "child_1",
"description": "1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7515027150387281920",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
},
{
"id": "167855",
"type": "9",
"meta": {
"position": {
"x": 1026,
"y": -240.5
}
},
"data": {
"nodeMeta": {
"title": "child_2",
"description": "2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7515027182796668928",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
},
{
"id": "125555",
"type": "9",
"meta": {
"position": {
"x": 243,
"y": -258.9
}
},
"data": {
"nodeMeta": {
"title": "child_child_child_4",
"description": "4",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7515027325977624576",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "125555"
},
{
"sourceNodeID": "167855",
"targetNodeID": "900001"
},
{
"sourceNodeID": "125555",
"targetNodeID": "191100"
},
{
"sourceNodeID": "191100",
"targetNodeID": "167855"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,394 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -239.17391562719308,
"y": -485.2679266746656
}
},
"data": {
"nodeMeta": {
"description": "The starting node of the workflow, used to set the information needed to initiate the workflow.",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start.png",
"subTitle": "",
"title": "Start"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 726.092034161139,
"y": -118.77658977203274
}
},
"data": {
"nodeMeta": {
"description": "The final node of the workflow, used to return the result information after the workflow runs.",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End.png",
"subTitle": "",
"title": "End"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "140884",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "140884",
"type": "3",
"meta": {
"position": {
"x": 220.85957287256923,
"y": -572.3157579290518
}
},
"data": {
"nodeMeta": {
"title": "LLM",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"description": "Invoke the large language model, generate responses using variables and prompt words.",
"mainColor": "#5C62FF",
"subTitle": "LLM"
},
"inputs": {
"inputParameters": [],
"llmParam": [
{
"name": "modelType",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "modleName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "generationDiversity",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "balance",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "temperature",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": "0.8",
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "maxTokens",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "4096",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "responseFormat",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "prompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "enableChatHistory",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": false,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "chatHistoryRound",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "3",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "systemPrompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"fcParam": {
"pluginFCParam": {
"pluginList": [
{
"plugin_id": "7516515556770447360",
"api_id": "7516515616698662912",
"api_name": "top_news",
"plugin_version": "0",
"is_draft": true
}
]
},
"knowledgeFCParam": {
"knowledgeList": [
{
"id": "7516515692099665920",
"name": "knowv1"
}
],
"global_setting": {
"auto": false,
"min_score": 0.5,
"no_recall_reply_customize_prompt": "抱歉,您的问题超出了我的知识范围,并且无法在当前阶段回答",
"no_recall_reply_mode": 0,
"show_source": false,
"show_source_mode": 0,
"top_k": 3,
"use_rerank": true,
"use_rewrite": true,
"use_nl2_sql": true,
"search_mode": 0
}
}
},
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "output"
}
],
"version": "3"
}
},
{
"id": "157683",
"type": "12",
"meta": {
"position": {
"x": 1043.449575532565,
"y": -502.4679266746656
}
},
"data": {
"nodeMeta": {
"title": "SQL Customization",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Database-v2.jpg",
"description": "Complete the operations of adding, deleting, modifying and querying the database based on user-defined SQL",
"mainColor": "#FF811A",
"subTitle": "SQL Customization"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"databaseInfoList": [
{
"databaseInfoID": "7516516171512807424"
}
],
"sql": "select * from v1;",
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": []
}
},
{
"type": "integer",
"name": "rowNum"
}
]
}
},
{
"id": "150915",
"type": "9",
"meta": {
"position": {
"x": 646.3887080343196,
"y": -506.07295576483375
}
},
"data": {
"nodeMeta": {
"title": "child_v1",
"description": "123",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7516518409656336384",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "140884"
},
{
"sourceNodeID": "157683",
"targetNodeID": "900001"
},
{
"sourceNodeID": "140884",
"targetNodeID": "150915"
},
{
"sourceNodeID": "150915",
"targetNodeID": "157683"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,561 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 72.2
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": true
},
{
"type": "integer",
"name": "v2",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": true
},
{
"type": "integer",
"name": "v2",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2505.909090909091,
"y": -189.89090909090908
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "169400",
"name": "rowNum"
},
"rawMeta": {
"type": 2
}
}
}
}
]
}
}
},
{
"id": "122439",
"type": "42",
"meta": {
"position": {
"x": 1100,
"y": -59.20000000000002
}
},
"data": {
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7478954112676282405"
}
],
"updateParam": {
"condition": {
"conditionList": [
[
{
"name": "left",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v2"
}
}
},
{
"name": "operation",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "EQUAL"
}
}
},
{
"name": "right",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 1,
"rawMeta": {
"type": 2
}
}
}
}
],
[
{
"name": "left",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v1"
}
}
},
{
"name": "operation",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "EQUAL"
}
}
},
{
"name": "right",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
]
],
"logic": "AND"
},
"fieldInfo": [
[
{
"name": "fieldID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1783392627713"
}
}
},
{
"name": "fieldValue",
"input": {
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 2
}
}
}
}
]
]
}
},
"nodeMeta": {
"description": "修改表中已存在的数据记录,用户指定更新条件和内容来更新数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-database-update.jpg",
"mainColor": "#F2B600",
"subTitle": "更新数据",
"title": "更新数据"
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": []
}
},
{
"type": "integer",
"name": "rowNum"
}
]
}
},
{
"id": "125902",
"type": "46",
"meta": {
"position": {
"x": 640,
"y": -19.327272727272714
}
},
"data": {
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7478954112676282405"
}
],
"insertParam": {
"fieldInfo": [
[
{
"name": "fieldID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1785960530945"
}
}
},
{
"name": "fieldValue",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 123,
"rawMeta": {
"type": 2
}
}
}
}
],
[
{
"name": "fieldID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1783122026497"
}
}
},
{
"name": "fieldValue",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
]
}
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": []
}
},
{
"type": "integer",
"name": "rowNum"
}
],
"nodeMeta": {
"title": "新增数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-database-insert.jpg",
"description": "向表添加新数据记录,用户输入数据内容后插入数据库",
"mainColor": "#F2B600",
"subTitle": "新增数据"
}
}
},
{
"id": "178557",
"type": "43",
"meta": {
"position": {
"x": 1568.6363636363635,
"y": -150.27272727272725
}
},
"data": {
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7478954112676282405"
}
],
"selectParam": {
"orderByList": [
{
"fieldID": 1783122026497,
"isAsc": false
}
],
"limit": 10,
"fieldList": [
{
"fieldID": 1783122026497,
"isDistinct": false
},
{
"fieldID": 1784288924673,
"isDistinct": false
},
{
"fieldID": 1783392627713,
"isDistinct": false
}
],
"condition": {
"conditionList": [
[
{
"name": "left",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v1"
}
}
},
{
"name": "operation",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "EQUAL"
}
}
},
{
"name": "right",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
]
],
"logic": "OR"
}
}
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "v1"
},
{
"type": "string",
"assistType": 10000,
"name": "v3"
},
{
"type": "integer",
"name": "v2"
}
]
}
},
{
"type": "integer",
"name": "rowNum"
}
],
"nodeMeta": {
"title": "查询数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icaon-database-select.jpg",
"description": "从表获取数据,用户可定义查询条件、选择列等,输出符合条件的数据",
"mainColor": "#F2B600",
"subTitle": "查询数据"
}
}
},
{
"id": "169400",
"type": "44",
"meta": {
"position": {
"x": 2037.2727272727273,
"y": -175.72727272727272
}
},
"data": {
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7478954112676282405"
}
],
"deleteParam": {
"condition": {
"conditionList": [
[
{
"name": "left",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v2"
}
}
},
{
"name": "operation",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "EQUAL"
}
}
},
{
"name": "right",
"input": {
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "125902",
"name": "rowNum"
},
"rawMeta": {
"type": 2
}
}
}
}
]
],
"logic": "AND"
}
}
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": []
}
},
{
"type": "integer",
"name": "rowNum"
}
],
"nodeMeta": {
"title": "删除数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-database-delete.jpg",
"description": "从表中删除数据记录,用户指定删除条件来删除符合条件的记录",
"mainColor": "#F2B600",
"subTitle": "删除数据"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "125902"
},
{
"sourceNodeID": "169400",
"targetNodeID": "900001"
},
{
"sourceNodeID": "125902",
"targetNodeID": "122439"
},
{
"sourceNodeID": "122439",
"targetNodeID": "178557"
},
{
"sourceNodeID": "178557",
"targetNodeID": "169400"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,293 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "start"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "float"
},
{
"name": "obj",
"required": true,
"schema": [
{
"name": "field1",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
],
"type": "object"
},
{
"name": "arr",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{output}}_{{output_obj.field1}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "",
"name": "",
"path": [
"app_var"
],
"source": "global_variable_app"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"schema": [
{
"name": "field1",
"required": false,
"schema": {
"assistType": 10000,
"type": "string"
},
"type": "list"
}
],
"type": "object",
"value": {
"content": {
"blockID": "100001",
"name": "obj",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "output_obj"
},
{
"input": {
"schema": {
"assistType": 10000,
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "obj.field1",
"source": "block-output"
},
"rawMeta": {
"type": 116
},
"type": "ref"
}
},
"name": "output_field1"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "arr",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "output_arr"
},
{
"input": {
"type": "string",
"value": {
"content": "literal_value",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "literal_key"
},
{
"input": {
"schema": [
{
"input": {
"type": "float",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 4
},
"type": "ref"
}
},
"name": "obj_container_1"
},
{
"input": {
"type": "string",
"value": {
"content": "sub_literal",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "obj_container_2"
}
],
"type": "object",
"value": {
"type": "object_ref"
}
},
"name": "obj_container"
},
{
"input": {
"schema": [],
"type": "object",
"value": {
"content": "{\"a\": \"b\"}",
"rawMeta": {
"type": 6
},
"type": "literal"
}
},
"name": "obj_literal"
},
{
"input": {
"schema": {
"type": "integer"
},
"type": "list",
"value": {
"content": "[1,2]",
"rawMeta": {
"type": 100
},
"type": "literal"
}
},
"name": "arr_literal"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"description": "end",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "end"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 559,
"y": -13
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"note": "[{\"type\":\"paragraph\",\"children\":[{\"text\":\"this is a comment\",\"type\":\"text\"}]}]",
"schemaType": "slate"
},
"size": {
"height": 150,
"width": 240
}
},
"edges": null,
"id": "117701",
"meta": {
"position": {
"x": 292.5,
"y": 160
}
},
"type": "31"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,351 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 323.05,
"y": -304.1166666666667
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "boolean",
"value": {
"content": {
"blockID": "156675",
"name": "isSuccess",
"source": "block-output"
},
"rawMeta": {
"type": 3
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "198291",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output1"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 344.4333333333333,
"y": 178.68333333333334
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"code": "# 在这里,您可以通过 args 获取节点中的输入变量,并通过 'ret' 输出结果\n# 'args' 和 'ret' 已经被正确地注入到环境中\n# 下面是一个示例首先获取节点的全部输入参数params其次获取其中参数名为input的值\n# params = args.params; \n# input = params.input;\n# 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n# ret: Output = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync def main(args: Args) -> Output:\n params = args.params\n # 构建输出对象\n ret: Output = {\n \"key0\": params['input'] + fn(params['input']), # 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], # 输出一个数组\n \"key2\": { # 输出一个Object \n \"key21\": \"hi\"\n },\n }\n return ret",
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"language": 3,
"settingOnError": {
"dataOnErr": "{\n \"key0\": \"\",\n \"key1\": [],\n \"key2\": {\n \"key21\": \"\"\n }\n}",
"processType": 3,
"retryTimes": 0,
"switch": true,
"timeoutMs": 60000
}
},
"nodeMeta": {
"description": "编写代码,处理输入变量来生成返回值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "代码",
"title": "代码"
},
"outputs": [
{
"name": "key0",
"type": "string"
},
{
"name": "key1",
"schema": {
"type": "string"
},
"type": "list"
},
{
"name": "key2",
"schema": [
{
"name": "key21",
"type": "string"
}
],
"type": "object"
},
{
"name": "errorBody",
"readonly": true,
"schema": [
{
"name": "errorMessage",
"readonly": true,
"type": "string"
},
{
"name": "errorCode",
"readonly": true,
"type": "string"
}
],
"type": "object"
},
{
"name": "isSuccess",
"readonly": true,
"type": "boolean"
}
]
},
"edges": null,
"id": "156675",
"meta": {
"position": {
"x": 330.91666666666663,
"y": -122.33383333333333
}
},
"type": "5"
},
{
"blocks": [],
"data": {
"inputs": {
"concatParams": [
{
"input": {
"type": "string",
"value": {
"content": "code result: {{String1}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "concatResult"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "arrayItemConcatChar"
},
{
"input": {
"schema": {
"schema": [
{
"name": "label",
"required": true,
"type": "string"
},
{
"name": "value",
"required": true,
"type": "string"
},
{
"name": "isDefault",
"required": true,
"type": "boolean"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": [
{
"isDefault": true,
"label": "换行",
"value": "\n"
},
{
"isDefault": true,
"label": "制表符",
"value": "\t"
},
{
"isDefault": true,
"label": "句号",
"value": "。"
},
{
"isDefault": true,
"label": "逗号",
"value": ""
},
{
"isDefault": true,
"label": "分号",
"value": ""
},
{
"isDefault": true,
"label": "空格",
"value": " "
}
],
"type": "literal"
}
},
"name": "allArrayItemConcatChars"
}
],
"inputParameters": [
{
"input": {
"type": "boolean",
"value": {
"content": {
"blockID": "156675",
"name": "isSuccess",
"source": "block-output"
},
"rawMeta": {
"type": 3
},
"type": "ref"
}
},
"name": "String1"
}
],
"method": "concat"
},
"nodeMeta": {
"description": "用于处理多个字符串类型变量的格式",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"mainColor": "#3071F2",
"subTitle": "文本处理",
"title": "文本处理"
},
"outputs": [
{
"name": "output",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "198291",
"meta": {
"position": {
"x": 761.65,
"y": 23.21616666666668
}
},
"type": "15"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "156675",
"sourcePortID": ""
},
{
"sourceNodeID": "156675",
"targetNodeID": "900001",
"sourcePortID": "default"
},
{
"sourceNodeID": "198291",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "156675",
"targetNodeID": "198291",
"sourcePortID": "branch_error"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,323 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 119.72615956319696,
"y": -224.00378240856207
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "103929",
"name": "name",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "name"
},
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "103929",
"name": "age",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "age"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 209.3767670011393,
"y": 394.57856844750563
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1737521813",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "4096",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "2",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"dataOnErr": "{\n \"name\": \"zhangsan\",\n \"age\": 3\n}",
"ext": {
"backupLLmParam": "{\"temperature\":1,\"topP\":0.7,\"responseFormat\":2,\"maxTokens\":1024,\"modelName\":\"豆包·工具调用\",\"modelType\":1706077826,\"generationDiversity\":\"default_val\"}"
},
"processType": 2,
"retryTimes": 1,
"switch": true,
"timeoutMs": 300
}
},
"nodeMeta": {
"description": "调用大语言模型,使用变量和提示词生成回复",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "大模型",
"title": "大模型"
},
"outputs": [
{
"name": "name",
"type": "string"
},
{
"name": "age",
"type": "integer"
},
{
"name": "errorBody",
"readonly": true,
"schema": [
{
"name": "errorMessage",
"readonly": true,
"type": "string"
},
{
"name": "errorCode",
"readonly": true,
"type": "string"
}
],
"type": "object"
},
{
"name": "isSuccess",
"readonly": true,
"type": "boolean"
}
],
"version": "3"
},
"edges": null,
"id": "103929",
"meta": {
"position": {
"x": 190.39267558532714,
"y": -61.87783756395649
}
},
"type": "3"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "103929",
"sourcePortID": ""
},
{
"sourceNodeID": "103929",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,301 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 119.72615956319696,
"y": -224.00378240856207
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "103929",
"name": "name",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "name"
},
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "103929",
"name": "age",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "age"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 209.3767670011393,
"y": 394.57856844750563
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1737521813",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "4096",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "2",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"dataOnErr": "{\n \"name\": \"zhangsan\",\n \"age\": 3\n}",
"ext": {
"backupLLmParam": "{\"temperature\":1,\"topP\":0.7,\"responseFormat\":2,\"maxTokens\":1024,\"modelName\":\"豆包·工具调用\",\"modelType\":1706077826,\"generationDiversity\":\"default_val\"}"
},
"processType": 1,
"retryTimes": 1,
"switch": false,
"timeoutMs": 300
}
},
"nodeMeta": {
"description": "调用大语言模型,使用变量和提示词生成回复",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "大模型",
"title": "大模型"
},
"outputs": [
{
"name": "name",
"type": "string"
},
{
"name": "age",
"type": "integer"
}
],
"version": "3"
},
"edges": null,
"id": "103929",
"meta": {
"position": {
"x": 190.39267558532714,
"y": -61.87783756395649
}
},
"type": "3"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "103929",
"sourcePortID": ""
},
{
"sourceNodeID": "103929",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,291 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "128198",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": 0
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"fcParam": {
"workflowFCParam": {
"workflowList": [
{
"is_draft": false,
"plugin_id": "7502015065143574543",
"plugin_version": "",
"workflow_id": "7492075279843737651",
"workflow_version": "v0.0.1"
}
]
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1706077826",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "doubao·function_call",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "1",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "float",
"value": {
"content": "0.7",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "topP"
},
{
"input": {
"type": "integer",
"value": {
"content": "2",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "integer",
"value": {
"content": "1024",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "use tool whenever possible",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"title": "llm"
},
"outputs": [
{
"name": "output",
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "128198",
"meta": {
"position": {
"x": 513,
"y": -63.5
}
},
"type": "3"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "128198",
"sourcePortID": ""
},
{
"sourceNodeID": "128198",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,291 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "128198",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": 0
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"fcParam": {
"workflowFCParam": {
"workflowList": [
{
"is_draft": false,
"plugin_id": "7502015065143574544",
"plugin_version": "",
"workflow_id": "7492075279843737652",
"workflow_version": "v0.0.1"
}
]
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1706077826",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "doubao·function_call",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "1",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "float",
"value": {
"content": "0.7",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "topP"
},
{
"input": {
"type": "integer",
"value": {
"content": "2",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "integer",
"value": {
"content": "1024",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "use tool whenever possible",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"title": "llm"
},
"outputs": [
{
"name": "output",
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "128198",
"meta": {
"position": {
"x": 513,
"y": -63.5
}
},
"type": "3"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "128198",
"sourcePortID": ""
},
{
"sourceNodeID": "128198",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,341 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{output}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "128198",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": 0
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"fcParam": {
"workflowFCParam": {
"workflowList": [
{
"fc_setting": {
"is_draft": false,
"plugin_id": "7504134755689087002",
"request_params": [
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": false,
"local_default": "default_input",
"local_disable": false,
"location": 3,
"name": "input",
"sub_parameters": [],
"type": 1
}
],
"response_params": [
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": false,
"local_disable": false,
"location": 3,
"name": "any_name",
"sub_parameters": [],
"type": 1
}
],
"response_style": {
"mode": 0
},
"workflow_id": "7492615435881709608",
"workflow_version": "v0.0.1"
},
"is_draft": false,
"plugin_id": "7504134755689087002",
"plugin_version": "",
"workflow_id": "7492615435881709608",
"workflow_version": "v0.0.1"
}
]
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1706077825",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "doubao·function_call",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "1",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "float",
"value": {
"content": "0.7",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "topP"
},
{
"input": {
"type": "integer",
"value": {
"content": "0",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "integer",
"value": {
"content": "1024",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "use tool whenever possible",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"title": "llm"
},
"outputs": [
{
"name": "output",
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "128198",
"meta": {
"position": {
"x": 513,
"y": -63.5
}
},
"type": "3"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "128198",
"sourcePortID": ""
},
{
"sourceNodeID": "128198",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,341 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{output}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "128198",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": 0
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"fcParam": {
"workflowFCParam": {
"workflowList": [
{
"fc_setting": {
"is_draft": false,
"plugin_id": "7504134755689087002",
"request_params": [
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": false,
"local_default": "default_input",
"local_disable": false,
"location": 3,
"name": "input",
"sub_parameters": [],
"type": 1
}
],
"response_params": [
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": false,
"local_disable": false,
"location": 3,
"name": "any_name",
"sub_parameters": [],
"type": 1
}
],
"response_style": {
"mode": 0
},
"workflow_id": "7492615435881709611",
"workflow_version": "v0.0.1"
},
"is_draft": false,
"plugin_id": "7504134755689087002",
"plugin_version": "",
"workflow_id": "7492615435881709611",
"workflow_version": "v0.0.1"
}
]
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1706077827",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "doubao·function_call",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "1",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "float",
"value": {
"content": "0.7",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "topP"
},
{
"input": {
"type": "integer",
"value": {
"content": "0",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "integer",
"value": {
"content": "1024",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "use tool whenever possible",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"title": "llm"
},
"outputs": [
{
"name": "output",
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "128198",
"meta": {
"position": {
"x": 513,
"y": -63.5
}
},
"type": "3"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "128198",
"sourcePortID": ""
},
{
"sourceNodeID": "128198",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,463 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input_i",
"required": false,
"type": "integer"
},
{
"name": "input_f",
"required": false,
"type": "float"
},
{
"name": "obj",
"required": false,
"schema": [
{
"name": "f1",
"required": false,
"type": "boolean"
}
],
"type": "object"
}
],
"trigger_parameters": [
{
"name": "input_i",
"required": false,
"type": "integer"
},
{
"name": "input_f",
"required": false,
"type": "float"
},
{
"name": "obj",
"required": false,
"schema": [
{
"name": "f1",
"required": false,
"type": "boolean"
}
],
"type": "object"
}
]
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "157838",
"name": "Group1",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "126533",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output1"
},
{
"input": {
"type": "boolean",
"value": {
"content": {
"blockID": "157838",
"name": "Group2",
"source": "block-output"
},
"rawMeta": {
"type": 3
},
"type": "ref"
}
},
"name": "Group2"
},
{
"input": {
"schema": [
{
"name": "f1",
"required": false,
"type": "boolean"
}
],
"type": "object",
"value": {
"content": {
"blockID": "100001",
"name": "obj",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "obj"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 844,
"y": -57
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "integer",
"value": {
"content": {
"blockID": "100001",
"name": "input_i",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
{
"type": "float",
"value": {
"content": {
"blockID": "100001",
"name": "input_f",
"source": "block-output"
},
"rawMeta": {
"type": 4
},
"type": "ref"
}
}
]
},
{
"name": "Group2",
"variables": [
{
"type": "boolean",
"value": {
"content": {
"blockID": "100001",
"name": "obj.f1",
"source": "block-output"
},
"rawMeta": {
"type": 3
},
"type": "ref"
}
}
]
},
{
"name": "Group3",
"variables": [
{
"schema": [
{
"name": "f1",
"required": false,
"type": "boolean"
}
],
"type": "object",
"value": {
"content": {
"blockID": "100001",
"name": "obj",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
}
]
}
]
},
"nodeMeta": {
"title": "variable_aggregate"
},
"outputs": [
{
"name": "Group1",
"type": "integer"
},
{
"name": "Group2",
"type": "boolean"
},
{
"name": "Group3",
"schema": [
{
"name": "f1",
"required": false,
"type": "boolean"
}
],
"type": "object"
}
]
},
"edges": null,
"id": "157838",
"meta": {
"position": {
"x": 405.5,
"y": -20.15987378972423
}
},
"type": "32"
},
{
"blocks": [],
"data": {
"inputs": {
"concatParams": [
{
"input": {
"type": "string",
"value": {
"content": "{{String1}} {{String2}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "concatResult"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "arrayItemConcatChar"
},
{
"input": {
"schema": {
"schema": [
{
"name": "label",
"required": true,
"type": "string"
},
{
"name": "value",
"required": true,
"type": "string"
},
{
"name": "isDefault",
"required": true,
"type": "boolean"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": [
{
"isDefault": true,
"label": "newline",
"value": "\n"
},
{
"isDefault": true,
"label": "tab",
"value": "\t"
},
{
"isDefault": true,
"label": "period",
"value": "。"
},
{
"isDefault": true,
"label": "comma",
"value": ""
},
{
"isDefault": true,
"label": "colon",
"value": ""
},
{
"isDefault": true,
"label": "space",
"value": " "
}
],
"type": "literal"
}
},
"name": "allArrayItemConcatChars"
}
],
"inputParameters": [
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "100001",
"name": "input_i",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "String1"
},
{
"input": {
"type": "float",
"value": {
"content": {
"blockID": "100001",
"name": "input_f",
"source": "block-output"
},
"rawMeta": {
"type": 4
},
"type": "ref"
}
},
"name": "String2"
}
],
"method": "concat"
},
"nodeMeta": {
"title": "text_processor"
},
"outputs": [
{
"name": "output",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "126533",
"meta": {
"position": {
"x": 415.06249529748254,
"y": 242.352768637841
}
},
"type": "15"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "157838",
"sourcePortID": ""
},
{
"sourceNodeID": "100001",
"targetNodeID": "126533",
"sourcePortID": ""
},
{
"sourceNodeID": "157838",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "126533",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,663 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": -136,
"y": 2
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "this is the streaming output {{any_name}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "188288",
"name": "Group1",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "any_name"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 1172,
"y": -249
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"left": {},
"name": "input",
"right": {}
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1706077826",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"left": {},
"name": "modelType",
"right": {}
},
{
"input": {
"type": "string",
"value": {
"content": "doubao·function_call",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"left": {},
"name": "modleName",
"right": {}
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"left": {},
"name": "generationDiversity",
"right": {}
},
{
"input": {
"type": "float",
"value": {
"content": "1",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"left": {},
"name": "temperature",
"right": {}
},
{
"input": {
"type": "float",
"value": {
"content": "0.7",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"left": {},
"name": "topP",
"right": {}
},
{
"input": {
"type": "integer",
"value": {
"content": "0",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"left": {},
"name": "responseFormat",
"right": {}
},
{
"input": {
"type": "integer",
"value": {
"content": "1024",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"left": {},
"name": "maxTokens",
"right": {}
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"left": {},
"name": "prompt",
"right": {}
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"left": {},
"name": "enableChatHistory",
"right": {}
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"left": {},
"name": "chatHistoryRound",
"right": {}
},
{
"input": {
"type": "string",
"value": {
"content": "",
"dependencies": {
"variables": null
},
"inputMode": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"left": {},
"name": "systemPrompt",
"right": {}
}
],
"settingOnError": {
"dataOnErr": "{\n \"output\": \"\"\n}",
"processType": 1,
"switch": false,
"timeoutMs": 600000
}
},
"nodeMeta": {
"title": "llm"
},
"outputs": [
{
"input": {},
"name": "output",
"required": false,
"type": "string"
}
],
"settings": null,
"version": "3"
},
"edges": null,
"id": "140999",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 443,
"y": -179.7
}
},
"type": "3"
},
{
"blocks": [],
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"content": {
"blockID": "133819",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
{
"type": "string",
"value": {
"content": {
"blockID": "140999",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
}
]
}
]
},
"nodeMeta": {
"title": "variable aggregator"
},
"outputs": [
{
"name": "Group1",
"type": "string"
}
]
},
"edges": null,
"id": "188288",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 954,
"y": 66.84999999999997
}
},
"type": "32"
},
{
"blocks": [],
"data": {
"inputs": {
"branches": [
{
"condition": {
"conditions": [
{
"left": {
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"type": "ref"
}
}
},
"operator": 3,
"right": {
"input": {
"type": "integer",
"value": {
"content": 3,
"rawMeta": {
"type": 2
},
"type": "literal"
}
}
}
}
],
"logic": 2
}
}
]
},
"nodeMeta": {
"title": "selector"
}
},
"edges": null,
"id": "182113",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 291,
"y": 55.84999999999999
}
},
"type": "8"
},
{
"blocks": [],
"data": {
"inputs": {
"concatParams": [
{
"input": {
"type": "string",
"value": {
"content": "{{String1}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "concatResult"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "arrayItemConcatChar"
},
{
"input": {
"schema": {
"schema": [
{
"name": "label",
"required": true,
"type": "string"
},
{
"name": "value",
"required": true,
"type": "string"
},
{
"name": "isDefault",
"required": true,
"type": "boolean"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": [
{
"isDefault": true,
"label": "newline",
"value": "\n"
},
{
"isDefault": true,
"label": "tab",
"value": "\t"
},
{
"isDefault": true,
"label": "period",
"value": "。"
},
{
"isDefault": true,
"label": "comma",
"value": ""
},
{
"isDefault": true,
"label": "colon",
"value": ""
},
{
"isDefault": true,
"label": "space",
"value": " "
}
],
"type": "literal"
}
},
"name": "allArrayItemConcatChars"
}
],
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "String1"
}
],
"method": "concat"
},
"nodeMeta": {
"title": "text_processor"
},
"outputs": [
{
"name": "output",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "133819",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 554,
"y": 361.85
}
},
"type": "15"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "182113",
"sourcePortID": ""
},
{
"sourceNodeID": "188288",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "182113",
"targetNodeID": "140999",
"sourcePortID": "true"
},
{
"sourceNodeID": "140999",
"targetNodeID": "188288",
"sourcePortID": ""
},
{
"sourceNodeID": "133819",
"targetNodeID": "188288",
"sourcePortID": ""
},
{
"sourceNodeID": "182113",
"targetNodeID": "133819",
"sourcePortID": "false"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,275 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "USER_INPUT",
"required": false,
"type": "string"
},
{
"defaultValue": "Default",
"description": "本次请求绑定的会话,会自动写入消息、会从该会话读对话历史。",
"name": "CONVERSATION_NAME",
"required": false,
"type": "string"
},
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "options",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
],
"settings": null,
"trigger_parameters": [
{
"name": "USER_INPUT",
"required": false,
"type": "string"
},
{
"description": "本次请求绑定的会话,会自动写入消息、会从该会话读对话历史。",
"name": "CONVERSATION_NAME",
"required": false,
"type": "string"
},
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "options",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
],
"version": ""
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 1,
"y": 1.4210854715202004e-14
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "the name is {{name}}, age is {{age}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "135279",
"name": "USER_RESPONSE",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "USER_RESPONSE"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "135279",
"name": "name",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "name"
},
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "135279",
"name": "age",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "age"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": -12.999999999999986
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"answer_type": "text",
"dynamic_option": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "options",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"extra_output": true,
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"type": "ref"
}
},
"name": "input"
}
],
"limit": 3,
"llmParam": {
"generationDiversity": "default_val",
"maxTokens": 1024,
"modelName": "豆包·工具调用",
"modelType": 1706077826,
"responseFormat": 2,
"systemPrompt": "be helpful and kind {{input}}",
"temperature": 1,
"topP": 0.7
},
"option_type": "dynamic",
"options": [
{
"name": "北京"
},
{
"name": "上海"
}
],
"question": "{{input}}"
},
"nodeMeta": {
"description": "支持中间向用户提问问题,支持预置选项提问和开放式问题提问两种方式",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Direct-Question-v2.jpg",
"mainColor": "#3071F2",
"subTitle": "问答",
"title": "问答"
},
"outputs": [
{
"description": "用户本轮对话输入内容",
"name": "USER_RESPONSE",
"required": true,
"type": "string"
},
{
"name": "name",
"required": true,
"type": "string"
},
{
"name": "age",
"required": true,
"type": "integer"
}
]
},
"edges": null,
"id": "135279",
"meta": {
"position": {
"x": 448.2344262295082,
"y": -51.65409836065572
}
},
"type": "18"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "135279",
"sourcePortID": ""
},
{
"sourceNodeID": "135279",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,112 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 169,
"y": -320.7
}
},
"data": {
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "start"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "string",
"name": "e",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "string",
"name": "e",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 713,
"y": -289.7
}
},
"data": {
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "end"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "e",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "e"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,134 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 236,
"y": -246.7
}
},
"data": {
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "start"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "string",
"name": "e",
"required": true
},
{
"type": "string",
"name": "t",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "string",
"name": "e",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 858,
"y": -286.7
}
},
"data": {
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "end"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "e",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "e"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "t",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "t"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,463 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -399,
"y": 11
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "token",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "token",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 548.3661971830986,
"y": -101
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": 30.908450704225352,
"y": -91.89552609776305
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "GET",
"url": "http://127.0.0.1:8080/bear_auth_no_body\n"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "token"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "key2",
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": true,
"authType": "BEARER_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "literal",
"content": "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/3696c03906ac4ac89363a607c5c92ac8.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776428599&x-signature=lZgxiBlK7BHWykF%2BPVBwYCvJoA4%3D",
"rawMeta": {
"fileName": "Untitled (1).pdf",
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v3",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"assistType": 3,
"value": {
"type": "literal",
"content": "https://p9-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/58bba95700564e5fb21dbd6e00c5a0fc.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776424241&x-signature=agADk8ia79cvDXcfrQ2OhAjuqo8%3D",
"rawMeta": {
"fileName": "Untitled.pdf",
"type": 9
}
}
}
}
],
"typeMapping": "{\"v1\":{\"basicType\":\"string\"},\"v2\":{\"basicType\":\"string\"},\"v3\":{}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\":\"1\",\n \"v2\":{{block_output_100001.input}}\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "EMPTY"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h3",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {
"settingOnErrorIsOpen": false,
"settingOnErrorJSON": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,460 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -436.21541010770505,
"y": -176.54275062137532
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"assistType": 1,
"name": "file",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"assistType": 1,
"name": "file",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 548.3661971830986,
"y": -101
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": -11.108947804473907,
"y": -247.61292460646234
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "POST",
"url": "http://127.0.0.1:8080/custom_auth_file_body"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_value"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": true,
"authType": "CUSTOM_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "file"
},
"rawMeta": {
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "key_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "file"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "file_v1",
"input": {
"type": "string",
"assistType": 1,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v2"
},
"rawMeta": {
"type": 8
}
}
}
}
],
"typeMapping": "{\"key_v1\":{\"basicType\":\"string\"},\"file_v1\":{\"basicType\":\"string\"}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "file"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\": \"1\",\n \"v2\": \"{{block_output_100001.json_key}}\"\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "BINARY"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {
"settingOnErrorIsOpen": false,
"settingOnErrorJSON": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,489 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -491.43827671913834,
"y": -110.51541010770507
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"name": "form_key_v1",
"required": true
},
{
"type": "string",
"assistType": 1,
"name": "form_key_v2",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"name": "form_key_v1",
"required": true
},
{
"type": "string",
"assistType": 1,
"name": "form_key_v2",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 548.3661971830986,
"y": -101
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": -35.11888980944491,
"y": -177.13082021541013
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "POST",
"url": "http://127.0.0.1:8080/custom_auth_form_data_body\n"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_value"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": true,
"authType": "CUSTOM_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "literal",
"content": "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/3696c03906ac4ac89363a607c5c92ac8.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776428599&x-signature=lZgxiBlK7BHWykF%2BPVBwYCvJoA4%3D",
"rawMeta": {
"fileName": "Untitled (1).pdf",
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "key_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_key_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "file_v1",
"input": {
"type": "string",
"assistType": 1,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_key_v2"
},
"rawMeta": {
"type": 8
}
}
}
}
],
"typeMapping": "{\"key_v1\":{\"basicType\":\"string\"},\"file_v1\":{\"basicType\":\"string\"}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\": \"1\",\n \"v2\": \"{{block_output_100001.json_key}}\"\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "FORM_DATA"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h3",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {
"settingOnErrorIsOpen": false,
"settingOnErrorJSON": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,465 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -491.43827671913834,
"y": -110.51541010770507
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"name": "form_url_v1",
"required": true
},
{
"type": "string",
"name": "form_url_v2",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"name": "form_url_v1",
"required": true
},
{
"type": "string",
"name": "form_url_v2",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 548.3661971830986,
"y": -101
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": -29.116404308202156,
"y": -216.40000000000003
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "POST",
"url": "http://127.0.0.1:8080/custom_auth_form_url_body\n"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_value"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": true,
"authType": "CUSTOM_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "literal",
"content": "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/3696c03906ac4ac89363a607c5c92ac8.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776428599&x-signature=lZgxiBlK7BHWykF%2BPVBwYCvJoA4%3D",
"rawMeta": {
"fileName": "Untitled (1).pdf",
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "key_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "file_v1",
"input": {
"type": "string",
"assistType": 1,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v2"
},
"rawMeta": {
"type": 8
}
}
}
}
],
"typeMapping": "{\"key_v1\":{\"basicType\":\"string\"},\"file_v1\":{\"basicType\":\"string\"}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\": \"1\",\n \"v2\": \"{{block_output_100001.json_key}}\"\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "FORM_URLENCODED"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {
"settingOnErrorIsOpen": false,
"settingOnErrorJSON": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,487 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -399,
"y": 11
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"name": "json_key",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
},
{
"type": "string",
"name": "json_key",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 548.3661971830986,
"y": -101
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": -51.92584921292461,
"y": -139.91541010770507
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "POST",
"url": "http://127.0.0.1:8080/custom_auth_json_body\n"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_value"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": true,
"authType": "CUSTOM_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "literal",
"content": "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/3696c03906ac4ac89363a607c5c92ac8.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776428599&x-signature=lZgxiBlK7BHWykF%2BPVBwYCvJoA4%3D",
"rawMeta": {
"fileName": "Untitled (1).pdf",
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v3",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"assistType": 3,
"value": {
"type": "literal",
"content": "https://p9-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/58bba95700564e5fb21dbd6e00c5a0fc.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776424241&x-signature=agADk8ia79cvDXcfrQ2OhAjuqo8%3D",
"rawMeta": {
"fileName": "Untitled.pdf",
"type": 9
}
}
}
}
],
"typeMapping": "{\"v1\":{\"basicType\":\"string\"},\"v2\":{\"basicType\":\"string\"},\"v3\":{}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\": \"1\",\n \"v2\": \"{{block_output_100001.json_key}}\"\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "JSON"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h3",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {
"settingOnErrorIsOpen": false,
"settingOnErrorJSON": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,477 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -399,
"y": 11
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 548.3661971830986,
"y": -101
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": 39.3119304059652,
"y": -52.279121789560904
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "GET",
"url": "http://127.0.0.1:8080/custom_auth_no_body\n"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_value"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": true,
"authType": "CUSTOM_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "literal",
"content": "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/3696c03906ac4ac89363a607c5c92ac8.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776428599&x-signature=lZgxiBlK7BHWykF%2BPVBwYCvJoA4%3D",
"rawMeta": {
"fileName": "Untitled (1).pdf",
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v3",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"assistType": 3,
"value": {
"type": "literal",
"content": "https://p9-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/58bba95700564e5fb21dbd6e00c5a0fc.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776424241&x-signature=agADk8ia79cvDXcfrQ2OhAjuqo8%3D",
"rawMeta": {
"fileName": "Untitled.pdf",
"type": 9
}
}
}
}
],
"typeMapping": "{\"v1\":{\"basicType\":\"string\"},\"v2\":{\"basicType\":\"string\"},\"v3\":{}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\":\"1\",\n \"v2\":{{block_output_100001.input}}\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "EMPTY"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h3",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {
"settingOnErrorIsOpen": false,
"settingOnErrorJSON": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,465 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -436.21541010770505,
"y": -176.54275062137532
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
},
{
"type": "string",
"name": "auth_key",
"required": true
},
{
"type": "string",
"name": "auth_value",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 586.7821043910523,
"y": -147.81938690969343
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": 51.3169014084507,
"y": -250.01391880695945
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "POST",
"url": "http://127.0.0.1:8080/http_error"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_key"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "auth_value"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": true,
"authType": "CUSTOM_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "file"
},
"rawMeta": {
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "key_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "file"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "file_v1",
"input": {
"type": "string",
"assistType": 1,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v2"
},
"rawMeta": {
"type": 8
}
}
}
}
],
"typeMapping": "{\"key_v1\":{\"basicType\":\"string\"},\"file_v1\":{\"basicType\":\"string\"}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "file"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "form_url_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\": \"1\",\n \"v2\": \"{{block_output_100001.json_key}}\"\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "EMPTY"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": true,
"dataOnErr": "{\n \"body\": \"v1\",\n \"statusCode\": 400,\n \"headers\": \"error_header\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
},
{
"type": "object",
"name": "errorBody",
"schema": [
{
"type": "string",
"name": "errorMessage",
"readonly": true
},
{
"type": "string",
"name": "errorCode",
"readonly": true
}
],
"readonly": true
}
],
"settingOnError": {
"settingOnErrorIsOpen": true,
"settingOnErrorJSON": "{\n \"body\": \"v1\",\n \"statusCode\": 400,\n \"headers\": \"error_header\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,189 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 139.6613358419567,
"y": -44.89266227657572
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": true
},
{
"type": "object",
"name": "m",
"schema": [
{
"type": "string",
"name": "m1",
"required": true
}
],
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": true
},
{
"type": "object",
"name": "m",
"schema": [
{
"type": "string",
"name": "m1",
"required": true
}
],
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1100,
"y": 12.700000000000003
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "115927",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "115927",
"type": "45",
"meta": {
"position": {
"x": 640,
"y": 0
}
},
"data": {
"nodeMeta": {
"title": "HTTP 请求",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"description": "用于发送API请求从接口返回数据",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "GET",
"url": "http://echo.apifox.com/anything?var={{block_output_100001.input}}&var2={{block_output_100001.m.m1}}"
},
"body": {
"bodyType": "RAW_TEXT",
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "",
"name": ""
}
}
}
},
"rawText": "{{block_output_100001.input}}"
}
},
"headers": [],
"params": [],
"auth": {
"authType": "BEARER_AUTH",
"authData": {
"customData": {
"addTo": "header"
}
},
"authOpen": false
},
"setting": {
"timeout": 120,
"retryTimes": 3
},
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "115927"
},
{
"sourceNodeID": "115927",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,449 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -399,
"y": 11
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": true
},
{
"type": "string",
"name": "v2",
"required": true
},
{
"type": "string",
"name": "h_v1",
"required": true
},
{
"type": "string",
"name": "h_v2",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 548.3661971830986,
"y": -101
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "body",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "117004",
"name": "body"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117004",
"type": "45",
"meta": {
"position": {
"x": 9.299502899751452,
"y": -102.7
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "GET",
"url": "http://127.0.0.1:8080/no_auth_no_body\n"
},
"auth": {
"authData": {
"bearerTokenData": [
{
"name": "token",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "vvvvvv",
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
],
"customData": {
"addTo": "query",
"data": [
{
"name": "Key",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
},
"type": "string"
},
{
"name": "Value",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "key2",
"rawMeta": {
"type": 1
}
}
},
"type": "string"
}
]
}
},
"authOpen": false,
"authType": "CUSTOM_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"assistType": 1,
"value": {
"type": "literal",
"content": "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/3696c03906ac4ac89363a607c5c92ac8.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776428599&x-signature=lZgxiBlK7BHWykF%2BPVBwYCvJoA4%3D",
"rawMeta": {
"fileName": "Untitled (1).pdf",
"type": 8
}
}
}
},
"formData": {
"data": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v3",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"assistType": 3,
"value": {
"type": "literal",
"content": "https://p9-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/58bba95700564e5fb21dbd6e00c5a0fc.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505&x-expires=1776424241&x-signature=agADk8ia79cvDXcfrQ2OhAjuqo8%3D",
"rawMeta": {
"fileName": "Untitled.pdf",
"type": 9
}
}
}
}
],
"typeMapping": "{\"v1\":{\"basicType\":\"string\"},\"v2\":{\"basicType\":\"string\"},\"v3\":{}}"
},
"formURLEncoded": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v3",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"json": "{\n \"v1\":\"1\",\n \"v2\":{{block_output_100001.input}}\n}",
"rawText": "{{block_output_100001.input}}"
},
"bodyType": "EMPTY"
},
"headers": [
{
"name": "h1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "h_v2"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "h3",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "query_v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "query_v2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {
"settingOnErrorIsOpen": false,
"settingOnErrorJSON": "{\n \"body\": \"xxxx\",\n \"statusCode\": 0,\n \"headers\": \"\"\n}"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117004"
},
{
"sourceNodeID": "117004",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,196 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"schema": [
{
"name": "name",
"required": false,
"type": "string"
},
{
"name": "age",
"required": false,
"type": "integer"
}
],
"type": "object",
"value": {
"content": {
"blockID": "191011",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"schema": {
"schema": [
{
"name": "name",
"required": false,
"type": "string"
},
{
"name": "age",
"required": false,
"type": "integer"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": {
"blockID": "191011",
"name": "input_list",
"source": "block-output"
},
"rawMeta": {
"type": 103
},
"type": "ref"
}
},
"name": "output_list"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 978.9666666666667,
"y": -13
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"outputSchema": "[{\"type\":\"object\",\"name\":\"input\",\"schema\":[{\"type\":\"string\",\"name\":\"name\",\"required\":false},{\"type\":\"integer\",\"name\":\"age\",\"required\":false}],\"required\":false},{\"type\":\"list\",\"name\":\"input_list\",\"schema\":{\"type\":\"object\",\"schema\":[{\"type\":\"string\",\"name\":\"name\",\"required\":false},{\"type\":\"integer\",\"name\":\"age\",\"required\":false}]},\"required\":false}]"
},
"nodeMeta": {
"description": "支持中间过程的信息输入",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Input-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "输入",
"title": "输入"
},
"outputs": [
{
"name": "input",
"required": false,
"schema": [
{
"name": "name",
"required": false,
"type": "string"
},
{
"name": "age",
"required": false,
"type": "integer"
}
],
"type": "object"
},
{
"name": "input_list",
"required": false,
"schema": {
"schema": [
{
"name": "name",
"required": false,
"type": "string"
},
{
"name": "age",
"required": false,
"type": "integer"
}
],
"type": "object"
},
"type": "list"
}
]
},
"edges": null,
"id": "191011",
"meta": {
"position": {
"x": 489.4833333333333,
"y": -0.7000000000000028
}
},
"type": "30"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "191011",
"sourcePortID": ""
},
{
"sourceNodeID": "191011",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,192 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 180,
"y": 13
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "154951",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "154951",
"name": "obj.field1",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "field1"
},
{
"input": {
"schema": {
"type": "float"
},
"type": "list",
"value": {
"content": {
"blockID": "154951",
"name": "inputArr",
"source": "block-output"
},
"rawMeta": {
"type": 102
},
"type": "ref"
}
},
"name": "inputArr"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 1100,
"y": 0
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"outputSchema": "[{\"type\":\"string\",\"name\":\"input\",\"required\":false},{\"type\":\"object\",\"name\":\"obj\",\"schema\":[{\"type\":\"string\",\"name\":\"field1\",\"required\":false}],\"required\":false},{\"type\":\"list\",\"name\":\"inputArr\",\"schema\":{\"type\":\"float\"},\"required\":false}]"
},
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Input-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "input",
"title": "input"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "obj",
"required": false,
"schema": [
{
"name": "field1",
"required": false,
"type": "string"
}
],
"type": "object"
},
{
"name": "inputArr",
"required": false,
"schema": {
"type": "float"
},
"type": "list"
}
]
},
"edges": null,
"id": "154951",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 640,
"y": 12.299999999999997
}
},
"type": "30"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "154951",
"sourcePortID": ""
},
{
"sourceNodeID": "154951",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,269 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -77.18889374023964,
"y": -123.60755114231446
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 973.4968298059847,
"y": -47.00225168152875
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "float",
"name": "v2"
}
]
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "183043",
"name": "outputList"
},
"rawMeta": {
"type": 103
}
}
}
},
{
"name": "number",
"input": {
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "183043",
"name": "rowNum"
},
"rawMeta": {
"type": 2
}
}
}
}
]
}
}
},
{
"id": "141102",
"type": "22",
"meta": {
"position": {
"x": 399.5072203278145,
"y": -174.30755114231448
}
},
"data": {
"nodeMeta": {
"description": "用于用户输入的意图识别,并将其与预设意图选项进行匹配。",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Intent-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "意图识别",
"title": "意图识别"
},
"outputs": [
{
"type": "integer",
"name": "classificationId"
},
{
"type": "string",
"name": "reason"
}
],
"inputs": {
"chatHistorySetting": {
"enableChatHistory": false,
"chatHistoryRound": 3
},
"inputParameters": [
{
"name": "query",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"llmParam": {
"generationDiversity": "creative",
"maxTokens": 4096,
"modelName": "豆包·1.5·Lite·32k",
"modelType": 1741232583,
"prompt": {
"type": "string",
"value": {
"type": "literal",
"content": "{{query}}"
}
},
"responseFormat": 2,
"temperature": 1,
"systemPrompt": {
"type": "string",
"value": {
"type": "literal",
"content": ""
}
},
"enableChatHistory": false,
"chatHistoryRound": 3
},
"intents": [
{
"name": "v1"
}
],
"mode": "all"
}
}
},
{
"id": "183043",
"type": "12",
"meta": {
"position": {
"x": 952.7581491531417,
"y": -245.69813645629364
}
},
"data": {
"nodeMeta": {
"description": "基于用户自定义的 SQL 完成对数据库的增删改查操作",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Database-v2.jpg",
"mainColor": "#FF811A",
"subTitle": "SQL自定义",
"title": "SQL自定义"
},
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7478954112676282405"
}
],
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "141102",
"name": "reason"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"sql": "select v2 from v1"
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": [
{
"type": "float",
"name": "v2"
}
]
}
},
{
"type": "integer",
"name": "rowNum"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "141102"
},
{
"sourceNodeID": "183043",
"targetNodeID": "900001"
},
{
"sourceNodeID": "141102",
"targetNodeID": "900001",
"sourcePortID": "default"
},
{
"sourceNodeID": "141102",
"targetNodeID": "183043",
"sourcePortID": "branch_0"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,233 @@
{
"nodes": [{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [{
"name": "person",
"required": true,
"schema": [{
"name": "int",
"required": false,
"type": "integer"
}, {
"name": "string",
"required": false,
"type": "string"
}, {
"name": "bool",
"required": false,
"type": "boolean"
}],
"type": "object"
}],
"trigger_parameters": [{
"name": "person",
"required": true,
"schema": [{
"name": "int",
"required": false,
"type": "integer"
}, {
"name": "string",
"required": false,
"type": "string"
}, {
"name": "bool",
"required": false,
"type": "boolean"
}],
"type": "object"
}]
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
}, {
"blocks": [],
"data": {
"inputs": {
"inputParameters": [{
"input": {
"schema": [{
"name": "int",
"type": "integer"
}, {
"name": "string",
"type": "string"
}, {
"name": "bool",
"type": "boolean"
}],
"type": "object",
"value": {
"content": {
"blockID": "179566",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "output"
}],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": 0
}
},
"type": "2"
}, {
"blocks": [],
"data": {
"inputs": {
"inputParameters": [{
"input": {
"schema": [{
"name": "int",
"required": false,
"type": "integer"
}, {
"name": "string",
"required": false,
"type": "string"
}, {
"name": "bool",
"required": false,
"type": "boolean"
}],
"type": "object",
"value": {
"content": {
"blockID": "100001",
"name": "person",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "input"
}]
},
"nodeMeta": {
"description": "用于把变量转化为JSON字符串",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-to_json.png",
"mainColor": "#F2B600",
"subTitle": "JSON 序列化",
"title": "JSON 序列化"
},
"outputs": [{
"name": "output",
"type": "string"
}]
},
"edges": null,
"id": "112049",
"meta": {
"position": {
"x": 467,
"y": -132
}
},
"type": "58"
}, {
"blocks": [],
"data": {
"inputs": {
"inputParameters": [{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "112049",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}]
},
"nodeMeta": {
"description": "用于把JSON字符串转化为变量",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-from_json.png",
"mainColor": "#F2B600",
"subTitle": "JSON 反序列化",
"title": "JSON 反序列化"
},
"outputs": [{
"name": "output",
"schema": [{
"name": "int",
"type": "integer"
}, {
"name": "string",
"type": "string"
}, {
"name": "bool",
"type": "boolean"
}],
"type": "object"
}]
},
"edges": null,
"id": "179566",
"meta": {
"position": {
"x": 547,
"y": 104
}
},
"type": "59"
}],
"edges": [{
"sourceNodeID": "100001",
"targetNodeID": "112049",
"sourcePortID": ""
}, {
"sourceNodeID": "179566",
"targetNodeID": "900001",
"sourcePortID": ""
}, {
"sourceNodeID": "112049",
"targetNodeID": "179566",
"sourcePortID": ""
}],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,233 @@
{
"nodes": [{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [{
"name": "person",
"required": true,
"schema": [{
"name": "int",
"required": false,
"type": "integer"
}, {
"name": "string",
"required": false,
"type": "string"
}, {
"name": "bool",
"required": false,
"type": "boolean"
}],
"type": "object"
}],
"trigger_parameters": [{
"name": "person",
"required": true,
"schema": [{
"name": "int",
"required": false,
"type": "integer"
}, {
"name": "string",
"required": false,
"type": "string"
}, {
"name": "bool",
"required": false,
"type": "boolean"
}],
"type": "object"
}]
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
}, {
"blocks": [],
"data": {
"inputs": {
"inputParameters": [{
"input": {
"schema": [{
"name": "int",
"type": "boolean"
}, {
"name": "string",
"type": "string"
}, {
"name": "bool",
"type": "boolean"
}],
"type": "object",
"value": {
"content": {
"blockID": "179566",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "output"
}],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": 0
}
},
"type": "2"
}, {
"blocks": [],
"data": {
"inputs": {
"inputParameters": [{
"input": {
"schema": [{
"name": "int",
"required": false,
"type": "integer"
}, {
"name": "string",
"required": false,
"type": "string"
}, {
"name": "bool",
"required": false,
"type": "boolean"
}],
"type": "object",
"value": {
"content": {
"blockID": "100001",
"name": "person",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "input"
}]
},
"nodeMeta": {
"description": "用于把变量转化为JSON字符串",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-to_json.png",
"mainColor": "#F2B600",
"subTitle": "JSON 序列化",
"title": "JSON 序列化"
},
"outputs": [{
"name": "output",
"type": "string"
}]
},
"edges": null,
"id": "112049",
"meta": {
"position": {
"x": 467,
"y": -132
}
},
"type": "58"
}, {
"blocks": [],
"data": {
"inputs": {
"inputParameters": [{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "112049",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}]
},
"nodeMeta": {
"description": "用于把JSON字符串转化为变量",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-from_json.png",
"mainColor": "#F2B600",
"subTitle": "JSON 反序列化",
"title": "JSON 反序列化"
},
"outputs": [{
"name": "output",
"schema": [{
"name": "int",
"type": "boolean"
}, {
"name": "string",
"type": "string"
}, {
"name": "bool",
"type": "boolean"
}],
"type": "object"
}]
},
"edges": null,
"id": "179566",
"meta": {
"position": {
"x": 547,
"y": 104
}
},
"type": "59"
}],
"edges": [{
"sourceNodeID": "100001",
"targetNodeID": "112049",
"sourcePortID": ""
}, {
"sourceNodeID": "179566",
"targetNodeID": "900001",
"sourcePortID": ""
}, {
"sourceNodeID": "112049",
"targetNodeID": "179566",
"sourcePortID": ""
}],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,427 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 26.700000000000003
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"assistType": 3,
"name": "file",
"required": true
},
{
"type": "string",
"name": "v1",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"assistType": 3,
"name": "file",
"required": true
},
{
"type": "string",
"name": "v1",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2020,
"y": 13.700000000000003
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "success",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "output"
}
]
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "102426",
"name": "outputList"
},
"rawMeta": {
"type": 103
}
}
}
},
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "191672",
"type": "27",
"meta": {
"position": {
"x": 1100,
"y": 0
}
},
"data": {
"nodeMeta": {
"title": "知识库写入",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-KnowledgeWriting-v2.jpg",
"description": "写入节点可以添加 文本类型 的知识库,仅可以添加一个知识库",
"mainColor": "#FF811A",
"subTitle": "知识库写入"
},
"outputs": [
{
"type": "string",
"name": "documentId"
},
{
"type": "string",
"name": "fileName"
},
{
"type": "string",
"name": "fileUrl"
}
],
"inputs": {
"inputParameters": [
{
"name": "knowledge",
"input": {
"type": "string",
"assistType": 1,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "file"
},
"rawMeta": {
"type": 8
}
}
}
}
],
"datasetParam": [
{
"name": "datasetList",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "literal",
"content": [
"7480093452068470793"
]
}
}
}
],
"strategyParam": {
"parsingStrategy": {
"parsingType": "accurate",
"imageExtraction": true,
"tableExtraction": true,
"imageOcr": false
},
"chunkStrategy": {
"chunkType": "custom",
"separatorType": "\n",
"separator": "\n",
"maxToken": 800,
"overlap": 0.1
},
"indexStrategy": {}
}
}
}
},
{
"id": "102426",
"type": "6",
"meta": {
"position": {
"x": 1560,
"y": 0
}
},
"data": {
"nodeMeta": {
"title": "知识库检索",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-KnowledgeQuery-v2.jpg",
"description": "在选定的知识中,根据输入变量召回最匹配的信息,并以列表形式返回",
"mainColor": "#FF811A",
"subTitle": "知识库检索"
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"inputs": {
"datasetParam": [
{
"name": "datasetList",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "literal",
"content": [
"7480093452068470793",
"7480093452068438025"
]
}
}
},
{
"name": "topK",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 5
}
}
},
{
"name": "useRerank",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "useRewrite",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "isPersonalOnly",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "minScore",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": 0.5
}
}
},
{
"name": "strategy",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 1
}
}
}
],
"inputParameters": [
{
"name": "Query",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "我想要附近的美食信息",
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "116428",
"type": "40",
"meta": {
"position": {
"x": 640,
"y": -23.98854337152209
}
},
"data": {
"nodeMeta": {
"title": "变量赋值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/Variable.jpg",
"description": "用于给支持写入的变量赋值,包括应用变量、用户变量",
"mainColor": "#FF811A",
"subTitle": "变量赋值"
},
"inputs": {
"inputParameters": [
{
"name": "app_v1",
"left": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_v1"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"variableTypeMap": {
"app_v1": "global_variable_app"
}
},
"outputs": [
{
"name": "isSuccess",
"type": "boolean"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "116428"
},
{
"sourceNodeID": "102426",
"targetNodeID": "900001"
},
{
"sourceNodeID": "116428",
"targetNodeID": "191672"
},
{
"sourceNodeID": "191672",
"targetNodeID": "102426"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,277 @@
{
"nodes": [{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [{
"name": "input",
"required": false,
"type": "string"
}],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
}, {
"blocks": [],
"data": {
"inputs": {
"inputParameters": [{
"input": {
"type": "boolean",
"value": {
"content": {
"blockID": "196335",
"name": "isSuccess",
"source": "block-output"
},
"rawMeta": {
"type": 3
},
"type": "ref"
}
},
"name": "output"
}],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": 0
}
},
"type": "2"
}, {
"blocks": [],
"data": {
"inputs": {
"datasetParam": [{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": ["7519861718982361099"],
"type": "literal"
}
},
"name": "datasetList"
}, {
"input": {
"type": "integer",
"value": {
"content": 0,
"type": "literal"
}
},
"name": "datasetType"
}, {
"input": {
"schema": {
"schema": [{
"name": "datasetID",
"type": "string"
}, {
"name": "volcanoServiceID",
"type": "string"
}],
"type": "object"
},
"type": "list",
"value": {
"content": [],
"type": "literal"
}
},
"name": "VolcanoInfoList"
}],
"inputParameters": [{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "110594",
"name": "documentId",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "documentID"
}]
},
"nodeMeta": {
"description": "用于删除知识库中的文档",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icons-dataset-delete.png",
"mainColor": "#FF811A",
"subTitle": "知识库删除",
"title": "知识库删除"
},
"outputs": [{
"name": "isSuccess",
"type": "boolean"
}]
},
"edges": null,
"id": "196335",
"meta": {
"position": {
"x": 484,
"y": -388
}
},
"type": "60"
}, {
"blocks": [],
"data": {
"inputs": {
"actionType": 0,
"datasetParam": [{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": ["7519861718982361099"],
"type": "literal"
}
},
"name": "datasetList"
}, {
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"fileName": ""
},
"type": "literal"
}
},
"name": "documentID"
}, {
"input": {
"type": "integer",
"value": {
"content": 0,
"type": "literal"
}
},
"name": "datasetType"
}, {
"input": {
"schema": {
"schema": [{
"name": "datasetID",
"type": "string"
}, {
"name": "volcanoServiceID",
"type": "string"
}],
"type": "object"
},
"type": "list",
"value": {
"content": [],
"type": "literal"
}
},
"name": "VolcanoInfoList"
}],
"inputParameters": [{
"input": {
"assistType": 1,
"type": "string",
"value": {
"content": "https://p26-bot-workflow-sign.byteimg.com/tos-cn-i-mdko3gqilj/5264fa1295da4a6483cd236b1316c454.pdf~tplv-mdko3gqilj-image.image?rk3s=81d4c505\u0026x-expires=1782379180\u0026x-signature=mlaXPIk9VJjOXu87xGaRmNRg9%2BA%3D\u0026x-wf-file_name=1706.03762v7.pdf",
"rawMeta": {
"fileName": "1706.03762v7.pdf",
"type": 8
},
"type": "literal"
}
},
"name": "knowledge"
}],
"strategyParam": {
"chunkStrategy": {
"chunkType": "default"
},
"indexStrategy": {},
"parsingStrategy": {
"parsingType": "fast"
}
}
},
"nodeMeta": {
"description": "写入节点可以添加 文本类型 的知识库,仅可以添加一个知识库",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-KnowledgeWriting-v2.jpg",
"mainColor": "#FF811A",
"subTitle": "知识库写入",
"title": "知识库写入"
},
"outputs": [{
"name": "documentId",
"type": "string"
}, {
"name": "fileName",
"type": "string"
}, {
"name": "fileUrl",
"type": "string"
}]
},
"edges": null,
"id": "110594",
"meta": {
"position": {
"x": 508,
"y": -68.5
}
},
"type": "27"
}],
"edges": [{
"sourceNodeID": "100001",
"targetNodeID": "110594",
"sourcePortID": ""
}, {
"sourceNodeID": "196335",
"targetNodeID": "900001",
"sourcePortID": ""
}, {
"sourceNodeID": "110594",
"targetNodeID": "196335",
"sourcePortID": ""
}],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,400 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -236,
"y": -434
}
},
"data": {
"outputs": [
{
"type": "string",
"name": "e",
"required": true
}
],
"nodeMeta": {
"title": "开始",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"mainColor": "#5C62FF",
"subTitle": ""
},
"trigger_parameters": [
{
"type": "string",
"name": "e",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 712,
"y": -434
}
},
"data": {
"nodeMeta": {
"title": "结束",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"mainColor": "#5C62FF",
"subTitle": ""
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "e"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "120238",
"type": "3",
"meta": {
"position": {
"x": 219,
"y": -513.4
}
},
"data": {
"nodeMeta": {
"title": "大模型",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"description": "调用大语言模型,使用变量和提示词生成回复",
"mainColor": "#5C62FF",
"subTitle": "大模型"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "e"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"llmParam": [
{
"name": "modelType",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "modleName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "generationDiversity",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "balance",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "temperature",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": "0.8",
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "maxTokens",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "4096",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "responseFormat",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "prompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{input}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "enableChatHistory",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": false,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "chatHistoryRound",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "3",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "systemPrompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "你是一个占卜师",
"rawMeta": {
"type": 1
}
}
}
}
],
"fcParam": {
"pluginFCParam": {
"pluginList": [
{
"plugin_id": "7509353177339133952",
"api_id": "7509353598782816256",
"api_name": "xz_zgjm",
"plugin_version": "0",
"is_draft": false,
"fc_setting": {
"plugin_id": "7509353177339133952",
"api_id": "7509353598782816256",
"api_name": "xz_zgjm",
"request_params": [
{
"id": "Js8dCSLqpl",
"name": "title",
"desc": "查询解梦标题,例如:梦见蛇",
"type": 1,
"location": 2,
"is_required": true,
"sub_parameters": null,
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
},
{
"id": "byhjWylhTV",
"name": "input_string",
"desc": "input_string",
"type": 1,
"location": 2,
"is_required": true,
"sub_parameters": null,
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
}
],
"response_params": [
{
"id": "v4LbpIna8l",
"name": "err_msg",
"desc": "错误提示",
"type": 1,
"location": 3,
"is_required": false,
"sub_parameters": null,
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
},
{
"id": "8b0GUYl7Gb",
"name": "data_structural",
"desc": "返回数据结构",
"type": 4,
"location": 3,
"is_required": true,
"sub_parameters": [
{
"id": "SnyG0gON9c",
"name": "title",
"desc": "解梦标题",
"type": 1,
"location": 3,
"is_required": false,
"sub_parameters": null,
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
},
{
"id": "iZa8hLqUML",
"name": "weburl",
"desc": "当前内容关联的页面地址",
"type": 1,
"location": 3,
"is_required": false,
"sub_parameters": null,
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
},
{
"id": "uWcirBuvs-",
"name": "content",
"desc": "解梦内容",
"type": 1,
"location": 3,
"is_required": false,
"sub_parameters": null,
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
}
],
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
},
{
"id": "eXvWWTrzMa",
"name": "data",
"desc": "返回数据",
"type": 1,
"location": 3,
"is_required": true,
"sub_parameters": null,
"global_disable": false,
"local_disable": false,
"enum_list": null,
"enum_var_names": null
}
],
"response_style": {
"mode": 0
},
"is_draft": false,
"plugin_version": "0"
}
}
]
}
},
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
],
"version": "3"
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "120238"
},
{
"sourceNodeID": "120238",
"targetNodeID": "900001"
}
]
}

View File

@@ -0,0 +1,383 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 58,
"y": -187.76668701171877
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input_string",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input_string",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 964,
"y": -288.7666870117188
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "159950",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "159950",
"type": "3",
"meta": {
"position": {
"x": 471,
"y": -410.2666870117188
}
},
"data": {
"nodeMeta": {
"title": "大模型",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"description": "调用大语言模型,使用变量和提示词生成回复",
"mainColor": "#5C62FF",
"subTitle": "大模型"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input_string"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"llmParam": [
{
"name": "modelType",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "1737521813",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "modleName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "generationDiversity",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "balance",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "temperature",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": "0.8",
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "maxTokens",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "4096",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "responseFormat",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "prompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{input}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "enableChatHistory",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": false,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "chatHistoryRound",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "3",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "systemPrompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "你是一个工具人",
"rawMeta": {
"type": 1
}
}
}
}
],
"fcParam": {
"workflowFCParam": {
"workflowList": [
{
"plugin_id": "7509121334769795126",
"workflow_id": "7509120431183544356",
"plugin_version": "",
"workflow_version": "v0.0.1",
"is_draft": false,
"fc_setting": {
"is_draft": false,
"plugin_id": "7509121334769795126",
"request_params": [
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": true,
"local_disable": false,
"location": 3,
"name": "input_string",
"sub_parameters": [],
"type": 1
},
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": true,
"local_disable": false,
"location": 3,
"name": "input_number",
"sub_parameters": [],
"type": 3
},
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": true,
"local_disable": false,
"location": 3,
"name": "input_object",
"sub_parameters": [],
"type": 4
}
],
"response_params": [
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": false,
"local_disable": false,
"location": 3,
"name": "output_string",
"sub_parameters": [],
"type": 1
},
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": false,
"local_disable": false,
"location": 3,
"name": "output_number",
"sub_parameters": [],
"type": 3
},
{
"assist_type": 0,
"desc": "",
"enum_list": [],
"enum_var_names": [],
"global_disable": false,
"id": "",
"is_required": false,
"local_disable": true,
"location": 3,
"name": "output_object",
"sub_parameters": [],
"type": 4
}
],
"response_style": {
"mode": 0
},
"workflow_id": "7509120431183544356",
"workflow_version": "v0.0.1"
}
}
]
}
},
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "output"
}
],
"version": "3"
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "159950"
},
{
"sourceNodeID": "159950",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,296 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -324.6903950582028,
"y": -542.5290216685637
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 582.312213137821,
"y": -738.3403723783939
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "132728",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "132728",
"type": "3",
"meta": {
"position": {
"x": 35.30960494179719,
"y": -791.7403723783939
}
},
"data": {
"nodeMeta": {
"title": "大模型",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"description": "调用大语言模型,使用变量和提示词生成回复",
"mainColor": "#5C62FF",
"subTitle": "大模型"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"llmParam": [
{
"name": "modelType",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "modleName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "generationDiversity",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "balance",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "temperature",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": "0.8",
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "maxTokens",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "4096",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "responseFormat",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "0",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "prompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{input}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "enableChatHistory",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": false,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "chatHistoryRound",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "3",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "systemPrompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "你是一个旅游推荐专家,通过用户提出的问题,推荐用户具体城市的旅游景点",
"rawMeta": {
"type": 1
}
}
}
}
],
"fcParam": {
"knowledgeFCParam": {
"knowledgeList": [
{
"id": "7512369185624686592",
"name": "旅游景点"
}
],
"global_setting": {
"auto": false,
"min_score": 0.5,
"no_recall_reply_customize_prompt": "抱歉,您的问题超出了我的知识范围,并且无法在当前阶段回答",
"no_recall_reply_mode": 0,
"show_source": false,
"show_source_mode": 0,
"top_k": 3,
"use_rerank": true,
"use_rewrite": true,
"use_nl2_sql": true,
"search_mode": 0
}
}
},
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "output"
}
],
"version": "3"
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "132728"
},
{
"sourceNodeID": "132728",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,142 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 137,
"y": -336
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input_string",
"required": true
},
{
"type": "float",
"name": "input_number",
"required": true
},
{
"type": "object",
"name": "input_object",
"schema": [],
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input_string",
"required": true
},
{
"type": "float",
"name": "input_number",
"required": true
},
{
"type": "object",
"name": "input_object",
"schema": [],
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 571,
"y": -232
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output_string",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input_string"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "output_number",
"input": {
"type": "float",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input_number"
},
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "output_object",
"input": {
"type": "object",
"schema": [],
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input_object"
},
"rawMeta": {
"type": 6
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,585 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "query1",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 99,
"y": -86.34999999999995
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable_out",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "192046",
"name": "converted",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "converted"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1034,
"y": -99.34999999999995
}
},
"type": "2"
},
{
"blocks": [
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"left": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"right": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
}
}
]
},
"nodeMeta": {
"description": "用于重置循环变量的值,使其下次循环使用重置后的值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LoopSetVariable-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "设置变量",
"title": "设置变量"
}
},
"edges": null,
"id": "131543",
"meta": {
"position": {
"x": -149.94166666666666,
"y": 128.85000000000002
}
},
"type": "20"
},
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "用于立即终止当前所在的循环,跳出循环体",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Break-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "终止循环",
"title": "终止循环"
}
},
"edges": null,
"id": "199232",
"meta": {
"position": {
"x": 820,
"y": 33.30000000000001
}
},
"type": "19"
},
{
"blocks": [],
"data": {
"inputs": {
"branches": [
{
"condition": {
"conditions": [
{
"left": {
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "192046",
"name": "index",
"source": "block-output"
},
"type": "ref"
}
}
},
"operator": 14,
"right": {
"input": {
"type": "integer",
"value": {
"content": 3,
"rawMeta": {
"type": 2
},
"type": "literal"
}
}
}
}
],
"logic": 2
}
},
{
"condition": {
"conditions": [
{
"left": {
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"type": "ref"
}
}
},
"operator": 1,
"right": {
"input": {
"type": "string",
"value": {
"content": "bb",
"rawMeta": {
"type": 1
},
"type": "literal"
}
}
}
}
],
"logic": 2
}
}
]
},
"nodeMeta": {
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "选择器",
"title": "选择器"
}
},
"edges": null,
"id": "125542",
"meta": {
"position": {
"x": 318,
"y": 68.00000000000003
}
},
"type": "8"
},
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "用于终止当前循环,执行下次循环",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Continue-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "继续循环",
"title": "继续循环"
}
},
"edges": null,
"id": "185227",
"meta": {
"position": {
"x": 810,
"y": 138.85000000000002
}
},
"type": "29"
},
{
"blocks": [],
"data": {
"inputs": {
"concatParams": [
{
"input": {
"type": "string",
"value": {
"content": "new_{{String1}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "concatResult"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "arrayItemConcatChar"
},
{
"input": {
"schema": {
"schema": [
{
"name": "label",
"required": true,
"type": "string"
},
{
"name": "value",
"required": true,
"type": "string"
},
{
"name": "isDefault",
"required": true,
"type": "boolean"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": [
{
"isDefault": true,
"label": "换行",
"value": "\n"
},
{
"isDefault": true,
"label": "制表符",
"value": "\t"
},
{
"isDefault": true,
"label": "句号",
"value": "。"
},
{
"isDefault": true,
"label": "逗号",
"value": ""
},
{
"isDefault": true,
"label": "分号",
"value": ""
},
{
"isDefault": true,
"label": "空格",
"value": " "
}
],
"type": "literal"
}
},
"name": "allArrayItemConcatChars"
}
],
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "String1"
}
],
"method": "concat"
},
"nodeMeta": {
"description": "用于处理多个字符串类型变量的格式",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"mainColor": "#3071F2",
"subTitle": "文本处理",
"title": "文本处理"
},
"outputs": [
{
"name": "output",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "121518",
"meta": {
"position": {
"x": 790.2583333333333,
"y": 270.7958333333333
}
},
"type": "15"
}
],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "query1",
"source": "block-output"
},
"type": "ref"
}
},
"name": "input"
}
],
"loopCount": {
"type": "integer",
"value": {
"content": "10",
"type": "literal"
}
},
"loopType": "array",
"variableParameters": [
{
"input": {
"type": "string",
"value": {
"content": "init",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "variable"
}
]
},
"nodeMeta": {
"description": "用于通过设定循环次数和逻辑,重复执行一系列任务",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Loop-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "循环",
"title": "循环"
},
"outputs": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "variable_out"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "121518",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "converted"
}
]
},
"edges": [
{
"sourceNodeID": "192046",
"targetNodeID": "131543",
"sourcePortID": "loop-function-inline-output"
},
{
"sourceNodeID": "131543",
"targetNodeID": "125542",
"sourcePortID": ""
},
{
"sourceNodeID": "125542",
"targetNodeID": "199232",
"sourcePortID": "true"
},
{
"sourceNodeID": "125542",
"targetNodeID": "185227",
"sourcePortID": "true_1"
},
{
"sourceNodeID": "125542",
"targetNodeID": "121518",
"sourcePortID": "false"
},
{
"sourceNodeID": "121518",
"targetNodeID": "192046",
"sourcePortID": "",
"targetPortID": "loop-function-inline-input"
}
],
"id": "192046",
"meta": {
"canvasPosition": {
"x": 208.5,
"y": 179.7
},
"position": {
"x": 595,
"y": -113.29999999999995
}
},
"type": "21"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "192046",
"sourcePortID": ""
},
{
"sourceNodeID": "192046",
"targetNodeID": "900001",
"sourcePortID": "loop-output"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,79 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 244.02618657937808,
"y": -98.77250409165303
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 831.5057283142389,
"y": -141.76759410801964
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,79 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 47.64320785597381,
"y": -36.02291325695581
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 465.46644844517175,
"y": -137.11947626841246
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,342 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 35.2
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2020,
"y": 22.200000000000003
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "198958",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "198958",
"type": "9",
"meta": {
"position": {
"x": 1100,
"y": 21.5
}
},
"data": {
"nodeMeta": {
"title": "c2",
"description": "c2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7516826283318181888",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
},
{
"id": "136894",
"type": "43",
"meta": {
"position": {
"x": 1560,
"y": 0
}
},
"data": {
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7516826768238444544"
}
],
"selectParam": {
"condition": {
"conditionList": [
[
{
"name": "left",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v2"
}
}
},
{
"name": "operation",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "IS_NOT_NULL"
}
}
},
null
]
],
"logic": "AND"
},
"orderByList": [],
"limit": 100
}
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": []
}
},
{
"type": "integer",
"name": "rowNum"
}
],
"nodeMeta": {
"title": "查询数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icaon-database-select.jpg",
"description": "从表获取数据,用户可定义查询条件、选择列等,输出符合条件的数据",
"mainColor": "#F2B600",
"subTitle": "查询数据"
}
}
},
{
"id": "113678",
"type": "6",
"meta": {
"position": {
"x": 671.4402618657938,
"y": -63.62765957446808
}
},
"data": {
"nodeMeta": {
"title": "知识库检索",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-KnowledgeQuery-v2.jpg",
"description": "在选定的知识中,根据输入变量召回最匹配的信息,并以列表形式返回",
"mainColor": "#FF811A",
"subTitle": "知识库检索"
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"inputs": {
"datasetParam": [
{
"name": "datasetList",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "literal",
"content": [
"7516826802006786048"
]
}
}
},
{
"name": "topK",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 5
}
}
},
{
"name": "useRerank",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "useRewrite",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "isPersonalOnly",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": true,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "minScore",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": 0.5
}
}
},
{
"name": "strategy",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 1
}
}
}
],
"inputParameters": [
{
"name": "Query",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "113678"
},
{
"sourceNodeID": "136894",
"targetNodeID": "900001"
},
{
"sourceNodeID": "113678",
"targetNodeID": "198958"
},
{
"sourceNodeID": "198958",
"targetNodeID": "136894"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,321 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 35.2
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2480,
"y": 22.200000000000003
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "175430",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "164736",
"type": "9",
"meta": {
"position": {
"x": 611.063829787234,
"y": -7.436170212765955
}
},
"data": {
"nodeMeta": {
"title": "c1",
"description": "2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7516826260387921920",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
},
{
"id": "175430",
"type": "9",
"meta": {
"position": {
"x": 2020,
"y": 21.5
}
},
"data": {
"nodeMeta": {
"title": "c2",
"description": "c2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7516826283318181888",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
},
{
"id": "146468",
"type": "43",
"meta": {
"position": {
"x": 1560,
"y": 0
}
},
"data": {
"inputs": {
"databaseInfoList": [
{
"databaseInfoID": "7516826768238444544"
}
],
"selectParam": {
"condition": {
"conditionList": [
[
{
"name": "left",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "v2"
}
}
},
{
"name": "operation",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "IS_NOT_NULL"
}
}
},
null
]
],
"logic": "AND"
},
"orderByList": [],
"limit": 100
}
},
"outputs": [
{
"type": "list",
"name": "outputList",
"schema": {
"type": "object",
"schema": []
}
},
{
"type": "integer",
"name": "rowNum"
}
],
"nodeMeta": {
"title": "查询数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icaon-database-select.jpg",
"description": "从表获取数据,用户可定义查询条件、选择列等,输出符合条件的数据",
"mainColor": "#F2B600",
"subTitle": "查询数据"
}
}
},
{
"id": "165863",
"type": "27",
"meta": {
"position": {
"x": 1100,
"y": 8.5
}
},
"data": {
"nodeMeta": {
"title": "知识库写入",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-KnowledgeWriting-v2.jpg",
"description": "写入节点可以添加 文本类型 的知识库,仅可以添加一个知识库",
"mainColor": "#FF811A",
"subTitle": "知识库写入"
},
"outputs": [
{
"type": "string",
"name": "documentId"
},
{
"type": "string",
"name": "fileName"
},
{
"type": "string",
"name": "fileUrl"
}
],
"inputs": {
"inputParameters": [
{
"name": "knowledge",
"input": {
"type": "string",
"assistType": 1,
"value": {
"type": "literal",
"content": "http://pic.fanlv.fun/tos-cn-i-2vw640id5q/1bae997c10aa45cd8244b4d1786b8475.txt~tplv-2vw640id5q-image.image?x-wf-file_name=%E5%8C%97%E4%BA%AC%E6%97%85%E6%B8%B8%E6%99%AF%E7%82%B9.txt",
"rawMeta": {
"fileName": "北京旅游景点.txt",
"type": 8
}
}
}
}
],
"datasetParam": [
{
"name": "datasetList",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "literal",
"content": [
"7516826802006786048"
]
}
}
}
],
"strategyParam": {
"parsingStrategy": {
"parsingType": "fast"
},
"chunkStrategy": {
"chunkType": "default"
},
"indexStrategy": {}
}
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "164736"
},
{
"sourceNodeID": "175430",
"targetNodeID": "900001"
},
{
"sourceNodeID": "164736",
"targetNodeID": "165863"
},
{
"sourceNodeID": "146468",
"targetNodeID": "175430"
},
{
"sourceNodeID": "165863",
"targetNodeID": "146468"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,353 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "107234",
"name": "user_name",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "user_name"
},
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "107234",
"name": "user_age",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "user_age"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "157915",
"name": "nationality",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "nationality"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "157915",
"name": "gender",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "gender"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "162226",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "user_input"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1220.420323325635,
"y": 33.10958429561201
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"answer_type": "text",
"dynamic_option": {
"type": "string",
"value": {
"content": {
"blockID": "",
"name": "",
"source": "block-output"
},
"type": "ref"
}
},
"extra_output": true,
"inputParameters": [],
"limit": 3,
"llmParam": {
"generationDiversity": "balance",
"maxTokens": 4096,
"modelName": "豆包·1.5·Pro·32k",
"modelType": 1737521813,
"responseFormat": 2,
"systemPrompt": "",
"temperature": 0.8
},
"option_type": "static",
"options": [
{
"name": ""
},
{
"name": ""
}
],
"question": "what's your name and age?"
},
"nodeMeta": {
"description": "支持中间向用户提问问题,支持预置选项提问和开放式问题提问两种方式",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Direct-Question-v2.jpg",
"mainColor": "#3071F2",
"subTitle": "问答",
"title": "问答"
},
"outputs": [
{
"description": "用户本轮对话输入内容",
"name": "USER_RESPONSE",
"required": true,
"type": "string"
},
{
"name": "user_name",
"required": true,
"type": "string"
},
{
"name": "user_age",
"required": true,
"type": "integer"
}
]
},
"edges": null,
"id": "107234",
"meta": {
"position": {
"x": 431.6397228637413,
"y": -204
}
},
"type": "18"
},
{
"blocks": [],
"data": {
"inputs": {
"answer_type": "text",
"dynamic_option": {
"type": "string",
"value": {
"content": {
"blockID": "",
"name": "",
"source": "block-output"
},
"type": "ref"
}
},
"extra_output": true,
"inputParameters": [],
"limit": 3,
"llmParam": {
"generationDiversity": "balance",
"maxTokens": 2200,
"modelName": "DeepSeek-R1",
"modelType": 1738675233,
"responseFormat": 2,
"systemPrompt": "",
"temperature": 0.8
},
"option_type": "static",
"options": [
{
"name": ""
},
{
"name": ""
}
],
"question": "what's your nationality and gender?"
},
"nodeMeta": {
"description": "支持中间向用户提问问题,支持预置选项提问和开放式问题提问两种方式",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Direct-Question-v2.jpg",
"mainColor": "#3071F2",
"subTitle": "问答",
"title": "问答_1"
},
"outputs": [
{
"description": "用户本轮对话输入内容",
"name": "USER_RESPONSE",
"required": true,
"type": "string"
},
{
"name": "nationality",
"required": true,
"type": "string"
},
{
"name": "gender",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "157915",
"meta": {
"position": {
"x": 431.6397228637413,
"y": 145.10958429561202
}
},
"type": "18"
},
{
"blocks": [],
"data": {
"inputs": {
"outputSchema": "[{\"type\":\"string\",\"name\":\"input\",\"required\":true}]"
},
"nodeMeta": {
"description": "支持中间过程的信息输入",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Input-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "输入",
"title": "输入"
},
"outputs": [
{
"name": "input",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "162226",
"meta": {
"position": {
"x": 903.7228637413394,
"y": -164.5
}
},
"type": "30"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "107234",
"sourcePortID": ""
},
{
"sourceNodeID": "100001",
"targetNodeID": "157915",
"sourcePortID": ""
},
{
"sourceNodeID": "157915",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "162226",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "107234",
"targetNodeID": "162226",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,293 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "start"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "float"
},
{
"name": "obj",
"required": true,
"schema": [
{
"name": "field1",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
],
"type": "object"
},
{
"name": "arr",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{output}}_{{output_obj.field1}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "",
"name": "",
"path": [
"app_var"
],
"source": "global_variable_app"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"schema": [
{
"name": "field1",
"required": false,
"schema": {
"assistType": 10000,
"type": "string"
},
"type": "list"
}
],
"type": "object",
"value": {
"content": {
"blockID": "100001",
"name": "obj",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "output_obj"
},
{
"input": {
"schema": {
"assistType": 10000,
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "obj.field1",
"source": "block-output"
},
"rawMeta": {
"type": 116
},
"type": "ref"
}
},
"name": "output_field1"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "arr",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "output_arr"
},
{
"input": {
"type": "string",
"value": {
"content": "literal_value",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "literal_key"
},
{
"input": {
"schema": [
{
"input": {
"type": "float",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 4
},
"type": "ref"
}
},
"name": "obj_container_1"
},
{
"input": {
"type": "string",
"value": {
"content": "sub_literal",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "obj_container_2"
}
],
"type": "object",
"value": {
"type": "object_ref"
}
},
"name": "obj_container"
},
{
"input": {
"schema": [],
"type": "object",
"value": {
"content": "{\"a\": \"b\"}",
"rawMeta": {
"type": 6
},
"type": "literal"
}
},
"name": "obj_literal"
},
{
"input": {
"schema": {
"type": "integer"
},
"type": "list",
"value": {
"content": "[1,2]",
"rawMeta": {
"type": 100
},
"type": "literal"
}
},
"name": "arr_literal"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"description": "end",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "end"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 559,
"y": -13
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"note": "[{\"type\":\"paragraph\",\"children\":[{\"text\":\"this is a comment\",\"type\":\"text\"}]}]",
"schemaType": "slate"
},
"size": {
"height": 150,
"width": 240
}
},
"edges": null,
"id": "117701",
"meta": {
"position": {
"x": 292.5,
"y": 160
}
},
"type": "31"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,121 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 67.71685761047468,
"y": -139.00163666121114
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 932.7168576104747,
"y": -124.33715220949264
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "125662",
"type": "9",
"meta": {
"position": {
"x": 500.2168576104747,
"y": -207.00163666121114
}
},
"data": {
"nodeMeta": {
"title": "cc1",
"description": "cc1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7511616004728815618",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "125662"
},
{
"sourceNodeID": "125662",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,79 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -73,
"y": -133
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 592.9579414039315,
"y": -197.80451970288303
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,357 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1360,
"y": -206.75
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "167992",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "167992",
"type": "15",
"meta": {
"position": {
"x": 855,
"y": -261.1
}
},
"data": {
"nodeMeta": {
"title": "文本处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "Line Break",
"value": "\n",
"isDefault": true
},
{
"label": "Tab Break",
"value": "\t",
"isDefault": true
},
{
"label": "Period",
"value": "。",
"isDefault": true
},
{
"label": "Comma",
"value": "",
"isDefault": true
},
{
"label": "Semicolon",
"value": "",
"isDefault": true
},
{
"label": "Space",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
},
{
"id": "151138",
"type": "5",
"meta": {
"position": {
"x": 1289,
"y": -504.1
}
},
"data": {
"nodeMeta": {
"title": "代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "167992",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "workflow_code_py_illustrate_all\n\nasync def main(args: Args) -> Output:\n params = args.params\n workflow_code_py_illustrate_output\n ret: Output = {\n \"key0\": params['input'] + params['input'], workflow_code_py_illustrate_output_param\n \"key1\": [\"hello\", \"world\"], workflow_code_py_illustrate_output_arr\n \"key2\": { workflow_code_py_illustrate_output_obj\n \"key21\": \"hi\"\n },\n }\n return ret",
"language": 3,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "148912",
"type": "8",
"meta": {
"position": {
"x": 410,
"y": -165.05
}
},
"data": {
"nodeMeta": {
"title": "选择器",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"mainColor": "#00B2B2",
"subTitle": "选择器"
},
"inputs": {
"branches": [
{
"condition": {
"logic": 2,
"conditions": [
{
"operator": 1,
"left": {
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
}
}
}
},
"right": {
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
}
]
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "148912"
},
{
"sourceNodeID": "167992",
"targetNodeID": "900001"
},
{
"sourceNodeID": "148912",
"targetNodeID": "167992",
"sourcePortID": "true"
},
{
"sourceNodeID": "167992",
"targetNodeID": "151138"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,527 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -480.76936241417366,
"y": -827.3429928800074
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1074.4690350659453,
"y": -1405.100726522103
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "138145",
"type": "9",
"meta": {
"position": {
"x": -337.08518741667314,
"y": -1143.5656083443255
}
},
"data": {
"nodeMeta": {
"title": "c1",
"description": "c1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7511615200781402118",
"spaceId": "666",
"workflowVersion": "",
"inputDefs": [
{
"name": "input",
"type": "string"
}
],
"type": 0,
"inputParameters": [],
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "output"
}
]
}
},
{
"id": "162612",
"type": "4",
"meta": {
"position": {
"x": 541.3322143572306,
"y": -1280.9656083443256
}
},
"data": {
"nodeMeta": {
"title": "top_news",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Plugin-v2.jpg",
"subtitle": "pl:top_news",
"description": "帮助用户获取搜狐网上的每日热闻"
},
"inputs": {
"apiParam": [
{
"name": "apiID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7511617581250248704",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "apiName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "pl",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginID",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "7511616454588891136",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "pl",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "pluginVersion",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "0",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "tips",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "outDocLink",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "count",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": 12,
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "q",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "12",
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "traceId"
},
{
"type": "float",
"name": "code"
},
{
"type": "object",
"name": "data",
"schema": [
{
"type": "object",
"name": "coze_ark_001",
"schema": [
{
"type": "list",
"name": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "brief"
},
{
"type": "string",
"name": "title"
},
{
"type": "string",
"name": "url"
}
]
}
}
]
}
]
},
{
"type": "float",
"name": "total"
},
{
"type": "string",
"name": "message"
},
{
"type": "boolean",
"name": "success"
}
]
}
},
{
"id": "199400",
"type": "3",
"meta": {
"position": {
"x": 51.00828691811297,
"y": -1320.3134331225874
}
},
"data": {
"nodeMeta": {
"title": "大模型",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"description": "调用大语言模型,使用变量和提示词生成回复",
"mainColor": "#5C62FF",
"subTitle": "大模型"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"llmParam": [
{
"name": "modelType",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "modleName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "generationDiversity",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "balance",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "temperature",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": "0.8",
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "maxTokens",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "4096",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "responseFormat",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "prompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{input}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "enableChatHistory",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": false,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "chatHistoryRound",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "3",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "systemPrompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "you are go coder",
"rawMeta": {
"type": 1
}
}
}
}
],
"fcParam": {
"pluginFCParam": {
"pluginList": [
{
"plugin_id": "7511616454588891136",
"api_id": "7511617581250248704",
"api_name": "top_news",
"plugin_version": "0",
"is_draft": false
}
]
}
},
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "output"
}
],
"version": "3"
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "138145"
},
{
"sourceNodeID": "162612",
"targetNodeID": "900001"
},
{
"sourceNodeID": "138145",
"targetNodeID": "199400"
},
{
"sourceNodeID": "199400",
"targetNodeID": "162612"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,217 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "options",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 1,
"y": 1.4210854715202004e-14
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "135279",
"name": "USER_RESPONSE",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "USER_RESPONSE"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "135279",
"name": "name",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "name"
},
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "135279",
"name": "age",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "age"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1000,
"y": -12.999999999999986
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"answer_type": "text",
"dynamic_option": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "options",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"extra_output": true,
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"type": "ref"
}
},
"name": "input"
}
],
"limit": 3,
"llmParam": {
"generationDiversity": "default_val",
"maxTokens": 1024,
"modelName": "doubao function calling",
"modelType": 1706077826,
"responseFormat": 2,
"systemPrompt": "be helpful and kind",
"temperature": 1,
"topP": 0.7
},
"option_type": "dynamic",
"options": [
{
"name": "beijing"
},
{
"name": "shanghai"
}
],
"question": "{{input}}"
},
"nodeMeta": {
"title": "qa"
},
"outputs": [
{
"name": "USER_RESPONSE",
"required": true,
"type": "string"
},
{
"name": "name",
"required": true,
"type": "string"
},
{
"name": "age",
"required": true,
"type": "integer"
}
]
},
"edges": null,
"id": "135279",
"meta": {
"position": {
"x": 525,
"y": -91.19999999999999
}
},
"type": "18"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "135279",
"sourcePortID": ""
},
{
"sourceNodeID": "135279",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,435 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -448.87677364248447,
"y": -730.339703409003
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "string",
"name": "xxxx",
"required": true
},
{
"type": "string",
"name": "yyyy",
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "string",
"name": "xxxx",
"required": true
},
{
"type": "string",
"name": "yyyy",
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1473.3237449429023,
"y": -557.1872042676127
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "g1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_user",
"path": [
"user_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "117367",
"type": "5",
"meta": {
"position": {
"x": 70.62516971618413,
"y": -892.2590706557824
}
},
"data": {
"nodeMeta": {
"description": "编写代码,处理输入变量来生成返回值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "代码",
"title": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "v2",
"input": {
"type": "list",
"schema": {
"type": "boolean"
},
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 101
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "133234",
"type": "22",
"meta": {
"position": {
"x": 659.8817806571881,
"y": -946.5440413025951
}
},
"data": {
"nodeMeta": {
"description": "用于用户输入的意图识别,并将其与预设意图选项进行匹配。",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Intent-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "意图识别",
"title": "意图识别"
},
"outputs": [
{
"type": "integer",
"name": "classificationId"
}
],
"inputs": {
"chatHistorySetting": {
"enableChatHistory": false,
"chatHistoryRound": 3
},
"inputParameters": [
{
"name": "query",
"input": {
"type": "list",
"schema": {
"type": "boolean"
},
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 101
}
}
}
}
],
"llmParam": {
"generationDiversity": "balance",
"maxTokens": 1024,
"modelName": "豆包·工具调用",
"modelType": 1706077826,
"prompt": {
"type": "string",
"value": {
"type": "literal",
"content": "{{query}}"
}
},
"responseFormat": 2,
"temperature": 1,
"topP": 0.7,
"systemPrompt": {
"type": "string",
"value": {
"type": "literal",
"content": ""
}
},
"enableChatHistory": false,
"chatHistoryRound": 3
},
"intents": [
{
"name": ""
}
],
"mode": "top_speed",
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
}
}
},
{
"id": "163493",
"type": "45",
"meta": {
"position": {
"x": 1073.8936862365279,
"y": -927.95637171054
}
},
"data": {
"nodeMeta": {
"description": "用于发送API请求从接口返回数据",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-HTTP.png",
"mainColor": "#3071F2",
"subTitle": "HTTP 请求",
"title": "HTTP 请求"
},
"inputParameters": [],
"inputs": {
"apiInfo": {
"method": "GET",
"url": "http://www.baidu.com"
},
"auth": {
"authData": {
"customData": {
"addTo": "header"
}
},
"authOpen": false,
"authType": "BEARER_AUTH"
},
"body": {
"bodyData": {
"binary": {
"fileURL": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "",
"name": ""
}
}
}
},
"rawText": "xxxxx"
},
"bodyType": "RAW_TEXT"
},
"headers": [
{
"name": "c2",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_user",
"path": [
"user_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 1
}
}
}
}
],
"params": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
],
"setting": {
"retryTimes": 3,
"timeout": 120
},
"settingOnError": {}
},
"outputs": [
{
"type": "string",
"name": "body"
},
{
"type": "integer",
"name": "statusCode"
},
{
"type": "string",
"name": "headers"
}
],
"settingOnError": {}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "117367"
},
{
"sourceNodeID": "133234",
"targetNodeID": "900001",
"sourcePortID": "default"
},
{
"sourceNodeID": "163493",
"targetNodeID": "900001"
},
{
"sourceNodeID": "117367",
"targetNodeID": "133234"
},
{
"sourceNodeID": "133234",
"targetNodeID": "163493",
"sourcePortID": "branch_0"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,414 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -377,
"y": -245
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1375.0000457763672,
"y": -82.30000000000001
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "119585",
"type": "21",
"meta": {
"position": {
"x": 364.0000457763672,
"y": -363.5
},
"canvasPosition": {
"x": 163.0000457763672,
"y": -32.70000000000002
}
},
"data": {
"nodeMeta": {
"title": "循环",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Loop-v2.jpg",
"description": "用于通过设定循环次数和逻辑,重复执行一系列任务",
"mainColor": "#00B2B2",
"subTitle": "循环"
},
"inputs": {
"loopType": "array",
"loopCount": {
"type": "integer",
"value": {
"type": "literal",
"content": "10"
}
},
"variableParameters": [
{
"name": "v1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_user",
"path": [
"user_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "input",
"input": {
"type": "list",
"schema": {
"type": "boolean"
},
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 101
}
}
}
}
]
},
"outputs": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "119585",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
}
}
]
},
"blocks": [
{
"id": "114884",
"type": "5",
"meta": {
"position": {
"x": 0,
"y": 100
}
},
"data": {
"nodeMeta": {
"title": "代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
}
],
"edges": [
{
"sourceNodeID": "119585",
"targetNodeID": "114884",
"sourcePortID": "loop-function-inline-output"
},
{
"sourceNodeID": "114884",
"targetNodeID": "119585",
"targetPortID": "loop-function-inline-input"
}
]
},
{
"id": "170824",
"type": "8",
"meta": {
"position": {
"x": 664.0000457763672,
"y": -129.9
}
},
"data": {
"nodeMeta": {
"title": "选择器",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"mainColor": "#00B2B2",
"subTitle": "选择器"
},
"inputs": {
"branches": [
{
"condition": {
"logic": 2,
"conditions": [
{
"operator": 1,
"left": {
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_user",
"path": [
"user_v1"
],
"blockID": "",
"name": ""
}
}
}
},
"right": {
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
}
]
}
}
]
}
}
},
{
"id": "143932",
"type": "5",
"meta": {
"position": {
"x": 967,
"y": 140
}
},
"data": {
"nodeMeta": {
"title": "代码_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "119585"
},
{
"sourceNodeID": "170824",
"targetNodeID": "900001",
"sourcePortID": "true"
},
{
"sourceNodeID": "143932",
"targetNodeID": "900001"
},
{
"sourceNodeID": "119585",
"targetNodeID": "170824",
"sourcePortID": "loop-output"
},
{
"sourceNodeID": "170824",
"targetNodeID": "143932",
"sourcePortID": "false"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,145 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -158,
"y": -363.3
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 871,
"y": -495.3
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "143310",
"type": "9",
"meta": {
"position": {
"x": 361.0000457763672,
"y": -535.2
}
},
"data": {
"inputs": {
"inputDefs": [
{
"input": {},
"name": "input",
"required": false,
"type": "string"
}
],
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_user",
"path": [
"user_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {},
"spaceId": "0",
"type": 0,
"workflowId": "7498668117704163337",
"workflowVersion": "v0.0.1"
},
"nodeMeta": {
"description": "2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false,
"title": "wf2"
},
"outputs": [
{
"type": "string",
"name": "output",
"required": false
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "143310"
},
{
"sourceNodeID": "143310",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,145 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -185.99990844726562,
"y": -672
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 912,
"y": -751.9
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "116972",
"type": "9",
"meta": {
"position": {
"x": 319.0000457763672,
"y": -845.5
}
},
"data": {
"inputs": {
"inputDefs": [
{
"input": {},
"name": "input",
"required": false,
"type": "string"
}
],
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_user",
"path": [
"user_v1"
],
"blockID": "",
"name": ""
},
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {},
"spaceId": "0",
"type": 0,
"workflowId": "7498674832255615002",
"workflowVersion": "v0.0.1"
},
"nodeMeta": {
"description": "2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false,
"title": "wf_2_child"
},
"outputs": [
{
"type": "string",
"name": "output",
"required": false
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "116972"
},
{
"sourceNodeID": "116972",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,149 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -7,
"y": -68
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1004,
"y": -125.6
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "124342",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "124342",
"type": "5",
"meta": {
"position": {
"x": 523,
"y": -191.2
}
},
"data": {
"nodeMeta": {
"description": "编写代码,处理输入变量来生成返回值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "代码",
"title": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "12",
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "124342"
},
{
"sourceNodeID": "124342",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,358 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": -10,
"y": -12.649999999999999
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "pure_output_for_subworkflow exit: {{output}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "156549",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1298.5,
"y": -25.65
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "4096",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "0",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "integer",
"value": {
"content": "1737521813",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"switch": false,
"timeoutMs": 600000
}
},
"nodeMeta": {
"description": "调用大语言模型,使用变量和提示词生成回复",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"subTitle": "大模型",
"title": "大模型"
},
"outputs": [
{
"name": "output",
"required": false,
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "156549",
"meta": {
"position": {
"x": 417.5,
"y": -52.35
}
},
"type": "3"
},
{
"blocks": [],
"data": {
"inputs": {
"callTransferVoice": true,
"chatHistoryWriting": "historyWrite",
"content": {
"type": "string",
"value": {
"content": "emitter: {{output}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "156549",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
}
],
"streamingOutput": true
},
"nodeMeta": {
"description": "节点从“消息”更名为“输出”,支持中间过程的消息输出,支持流式和非流式两种方式",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Output-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "输出",
"title": "输出"
}
},
"edges": null,
"id": "198540",
"meta": {
"position": {
"x": 858,
"y": -26.35
}
},
"type": "13"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "156549",
"sourcePortID": ""
},
{
"sourceNodeID": "198540",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "156549",
"targetNodeID": "198540",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,300 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 13
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "str",
"required": false,
"defaultValue": "str"
},
{
"type": "integer",
"name": "inter",
"required": false,
"defaultValue": "100"
},
{
"type": "float",
"name": "number",
"required": false,
"defaultValue": "12.4"
},
{
"type": "boolean",
"name": "bool",
"required": false,
"defaultValue": false
},
{
"type": "string",
"assistType": 10000,
"name": "ts",
"required": false,
"defaultValue": "2025-07-09 21:43:34"
},
{
"type": "object",
"name": "object",
"schema": [],
"required": false,
"defaultValue": "{\"a\":\"1\"}"
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": false,
"defaultValue": "[\"1\",\"2\"]"
},
{
"type": "string",
"assistType": 2,
"name": "files",
"required": false,
"defaultValue": "http://imagex.fanlv.fun/tos-cn-i-1heqlfnr21/e81acc11277f421390770618e24e01ce.jpeg~tplv-1heqlfnr21-image.image?x-wf-file_name=20250317-154742.jpeg"
}
],
"trigger_parameters": [
{
"type": "string",
"name": "str",
"required": false
},
{
"type": "integer",
"name": "inter",
"required": false
},
{
"type": "float",
"name": "number",
"required": false
},
{
"type": "boolean",
"name": "bool",
"required": false
},
{
"type": "string",
"assistType": 10000,
"name": "ts",
"required": false
},
{
"type": "object",
"name": "object",
"schema": [],
"required": false
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": false
},
{
"type": "string",
"assistType": 2,
"name": "files",
"required": false
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 640,
"y": 0
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "str",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "str"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "inter",
"input": {
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "inter"
},
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "number",
"input": {
"type": "float",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "number"
},
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "bool",
"input": {
"type": "boolean",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "bool"
},
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "ts",
"input": {
"type": "string",
"assistType": 10000,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "ts"
},
"rawMeta": {
"type": 19
}
}
}
},
{
"name": "object",
"input": {
"type": "object",
"schema": [],
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "object"
},
"rawMeta": {
"type": 6
}
}
}
},
{
"name": "array",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "array"
},
"rawMeta": {
"type": 99
}
}
}
},
{
"name": "files",
"input": {
"type": "string",
"assistType": 2,
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "files"
},
"rawMeta": {
"type": 7
}
}
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,687 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "query1",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 99,
"y": -86.34999999999995
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable_out",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "192046",
"name": "converted",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "converted"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 1034,
"y": -99.34999999999995
}
},
"type": "2"
},
{
"blocks": [
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"left": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"right": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
}
}
]
},
"nodeMeta": {
"title": "assign variable"
}
},
"edges": null,
"id": "131543",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": -149.94166666666666,
"y": 128.85000000000002
}
},
"type": "20"
},
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "break"
}
},
"edges": null,
"id": "199232",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 820,
"y": 33.30000000000001
}
},
"type": "19"
},
{
"blocks": [],
"data": {
"inputs": {
"branches": [
{
"condition": {
"conditions": [
{
"left": {
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "192046",
"name": "index",
"source": "block-output"
},
"type": "ref"
}
}
},
"operator": 14,
"right": {
"input": {
"type": "integer",
"value": {
"content": 3,
"rawMeta": {
"type": 2
},
"type": "literal"
}
}
}
}
],
"logic": 2
}
},
{
"condition": {
"conditions": [
{
"left": {
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"type": "ref"
}
}
},
"operator": 1,
"right": {
"input": {
"type": "string",
"value": {
"content": "bb",
"rawMeta": {
"type": 1
},
"type": "literal"
}
}
}
}
],
"logic": 2
}
}
]
},
"nodeMeta": {
"title": "selector"
}
},
"edges": null,
"id": "125542",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 318,
"y": 68.00000000000003
}
},
"type": "8"
},
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "continue"
}
},
"edges": null,
"id": "185227",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 810,
"y": 138.85000000000002
}
},
"type": "29"
},
{
"blocks": [],
"data": {
"inputs": {
"concatParams": [
{
"input": {
"type": "string",
"value": {
"content": "new_{{String1}}_{{String2}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "concatResult"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "arrayItemConcatChar"
},
{
"input": {
"schema": {
"schema": [
{
"name": "label",
"required": true,
"type": "string"
},
{
"name": "value",
"required": true,
"type": "string"
},
{
"name": "isDefault",
"required": true,
"type": "boolean"
}
],
"type": "object"
},
"type": "list",
"value": {
"content": [
{
"isDefault": true,
"label": "newline",
"value": "\n"
},
{
"isDefault": true,
"label": "tab",
"value": "\t"
},
{
"isDefault": true,
"label": "period",
"value": "。"
},
{
"isDefault": true,
"label": "comma",
"value": ""
},
{
"isDefault": true,
"label": "colon",
"value": ""
},
{
"isDefault": true,
"label": "space",
"value": " "
}
],
"type": "literal"
}
},
"name": "allArrayItemConcatChars"
}
],
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "String1"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "141303",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "String2"
}
],
"method": "concat"
},
"nodeMeta": {
"title": "text processor"
},
"outputs": [
{
"name": "output",
"required": true,
"type": "string"
}
]
},
"edges": null,
"id": "121518",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 790.2583333333333,
"y": 270.7958333333333
}
},
"type": "15"
},
{
"blocks": [],
"data": {
"inputs": {
"inputDefs": [
{
"input": {},
"name": "input",
"required": false,
"type": "string"
}
],
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"settingOnError": {},
"spaceId": "7309328955423670309",
"type": 0,
"workflowId": "7469607842648457243"
},
"nodeMeta": {
"title": "input"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "field1",
"required": false,
"type": "string"
},
{
"name": "inputArr",
"required": false,
"schema": {
"type": "float"
},
"type": "list"
}
]
},
"edges": null,
"id": "141303",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 359.45561964189955,
"y": 321.7532337367753
}
},
"type": "9"
}
],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "query1",
"source": "block-output"
},
"type": "ref"
}
},
"name": "input"
}
],
"loopCount": {
"type": "integer",
"value": {
"content": "10",
"type": "literal"
}
},
"loopType": "array",
"variableParameters": [
{
"input": {
"type": "string",
"value": {
"content": "init",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "variable"
}
]
},
"nodeMeta": {
"title": "loop"
},
"outputs": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "192046",
"name": "variable",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "variable_out"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "121518",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "converted"
}
]
},
"edges": [
{
"sourceNodeID": "192046",
"targetNodeID": "131543",
"sourcePortID": "loop-function-inline-output"
},
{
"sourceNodeID": "131543",
"targetNodeID": "125542",
"sourcePortID": ""
},
{
"sourceNodeID": "125542",
"targetNodeID": "199232",
"sourcePortID": "true"
},
{
"sourceNodeID": "125542",
"targetNodeID": "185227",
"sourcePortID": "true_1"
},
{
"sourceNodeID": "125542",
"targetNodeID": "141303",
"sourcePortID": "false"
},
{
"sourceNodeID": "141303",
"targetNodeID": "121518",
"sourcePortID": ""
},
{
"sourceNodeID": "121518",
"targetNodeID": "192046",
"sourcePortID": "",
"targetPortID": "loop-function-inline-input"
}
],
"id": "192046",
"meta": {
"canvasPosition": {
"x": 211.5,
"y": 162.7
},
"defaultCollapsed": false,
"position": {
"x": 595,
"y": -113.29999999999995
}
},
"type": "21"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "192046",
"sourcePortID": ""
},
{
"sourceNodeID": "192046",
"targetNodeID": "900001",
"sourcePortID": "loop-output"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,185 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": -35,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "112956",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "112956",
"name": "converted",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "inputArr"
}
],
"terminatePlan": "returnVariables"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 797,
"y": -37
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"inputDefs": [
{
"input": {},
"name": "query1",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
}
],
"inputParameters": [
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": "[\"a\",\"b\"]",
"rawMeta": {
"type": 99
},
"type": "literal"
}
},
"name": "query1"
}
],
"settingOnError": {},
"spaceId": "7309328955423670309",
"type": 0,
"workflowId": "7468899413567684634"
},
"nodeMeta": {
"title": "loop"
},
"outputs": [
{
"name": "output",
"required": false,
"type": "string"
},
{
"name": "converted",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
]
},
"edges": null,
"id": "112956",
"meta": {
"canvasPosition": {
"x": 0,
"y": 0
},
"defaultCollapsed": false,
"position": {
"x": 390.5,
"y": -190
}
},
"type": "9"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "112956",
"sourcePortID": ""
},
{
"sourceNodeID": "112956",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,687 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "entry"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": -152,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{output2}}\n{{output1}}\n{{sub_out}}\n{{inputArr}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "134204",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output2"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "198743",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "sub_out"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "702225",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output1"
},
{
"input": {
"schema": {
"type": "string"
},
"type": "list",
"value": {
"content": {
"blockID": "198743",
"name": "inputArr",
"source": "block-output"
},
"rawMeta": {
"type": 99
},
"type": "ref"
}
},
"name": "inputArr"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"title": "exit"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 1565.5581856097149,
"y": -171.3393380582597
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{reasoning_content}}\n\n{{doubao_output}}\n\n{{deepseek_output}}\n",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "134204",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "doubao_output"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "702225",
"name": "reasoning_content",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "reasoning_content"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "702225",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "deepseek_output"
}
],
"streamingOutput": true
},
"nodeMeta": {
"title": "emitter"
}
},
"edges": null,
"id": "196842",
"meta": {
"position": {
"x": 816.6185632343293,
"y": -240.04250700596646
}
},
"type": "13"
},
{
"blocks": [],
"data": {
"inputs": {
"fcParam": {
"llmNodeUID": "7494994558397874214",
"spaceID": "7309328955423670309",
"workflowFCParam": {
"workflowList": []
},
"workflowVersion": "v0.0.6"
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "4096",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "0",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "doubao·1.5·Pro·32k",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "integer",
"value": {
"content": "1737521813",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"dataOnErr": "{\n \"output\": \"\",\n \"reasoning_content\": \"\"\n}",
"processType": 1,
"retryTimes": 0,
"switch": false,
"timeoutMs": 600000
}
},
"nodeMeta": {
"title": "llm"
},
"outputs": [
{
"name": "output",
"required": false,
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "134204",
"meta": {
"position": {
"x": 267.8003860139461,
"y": -108.83144690397202
}
},
"type": "3"
},
{
"blocks": [],
"data": {
"inputs": {
"fcParam": {
"llmNodeUID": "",
"spaceID": "",
"workflowFCParam": {},
"workflowVersion": ""
},
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "2200",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "0",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "DeepSeek-R1",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "integer",
"value": {
"content": "1738675233",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"dataOnErr": "{\n \"output\": \"\",\n \"reasoning_content\": \"\"\n}",
"processType": 1,
"retryTimes": 0,
"switch": false,
"timeoutMs": 600000
}
},
"nodeMeta": {
"title": "llm_1"
},
"outputs": [
{
"name": "output",
"required": false,
"type": "string"
},
{
"name": "reasoning_content",
"required": false,
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "702225",
"meta": {
"position": {
"x": 267.8003860139461,
"y": 313.5659972254057
}
},
"type": "3"
},
{
"blocks": [],
"data": {
"inputs": {
"inputDefs": [
{
"input": {},
"name": "input",
"required": false,
"type": "string"
}
],
"inputParameters": [],
"settingOnError": {},
"spaceId": "7309328955423670309",
"type": 0,
"workflowId": "7494849202016272435"
},
"nodeMeta": {
"description": "create a new workflow",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false,
"title": "create_new"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "inputArr",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
]
},
"edges": null,
"id": "198743",
"meta": {
"position": {
"x": 1110.6772617388901,
"y": -25.581803099128322
}
},
"type": "9"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "134204",
"sourcePortID": ""
},
{
"sourceNodeID": "100001",
"targetNodeID": "702225",
"sourcePortID": ""
},
{
"sourceNodeID": "198743",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "134204",
"targetNodeID": "196842",
"sourcePortID": ""
},
{
"sourceNodeID": "702225",
"targetNodeID": "196842",
"sourcePortID": ""
},
{
"sourceNodeID": "196842",
"targetNodeID": "198743",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,487 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "int_a",
"required": false,
"type": "integer"
},
{
"name": "obj_str",
"required": false,
"type": "string"
},
{
"name": "arr_str",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
},
{
"name": "num_a",
"required": false,
"type": "float"
},
{
"name": "bool_a",
"required": false,
"type": "boolean"
},
{
"name": "obj",
"required": false,
"schema": [],
"type": "object"
}
],
"trigger_parameters": [
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "int_a",
"required": false,
"type": "integer"
},
{
"name": "obj_str",
"required": false,
"type": "string"
},
{
"name": "arr_str",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
},
{
"name": "num_a",
"required": false,
"type": "float"
},
{
"name": "bool_a",
"required": false,
"type": "boolean"
},
{
"name": "obj",
"required": false,
"schema": [],
"type": "object"
}
]
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 266.9530967429301,
"y": -668.9813153618387
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{int_a}} {{input}} {{obj_str}} {{arr_str}} {{num_a}} {{bool_a}} {{obj}}\n{{output1}} {{arr_str[0]}} {{obj_str.s[1]}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"type": "boolean",
"value": {
"content": {
"blockID": "100001",
"name": "int_a",
"source": "block-output"
},
"rawMeta": {
"type": 3
},
"type": "ref"
}
},
"name": "int_a"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "172190",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "output1"
},
{
"input": {
"schema": {
"type": "integer"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 100
},
"type": "ref"
}
},
"name": "input"
},
{
"input": {
"type": "object",
"value": {
"content": {
"blockID": "100001",
"name": "obj_str",
"source": "block-output"
},
"rawMeta": {
"type": 6
},
"type": "ref"
}
},
"name": "obj_str"
},
{
"input": {
"schema": {
"type": "object"
},
"type": "list",
"value": {
"content": {
"blockID": "100001",
"name": "arr_str",
"source": "block-output"
},
"rawMeta": {
"type": 103
},
"type": "ref"
}
},
"name": "arr_str"
},
{
"input": {
"type": "integer",
"value": {
"content": {
"blockID": "100001",
"name": "num_a",
"source": "block-output"
},
"rawMeta": {
"type": 2
},
"type": "ref"
}
},
"name": "num_a"
},
{
"input": {
"type": "float",
"value": {
"content": {
"blockID": "100001",
"name": "bool_a",
"source": "block-output"
},
"rawMeta": {
"type": 4
},
"type": "ref"
}
},
"name": "bool_a"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "obj",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "obj"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 276.0536196376395,
"y": -222.16519220364182
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1737521813",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "4096",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "2",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "{{input}}",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"description": "调用大语言模型,使用变量和提示词生成回复",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "大模型",
"title": "大模型"
},
"outputs": [
{
"name": "output",
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "172190",
"meta": {
"position": {
"x": 276.0536196376395,
"y": -510.12080631587185
}
},
"type": "3"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "172190",
"sourcePortID": ""
},
{
"sourceNodeID": "100001",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "172190",
"targetNodeID": "900001",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,273 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -186,
"y": -77.94999999999999
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 837,
"y": -189.95
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "",
"name": ""
}
}
}
}
]
}
}
},
{
"id": "198684",
"type": "3",
"meta": {
"position": {
"x": 341,
"y": -216.64999999999998
}
},
"data": {
"nodeMeta": {
"title": "大模型",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"description": "调用大语言模型,使用变量和提示词生成回复",
"mainColor": "#5C62FF",
"subTitle": "大模型"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "123",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "aaa",
"rawMeta": {
"type": 1
}
}
}
}
],
"llmParam": [
{
"name": "modelType",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "modleName",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "generationDiversity",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "balance",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "temperature",
"input": {
"type": "float",
"value": {
"type": "literal",
"content": "0.8",
"rawMeta": {
"type": 4
}
}
}
},
{
"name": "maxTokens",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "4096",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "responseFormat",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "prompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "enableChatHistory",
"input": {
"type": "boolean",
"value": {
"type": "literal",
"content": false,
"rawMeta": {
"type": 3
}
}
}
},
{
"name": "chatHistoryRound",
"input": {
"type": "integer",
"value": {
"type": "literal",
"content": "3",
"rawMeta": {
"type": 2
}
}
}
},
{
"name": "systemPrompt",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {
"processType": 1,
"timeoutMs": 180000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "output"
}
],
"version": "3"
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "198684"
},
{
"sourceNodeID": "198684",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,327 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -308,
"y": -284
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1167,
"y": -318
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "193133",
"type": "40",
"meta": {
"position": {
"x": 644.0000457763672,
"y": -396.5
}
},
"data": {
"nodeMeta": {
"title": "变量赋值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/Variable.jpg",
"description": "用于给支持写入的变量赋值,包括应用变量、用户变量",
"mainColor": "#FF811A",
"subTitle": "变量赋值"
},
"inputs": {
"inputParameters": [
{
"name": "app_v1",
"left": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_v1"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "app_list_v1",
"left": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_list_v1"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "list",
"value": {
"type": "literal",
"content": "[\"1\",\"2\"]",
"rawMeta": {
"type": 99
}
},
"schema": {
"type": "string"
}
}
},
{
"name": "app_list_v2",
"left": {
"type": "list",
"schema": {
"type": "integer"
},
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_list_v2"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "list",
"value": {
"type": "literal",
"content": "[1,2]",
"rawMeta": {
"type": 100
}
},
"schema": {
"type": "integer"
}
}
}
],
"variableTypeMap": {
"app_v1": "global_variable_app",
"app_list_v1": "global_variable_app",
"app_list_v2": "global_variable_app"
}
},
"outputs": [
{
"name": "isSuccess",
"type": "boolean"
}
]
}
},
{
"id": "130338",
"type": "9",
"meta": {
"position": {
"x": 169.0000457763672,
"y": -430.5
}
},
"data": {
"nodeMeta": {
"title": "variable",
"description": "变量",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Workflow-v2.jpg",
"isImageflow": false
},
"inputs": {
"workflowId": "7498321598097768457",
"spaceId": "7459315685806817291",
"workflowVersion": "",
"inputDefs": [
{
"input": {},
"name": "input",
"required": false,
"type": "string"
},
{
"input": {},
"name": "array",
"required": true,
"schema": {
"type": "string"
},
"type": "list"
}
],
"type": 0,
"inputParameters": [
{
"name": "array",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "array"
},
"rawMeta": {
"type": 99
}
}
}
},
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"settingOnError": {
"switch": false,
"dataOnErr": "{\n \"output\": \"\"\n}"
}
},
"outputs": [
{
"type": "string",
"name": "output",
"required": false
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "130338"
},
{
"sourceNodeID": "193133",
"targetNodeID": "900001"
},
{
"sourceNodeID": "130338",
"targetNodeID": "193133"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,648 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 87.03360370799537,
"y": 35.63904982618769
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2596.169205861185,
"y": 8.557781985958094
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190138",
"name": "key2.key21"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "190138",
"type": "5",
"meta": {
"position": {
"x": 519.0498261877173,
"y": -203.76315179606024
}
},
"data": {
"nodeMeta": {
"title": "代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "# 在这里,您可以通过 args 获取节点中的输入变量,并通过 'ret' 输出结果\n# 'args' 和 'ret' 已经被正确地注入到环境中\n# 下面是一个示例首先获取节点的全部输入参数params其次获取其中参数名为input的值\n# params = args.params; \n# input = params.input;\n# 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n# ret: Output = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync def main(args: Args) -> Output:\n params = args.params\n # 构建输出对象\n ret: Output = {\n \"key0\": params['input'] + params['input'], # 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], # 输出一个数组\n \"key2\": { # 输出一个Object \n \"key21\": \"hi\"\n },\n }\n return ret",
"language": 3,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "161668",
"type": "8",
"meta": {
"position": {
"x": 988.7022016222479,
"y": -252.7168887601391
}
},
"data": {
"nodeMeta": {
"title": "选择器",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"mainColor": "#00B2B2",
"subTitle": "选择器"
},
"inputs": {
"branches": [
{
"condition": {
"logic": 2,
"conditions": [
{
"operator": 1,
"left": {
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190138",
"name": "key0"
}
}
}
},
"right": {
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "abc",
"rawMeta": {
"type": 1
}
}
}
}
}
]
}
}
]
}
}
},
{
"id": "177387",
"type": "15",
"meta": {
"position": {
"x": 1257.531865585168,
"y": -477.7168887601391
}
},
"data": {
"nodeMeta": {
"title": "文本处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190138",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "String2",
"input": {
"type": "object",
"schema": [
{
"type": "string",
"name": "key21"
}
],
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190138",
"name": "key2"
},
"rawMeta": {
"type": 6
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}{{String2.key21}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "换行",
"value": "\n",
"isDefault": true
},
{
"label": "制表符",
"value": "\t",
"isDefault": true
},
{
"label": "句号",
"value": "。",
"isDefault": true
},
{
"label": "逗号",
"value": "",
"isDefault": true
},
{
"label": "分号",
"value": "",
"isDefault": true
},
{
"label": "空格",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
},
{
"id": "101917",
"type": "5",
"meta": {
"position": {
"x": 1798.7137891077637,
"y": -365.2168887601391
}
},
"data": {
"nodeMeta": {
"title": "代码_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "177387",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "# 在这里,您可以通过 args 获取节点中的输入变量,并通过 'ret' 输出结果\n# 'args' 和 'ret' 已经被正确地注入到环境中\n# 下面是一个示例首先获取节点的全部输入参数params其次获取其中参数名为input的值\n# params = args.params; \n# input = params.input;\n# 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n# ret: Output = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync def main(args: Args) -> Output:\n params = args.params\n # 构建输出对象\n ret: Output = {\n \"key0\": params['input'] + params['input'], # 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], # 输出一个数组\n \"key2\": { # 输出一个Object \n \"key21\": \"hi\"\n },\n }\n return ret",
"language": 3,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "109507",
"type": "5",
"meta": {
"position": {
"x": 1366.1692058611854,
"y": -3.079105784746602
}
},
"data": {
"nodeMeta": {
"title": "代码_2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "102541",
"type": "32",
"meta": {
"position": {
"x": 1765.1692058611852,
"y": -171.0422180140419
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
}
],
"nodeMeta": {
"title": "变量聚合",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
},
{
"id": "166209",
"type": "8",
"meta": {
"position": {
"x": 2174.384733091776,
"y": -15.779105784746605
}
},
"data": {
"nodeMeta": {
"title": "选择器_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"mainColor": "#00B2B2",
"subTitle": "选择器"
},
"inputs": {
"branches": [
{
"condition": {
"logic": 2,
"conditions": [
{
"operator": 1,
"left": {
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190138",
"name": "key0"
}
}
}
},
"right": {
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "12",
"rawMeta": {
"type": 1
}
}
}
}
}
]
}
}
]
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "190138"
},
{
"sourceNodeID": "166209",
"targetNodeID": "900001",
"sourcePortID": "false"
},
{
"sourceNodeID": "190138",
"targetNodeID": "161668"
},
{
"sourceNodeID": "101917",
"targetNodeID": "161668"
},
{
"sourceNodeID": "161668",
"targetNodeID": "177387",
"sourcePortID": "true"
},
{
"sourceNodeID": "161668",
"targetNodeID": "109507",
"sourcePortID": "false"
},
{
"sourceNodeID": "177387",
"targetNodeID": "101917"
},
{
"sourceNodeID": "166209",
"targetNodeID": "109507",
"sourcePortID": "true"
},
{
"sourceNodeID": "109507",
"targetNodeID": "102541"
},
{
"sourceNodeID": "102541",
"targetNodeID": "166209"
}
]
}

View File

@@ -0,0 +1,678 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 180,
"y": 327.1
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1760,
"y": 314.1
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "149093",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "149093",
"type": "5",
"meta": {
"position": {
"x": 640,
"y": 313.5
}
},
"data": {
"nodeMeta": {
"title": "代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "111",
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "173053",
"type": "32",
"meta": {
"position": {
"x": 1200,
"y": 312.5
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "literal",
"content": "2",
"rawMeta": {
"type": 1
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
}
],
"nodeMeta": {
"title": "变量聚合",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
},
{
"id": "160892",
"type": "22",
"meta": {
"position": {
"x": 1200,
"y": 0
}
},
"data": {
"nodeMeta": {
"title": "意图识别",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Intent-v2.jpg",
"description": "用于用户输入的意图识别,并将其与预设意图选项进行匹配。",
"mainColor": "#00B2B2",
"subTitle": "意图识别"
},
"outputs": [
{
"type": "integer",
"name": "classificationId"
}
],
"inputs": {
"chatHistorySetting": {
"enableChatHistory": false,
"chatHistoryRound": 3
},
"inputParameters": [
{
"name": "query",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "100",
"rawMeta": {
"type": 1
}
}
}
}
],
"llmParam": {
"modelType": 1706077826,
"modelName": "豆包·工具调用",
"generationDiversity": "balance",
"temperature": 1,
"topP": 0.7,
"responseFormat": 2,
"maxTokens": 1024,
"prompt": {
"type": "string",
"value": {
"type": "literal",
"content": "{{query}}"
}
},
"systemPrompt": {
"type": "string",
"value": {
"type": "literal",
"content": ""
}
},
"enableChatHistory": false,
"chatHistoryRound": 3
},
"intents": [
{
"name": "高兴"
},
{
"name": "悲伤"
}
],
"mode": "top_speed",
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
}
}
},
{
"id": "150620",
"type": "15",
"meta": {
"position": {
"x": 690,
"y": 527
}
},
"data": {
"nodeMeta": {
"title": "文本处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "换行",
"value": "\n",
"isDefault": true
},
{
"label": "制表符",
"value": "\t",
"isDefault": true
},
{
"label": "句号",
"value": "。",
"isDefault": true
},
{
"label": "逗号",
"value": "",
"isDefault": true
},
{
"label": "分号",
"value": "",
"isDefault": true
},
{
"label": "空格",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
},
{
"id": "152916",
"type": "21",
"meta": {
"position": {
"x": 1200,
"y": 527
},
"canvasPosition": {
"x": 1088,
"y": 845.5
}
},
"data": {
"nodeMeta": {
"title": "循环",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Loop-v2.jpg",
"description": "用于通过设定循环次数和逻辑,重复执行一系列任务",
"mainColor": "#00B2B2",
"subTitle": "循环"
},
"inputs": {
"loopType": "array",
"loopCount": {
"type": "integer",
"value": {
"type": "literal",
"content": "10"
}
},
"variableParameters": [
{
"name": "v",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
],
"inputParameters": [
{
"name": "input",
"input": {
"type": "list",
"value": {
"type": "literal",
"content": "[\"1\",\"2\"]",
"rawMeta": {
"type": 99
}
},
"schema": {
"type": "string"
}
}
}
]
},
"outputs": [
{
"name": "output",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "108984",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
}
]
},
"blocks": [
{
"id": "108984",
"type": "5",
"meta": {
"position": {
"x": 180,
"y": 0
}
},
"data": {
"nodeMeta": {
"title": "代码_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "152916",
"name": "v"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
}
],
"edges": [
{
"sourceNodeID": "152916",
"targetNodeID": "108984",
"sourcePortID": "loop-function-inline-output"
}
]
},
{
"id": "151269",
"type": "5",
"meta": {
"position": {
"x": 640,
"y": 789.2149478563151
}
},
"data": {
"nodeMeta": {
"title": "代码_2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "149093"
},
{
"sourceNodeID": "100001",
"targetNodeID": "160892"
},
{
"sourceNodeID": "100001",
"targetNodeID": "150620"
},
{
"sourceNodeID": "100001",
"targetNodeID": "151269"
},
{
"sourceNodeID": "173053",
"targetNodeID": "900001"
},
{
"sourceNodeID": "160892",
"targetNodeID": "900001",
"sourcePortID": "branch_0"
},
{
"sourceNodeID": "152916",
"targetNodeID": "900001",
"sourcePortID": "loop-output"
},
{
"sourceNodeID": "149093",
"targetNodeID": "173053"
},
{
"sourceNodeID": "150620",
"targetNodeID": "152916"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,936 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 151.4368482039397,
"y": -5.949999999999974
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2472.966396292005,
"y": -5.949999999999974
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190964",
"name": "Group2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "170911",
"type": "5",
"meta": {
"position": {
"x": 590.2433371958285,
"y": -64.4449015063731
}
},
"data": {
"nodeMeta": {
"title": "代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "190964",
"type": "32",
"meta": {
"position": {
"x": 1524.2815758980303,
"y": -95.4449015063731
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
]
},
{
"name": "Group2",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
},
{
"type": "string",
"name": "Group2"
}
],
"nodeMeta": {
"title": "变量聚合",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
},
{
"id": "156388",
"type": "8",
"meta": {
"position": {
"x": 1974.9942062572422,
"y": 7.571320973348804
}
},
"data": {
"nodeMeta": {
"title": "选择器",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"mainColor": "#00B2B2",
"subTitle": "选择器"
},
"inputs": {
"branches": [
{
"condition": {
"logic": 2,
"conditions": [
{
"operator": 1,
"left": {
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190964",
"name": "Group1"
}
}
}
},
"right": {
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
}
]
}
}
]
}
}
},
{
"id": "118685",
"type": "15",
"meta": {
"position": {
"x": 2359.0498261877174,
"y": 211.3
}
},
"data": {
"nodeMeta": {
"title": "文本处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190964",
"name": "Group1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "换行",
"value": "\n",
"isDefault": true
},
{
"label": "制表符",
"value": "\t",
"isDefault": true
},
{
"label": "句号",
"value": "。",
"isDefault": true
},
{
"label": "逗号",
"value": "",
"isDefault": true
},
{
"label": "分号",
"value": "",
"isDefault": true
},
{
"label": "空格",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
},
{
"id": "113840",
"type": "28",
"meta": {
"position": {
"x": 1039.5249130938587,
"y": -64.4449015063731
},
"canvasPosition": {
"x": 756.0834298957126,
"y": 276.05691112036504
}
},
"data": {
"nodeMeta": {
"title": "批处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Batch-v2.jpg",
"description": "通过设定批量运行次数和逻辑,运行批处理体内的任务",
"mainColor": "#00B2B2",
"subTitle": "批处理"
},
"inputs": {
"concurrentSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "10"
}
},
"batchSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "100"
}
},
"inputParameters": [
{
"name": "input",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key1"
},
"rawMeta": {
"type": 99
}
}
}
}
]
},
"outputs": [
{
"name": "output",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "128176",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
}
]
},
"blocks": [
{
"id": "128176",
"type": "5",
"meta": {
"position": {
"x": 0,
"y": 100
}
},
"data": {
"nodeMeta": {
"title": "批量代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "113840",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "165568",
"type": "32",
"meta": {
"position": {
"x": 420.4750869061413,
"y": 99.29581193873116
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "128176",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
},
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
}
],
"nodeMeta": {
"title": "变量聚合_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
},
{
"id": "113841",
"type": "28",
"meta": {
"position": {
"x": 1039.5249130938587,
"y": -64.4449015063731
},
"canvasPosition": {
"x": 756.0834298957126,
"y": 276.05691112036504
}
},
"data": {
"nodeMeta": {
"title": "批处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Batch-v2.jpg",
"description": "通过设定批量运行次数和逻辑,运行批处理体内的任务",
"mainColor": "#00B2B2",
"subTitle": "批处理"
},
"inputs": {
"concurrentSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "10"
}
},
"batchSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "100"
}
},
"inputParameters": [
{
"name": "input",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key1"
},
"rawMeta": {
"type": 99
}
}
}
}
]
},
"outputs": [
{
"name": "output",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "128176",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
}
]
},
"blocks": [
{
"id": "128177",
"type": "5",
"meta": {
"position": {
"x": 0,
"y": 100
}
},
"data": {
"nodeMeta": {
"title": "批量代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "113840",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "165569",
"type": "32",
"meta": {
"position": {
"x": 420.4750869061413,
"y": 99.29581193873116
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "128176",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
},
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
}
],
"nodeMeta": {
"title": "变量聚合_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
}
],
"edges": [
{
"sourceNodeID": "113841",
"targetNodeID": "128177",
"sourcePortID": "batch-function-inline-output"
},
{
"sourceNodeID": "128177",
"targetNodeID": "165569"
},
{
"sourceNodeID": "165569",
"targetNodeID": "113841",
"targetPortID": "batch-function-inline-input"
}
]
}
],
"edges": [
{
"sourceNodeID": "113840",
"targetNodeID": "128176",
"sourcePortID": "batch-function-inline-output"
},
{
"sourceNodeID": "128176",
"targetNodeID": "113841"
},
{
"sourceNodeID": "113841",
"targetNodeID": "165568"
},
{
"sourceNodeID": "165568",
"targetNodeID": "113840",
"targetPortID": "batch-function-inline-input"
}
]
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "170911"
},
{
"sourceNodeID": "156388",
"targetNodeID": "900001",
"sourcePortID": "true"
},
{
"sourceNodeID": "118685",
"targetNodeID": "900001"
},
{
"sourceNodeID": "170911",
"targetNodeID": "113840"
},
{
"sourceNodeID": "113840",
"targetNodeID": "190964",
"sourcePortID": "batch-output"
},
{
"sourceNodeID": "190964",
"targetNodeID": "156388"
},
{
"sourceNodeID": "156388",
"targetNodeID": "118685",
"sourcePortID": "false"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,660 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -305.7,
"y": -117.30000000000001
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 1388.1500457763673,
"y": -306.3
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "146744",
"name": "output"
},
"rawMeta": {
"type": 99
}
}
}
}
]
}
}
},
{
"id": "139973",
"type": "15",
"meta": {
"position": {
"x": 261.1500457763673,
"y": -130.3
}
},
"data": {
"nodeMeta": {
"title": "文本处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "换行",
"value": "\n",
"isDefault": true
},
{
"label": "制表符",
"value": "\t",
"isDefault": true
},
{
"label": "句号",
"value": "。",
"isDefault": true
},
{
"label": "逗号",
"value": "",
"isDefault": true
},
{
"label": "分号",
"value": "",
"isDefault": true
},
{
"label": "空格",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
},
{
"id": "147187",
"type": "18",
"meta": {
"position": {
"x": 271.1500457763673,
"y": -450.6713716634115
}
},
"data": {
"inputs": {
"llmParam": {
"modelType": 1737521813,
"modelName": "豆包·1.5·Pro·32k",
"generationDiversity": "balance",
"temperature": 0.8,
"maxTokens": 4096,
"responseFormat": 2,
"systemPrompt": ""
},
"inputParameters": [],
"answer_type": "text",
"option_type": "static",
"dynamic_option": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "",
"name": ""
}
}
},
"limit": 3
},
"nodeMeta": {
"title": "问答",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Direct-Question-v2.jpg",
"description": "支持中间向用户提问问题,支持预置选项提问和开放式问题提问两种方式",
"mainColor": "#3071F2",
"subTitle": "问答"
},
"outputs": [
{
"type": "string",
"name": "USER_RESPONSE",
"required": true,
"description": "用户本轮对话输入内容"
}
]
}
},
{
"id": "146744",
"type": "28",
"meta": {
"position": {
"x": 692.1500457763673,
"y": -142
},
"canvasPosition": {
"x": 933.1500457763673,
"y": 109.49950000000001
}
},
"data": {
"nodeMeta": {
"title": "批处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Batch-v2.jpg",
"description": "通过设定批量运行次数和逻辑,运行批处理体内的任务",
"mainColor": "#00B2B2",
"subTitle": "批处理"
},
"inputs": {
"concurrentSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "10"
}
},
"batchSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "100"
}
},
"inputParameters": [
{
"name": "input",
"input": {
"type": "list",
"value": {
"type": "literal",
"content": "[\"1\",\"2\",\"3\"]",
"rawMeta": {
"type": 99
}
},
"schema": {
"type": "string"
}
}
}
]
},
"outputs": [
{
"name": "output",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "129330",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
]
},
"blocks": [
{
"id": "129330",
"type": "15",
"meta": {
"position": {
"x": 0,
"y": 100
}
},
"data": {
"nodeMeta": {
"title": "文本处理_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "146744",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "换行",
"value": "\n",
"isDefault": true
},
{
"label": "制表符",
"value": "\t",
"isDefault": true
},
{
"label": "句号",
"value": "。",
"isDefault": true
},
{
"label": "逗号",
"value": "",
"isDefault": true
},
{
"label": "分号",
"value": "",
"isDefault": true
},
{
"label": "空格",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
},
{
"id": "102623",
"type": "15",
"meta": {
"position": {
"x": 0,
"y": 295.6495
}
},
"data": {
"nodeMeta": {
"title": "文本处理_2",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "139973",
"name": "output"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "换行",
"value": "\n",
"isDefault": true
},
{
"label": "制表符",
"value": "\t",
"isDefault": true
},
{
"label": "句号",
"value": "。",
"isDefault": true
},
{
"label": "逗号",
"value": "",
"isDefault": true
},
{
"label": "分号",
"value": "",
"isDefault": true
},
{
"label": "空格",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
}
],
"edges": [
{
"sourceNodeID": "146744",
"targetNodeID": "129330",
"sourcePortID": "batch-function-inline-output"
},
{
"sourceNodeID": "129330",
"targetNodeID": "146744",
"targetPortID": "batch-function-inline-input"
},
{
"sourceNodeID": "102623",
"targetNodeID": "146744",
"targetPortID": "batch-function-inline-input"
}
]
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "139973"
},
{
"sourceNodeID": "147187",
"targetNodeID": "900001"
},
{
"sourceNodeID": "146744",
"targetNodeID": "900001",
"sourcePortID": "batch-output"
},
{
"sourceNodeID": "139973",
"targetNodeID": "146744"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,698 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": 151.4368482039397,
"y": -5.949999999999974
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": true
}
],
"trigger_parameters": [
{
"type": "string",
"name": "input",
"required": false
},
{
"type": "list",
"name": "array",
"schema": {
"type": "string"
},
"required": true
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 2472.966396292005,
"y": -5.949999999999974
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190964",
"name": "Group2"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "170911",
"type": "5",
"meta": {
"position": {
"x": 590.2433371958285,
"y": -64.4449015063731
}
},
"data": {
"nodeMeta": {
"title": "代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "190964",
"type": "32",
"meta": {
"position": {
"x": 1524.2815758980303,
"y": -95.4449015063731
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
]
},
{
"name": "Group2",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
},
{
"type": "string",
"name": "Group2"
}
],
"nodeMeta": {
"title": "变量聚合",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
},
{
"id": "156388",
"type": "8",
"meta": {
"position": {
"x": 1974.9942062572422,
"y": 7.571320973348804
}
},
"data": {
"nodeMeta": {
"title": "选择器",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"mainColor": "#00B2B2",
"subTitle": "选择器"
},
"inputs": {
"branches": [
{
"condition": {
"logic": 2,
"conditions": [
{
"operator": 1,
"left": {
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "190964",
"name": "Group1"
}
}
}
},
"right": {
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "123",
"rawMeta": {
"type": 1
}
}
}
}
}
]
}
}
]
}
}
},
{
"id": "118685",
"type": "15",
"meta": {
"position": {
"x": 2359.0498261877174,
"y": 211.3
}
},
"data": {
"nodeMeta": {
"title": "文本处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-StrConcat-v2.jpg",
"description": "用于处理多个字符串类型变量的格式",
"mainColor": "#3071F2",
"subTitle": "文本处理"
},
"inputs": {
"method": "concat",
"inputParameters": [
{
"name": "String1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "165568",
"name": "Group1"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"concatParams": [
{
"name": "concatResult",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "{{String1}}",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "arrayItemConcatChar",
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "allArrayItemConcatChars",
"input": {
"type": "list",
"schema": {
"type": "object",
"schema": [
{
"type": "string",
"name": "label",
"required": true
},
{
"type": "string",
"name": "value",
"required": true
},
{
"type": "boolean",
"name": "isDefault",
"required": true
}
]
},
"value": {
"type": "literal",
"content": [
{
"label": "换行",
"value": "\n",
"isDefault": true
},
{
"label": "制表符",
"value": "\t",
"isDefault": true
},
{
"label": "句号",
"value": "。",
"isDefault": true
},
{
"label": "逗号",
"value": "",
"isDefault": true
},
{
"label": "分号",
"value": "",
"isDefault": true
},
{
"label": "空格",
"value": " ",
"isDefault": true
}
]
}
}
}
]
},
"outputs": [
{
"type": "string",
"name": "output",
"required": true
}
]
}
},
{
"id": "113840",
"type": "28",
"meta": {
"position": {
"x": 1039.5249130938587,
"y": -64.4449015063731
},
"canvasPosition": {
"x": 756.0834298957126,
"y": 276.05691112036504
}
},
"data": {
"nodeMeta": {
"title": "批处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Batch-v2.jpg",
"description": "通过设定批量运行次数和逻辑,运行批处理体内的任务",
"mainColor": "#00B2B2",
"subTitle": "批处理"
},
"inputs": {
"concurrentSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "10"
}
},
"batchSize": {
"type": "integer",
"value": {
"type": "literal",
"content": "100"
}
},
"inputParameters": [
{
"name": "input",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key1"
},
"rawMeta": {
"type": 99
}
}
}
}
]
},
"outputs": [
{
"name": "output",
"input": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "128176",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
}
]
},
"blocks": [
{
"id": "128176",
"type": "5",
"meta": {
"position": {
"x": 0,
"y": 100
}
},
"data": {
"nodeMeta": {
"title": "批量代码",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Code-v2.jpg",
"description": "编写代码,处理输入变量来生成返回值",
"mainColor": "#00B2B2",
"subTitle": "代码"
},
"inputs": {
"inputParameters": [
{
"name": "input",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "11384000",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
],
"code": "// 在这里,您可以通过 params 获取节点中的输入变量,并通过 'ret' 输出结果\n// 'params' 和 'ret' 已经被正确地注入到环境中\n// 下面是一个示例获取节点输入中参数名为input的值\n// const input = params.input; \n// 下面是一个示例,输出一个包含多种数据类型的 'ret' 对象:\n// const ret = { \"name\": ‘小明’, \"hobbies\": [“看书”, “旅游”] };\n\nasync function main({ params }: Args): Promise<Output> {\n // 构建输出对象\n const ret = {\n \"key0\": params.input + params.input, // 拼接两次入参 input 的值\n \"key1\": [\"hello\", \"world\"], // 输出一个数组\n \"key2\": { // 输出一个Object\n \"key21\": \"hi\"\n },\n };\n\n return ret;\n}",
"language": 5,
"settingOnError": {
"processType": 1,
"timeoutMs": 60000,
"retryTimes": 0
}
},
"outputs": [
{
"type": "string",
"name": "key0"
},
{
"type": "list",
"name": "key1",
"schema": {
"type": "string"
}
},
{
"type": "object",
"name": "key2",
"schema": [
{
"type": "string",
"name": "key21"
}
]
}
]
}
},
{
"id": "165568",
"type": "32",
"meta": {
"position": {
"x": 420.4750869061413,
"y": 99.29581193873116
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "128176",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
},
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "170911",
"name": "key0"
},
"rawMeta": {
"type": 1
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
}
],
"nodeMeta": {
"title": "变量聚合_1",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
}
],
"edges": [
{
"sourceNodeID": "113840",
"targetNodeID": "128176",
"sourcePortID": "batch-function-inline-output"
},
{
"sourceNodeID": "128176",
"targetNodeID": "165568"
},
{
"sourceNodeID": "165568",
"targetNodeID": "113840",
"targetPortID": "batch-function-inline-input"
}
]
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "170911"
},
{
"sourceNodeID": "156388",
"targetNodeID": "900001",
"sourcePortID": "true"
},
{
"sourceNodeID": "118685",
"targetNodeID": "900001"
},
{
"sourceNodeID": "170911",
"targetNodeID": "113840"
},
{
"sourceNodeID": "113840",
"targetNodeID": "190964",
"sourcePortID": "batch-output"
},
{
"sourceNodeID": "190964",
"targetNodeID": "156388"
},
{
"sourceNodeID": "156388",
"targetNodeID": "118685",
"sourcePortID": "false"
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,210 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -177,
"y": -64
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "input",
"required": false
}
],
"trigger_parameters": []
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 723,
"y": -202
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "output",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "input"
},
"rawMeta": {
"type": 1
}
}
}
}
]
}
}
},
{
"id": "193133",
"type": "40",
"meta": {
"position": {
"x": 288.0000457763672,
"y": -183.85000000000002
}
},
"data": {
"nodeMeta": {
"title": "变量赋值",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/Variable.jpg",
"description": "用于给支持写入的变量赋值,包括应用变量、用户变量",
"mainColor": "#FF811A",
"subTitle": "变量赋值"
},
"inputs": {
"inputParameters": [
{
"name": "app_v1",
"left": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_v1"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "string",
"value": {
"type": "literal",
"content": "1",
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "app_list_v1",
"left": {
"type": "list",
"schema": {
"type": "string"
},
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_list_v1"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "list",
"value": {
"type": "literal",
"content": "[\"1\",\"2\"]",
"rawMeta": {
"type": 99
}
},
"schema": {
"type": "string"
}
}
},
{
"name": "app_list_v2",
"left": {
"type": "list",
"schema": {
"type": "integer"
},
"value": {
"type": "ref",
"content": {
"source": "global_variable_app",
"path": [
"app_list_v2"
],
"blockID": "",
"name": ""
}
}
},
"input": {
"type": "list",
"value": {
"type": "literal",
"content": "[1,2]",
"rawMeta": {
"type": 100
}
},
"schema": {
"type": "integer"
}
}
}
],
"variableTypeMap": {
"app_v1": "global_variable_app",
"app_list_v1": "global_variable_app",
"app_list_v2": "global_variable_app"
}
},
"outputs": [
{
"name": "isSuccess",
"type": "boolean"
}
]
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "193133"
},
{
"sourceNodeID": "193133",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,795 @@
{
"nodes": [
{
"blocks": [],
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"name": "input",
"required": false,
"type": "string"
},
{
"name": "null_value",
"required": false,
"type": "string"
},
{
"name": "input_arr",
"required": false,
"schema": {
"type": "string"
},
"type": "list"
}
],
"trigger_parameters": []
},
"edges": null,
"id": "100001",
"meta": {
"position": {
"x": 0,
"y": 0
}
},
"type": "1"
},
{
"blocks": [],
"data": {
"inputs": {
"content": {
"type": "string",
"value": {
"content": "{{output_obj.Group1}}\n{{Group2}}\n{{output_obj}}",
"type": "literal"
}
},
"inputParameters": [
{
"input": {
"schema": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "150725",
"name": "Group1",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "Group1"
}
],
"type": "object",
"value": {
"type": "object_ref"
}
},
"name": "output_obj"
},
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "171842",
"name": "Group1",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "Group2"
}
],
"streamingOutput": true,
"terminatePlan": "useAnswerContent"
},
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
}
},
"edges": null,
"id": "900001",
"meta": {
"position": {
"x": 2201.8226540717774,
"y": -347.1020271826246
}
},
"type": "2"
},
{
"blocks": [],
"data": {
"inputs": {
"branches": [
{
"condition": {
"conditions": [
{
"left": {
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"type": "ref"
}
}
},
"operator": 3,
"right": {
"input": {
"type": "integer",
"value": {
"content": 3,
"rawMeta": {
"type": 2
},
"type": "literal"
}
}
}
}
],
"logic": 2
}
}
]
},
"nodeMeta": {
"description": "连接多个下游分支,若设定的条件成立则仅运行对应的分支,若均不成立则只运行“否则”分支",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Condition-v2.jpg",
"mainColor": "#00B2B2",
"subTitle": "选择器",
"title": "选择器"
}
},
"edges": null,
"id": "101374",
"meta": {
"position": {
"x": 414,
"y": -13.649999999999991
}
},
"type": "8"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "integer",
"value": {
"content": "1737521813",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "豆包·1.5·Pro·32k",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "4096",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "2",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"description": "调用大语言模型,使用变量和提示词生成回复",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "大模型",
"title": "大模型"
},
"outputs": [
{
"name": "output",
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "193327",
"meta": {
"position": {
"x": 828,
"y": -77.35
}
},
"type": "3"
},
{
"blocks": [],
"data": {
"inputs": {
"inputParameters": [
{
"input": {
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "input",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
"name": "input"
}
],
"llmParam": [
{
"input": {
"type": "float",
"value": {
"content": "0.8",
"rawMeta": {
"type": 4
},
"type": "literal"
}
},
"name": "temperature"
},
{
"input": {
"type": "integer",
"value": {
"content": "2200",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "maxTokens"
},
{
"input": {
"type": "integer",
"value": {
"content": "2",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "responseFormat"
},
{
"input": {
"type": "string",
"value": {
"content": "DeepSeek-R1",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "modleName"
},
{
"input": {
"type": "integer",
"value": {
"content": "1738675233",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "modelType"
},
{
"input": {
"type": "string",
"value": {
"content": "balance",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "generationDiversity"
},
{
"input": {
"type": "string",
"value": {
"content": "",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "prompt"
},
{
"input": {
"type": "boolean",
"value": {
"content": false,
"rawMeta": {
"type": 3
},
"type": "literal"
}
},
"name": "enableChatHistory"
},
{
"input": {
"type": "integer",
"value": {
"content": "3",
"rawMeta": {
"type": 2
},
"type": "literal"
}
},
"name": "chatHistoryRound"
},
{
"input": {
"type": "string",
"value": {
"content": "do not output any reasoning content. output content directly",
"rawMeta": {
"type": 1
},
"type": "literal"
}
},
"name": "systemPrompt"
}
],
"settingOnError": {
"processType": 1,
"retryTimes": 0,
"timeoutMs": 180000
}
},
"nodeMeta": {
"description": "调用大语言模型,使用变量和提示词生成回复",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-LLM-v2.jpg",
"mainColor": "#5C62FF",
"subTitle": "大模型",
"title": "大模型_1"
},
"outputs": [
{
"name": "output",
"type": "string"
},
{
"name": "reasoning_content",
"type": "string"
}
],
"version": "3"
},
"edges": null,
"id": "167144",
"meta": {
"position": {
"x": 828,
"y": 191.89872064182828
}
},
"type": "3"
},
{
"blocks": [],
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"content": {
"blockID": "100001",
"name": "null_value",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
{
"type": "string",
"value": {
"content": {
"blockID": "193327",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
{
"type": "string",
"value": {
"content": {
"blockID": "167144",
"name": "reasoning_content",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
{
"type": "string",
"value": {
"content": {
"blockID": "",
"name": "",
"path": [
"user_var"
],
"source": "global_variable_user"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
{
"type": "string",
"value": {
"content": {
"blockID": "167144",
"name": "output",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
}
]
}
]
},
"nodeMeta": {
"description": "对多个分支的输出进行聚合处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"mainColor": "#00B2B2",
"subTitle": "变量聚合",
"title": "变量聚合"
},
"outputs": [
{
"name": "Group1",
"type": "string"
}
]
},
"edges": null,
"id": "171842",
"meta": {
"position": {
"x": 1267.010161715417,
"y": -1.3499999999999943
}
},
"type": "32"
},
{
"blocks": [],
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"content": {
"blockID": "167144",
"name": "reasoning_content",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
},
{
"type": "string",
"value": {
"content": {
"blockID": "171842",
"name": "Group1",
"source": "block-output"
},
"rawMeta": {
"type": 1
},
"type": "ref"
}
}
]
}
]
},
"nodeMeta": {
"description": "对多个分支的输出进行聚合处理",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"mainColor": "#00B2B2",
"subTitle": "变量聚合",
"title": "变量聚合_1"
},
"outputs": [
{
"name": "Group1",
"type": "string"
}
]
},
"edges": null,
"id": "150725",
"meta": {
"position": {
"x": 1781.932338783341,
"y": 216.89872064182828
}
},
"type": "32"
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "101374",
"sourcePortID": ""
},
{
"sourceNodeID": "150725",
"targetNodeID": "900001",
"sourcePortID": ""
},
{
"sourceNodeID": "101374",
"targetNodeID": "193327",
"sourcePortID": "true"
},
{
"sourceNodeID": "101374",
"targetNodeID": "167144",
"sourcePortID": "false"
},
{
"sourceNodeID": "193327",
"targetNodeID": "171842",
"sourcePortID": ""
},
{
"sourceNodeID": "167144",
"targetNodeID": "171842",
"sourcePortID": ""
},
{
"sourceNodeID": "167144",
"targetNodeID": "150725",
"sourcePortID": ""
},
{
"sourceNodeID": "171842",
"targetNodeID": "150725",
"sourcePortID": ""
}
],
"versions": {
"loop": "v2",
"batch": "v2"
}
}

View File

@@ -0,0 +1,245 @@
{
"nodes": [
{
"id": "100001",
"type": "1",
"meta": {
"position": {
"x": -91.63201373616809,
"y": -400.53873127951556
}
},
"data": {
"nodeMeta": {
"description": "工作流的起始节点,用于设定启动工作流需要的信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-Start-v2.jpg",
"subTitle": "",
"title": "开始"
},
"outputs": [
{
"type": "string",
"name": "v1",
"required": false
},
{
"type": "string",
"name": "v11",
"required": false
},
{
"type": "integer",
"name": "v2",
"required": false
},
{
"type": "integer",
"name": "v21",
"required": false
}
],
"trigger_parameters": [
{
"type": "string",
"name": "v1",
"required": false
},
{
"type": "string",
"name": "v11",
"required": false
},
{
"type": "integer",
"name": "v2",
"required": false
},
{
"type": "integer",
"name": "v21",
"required": false
}
]
}
},
{
"id": "900001",
"type": "2",
"meta": {
"position": {
"x": 896.4395922008138,
"y": -400.53873127951556
}
},
"data": {
"nodeMeta": {
"description": "工作流的最终节点,用于返回工作流运行后的结果信息",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/icon-End-v2.jpg",
"subTitle": "",
"title": "结束"
},
"inputs": {
"terminatePlan": "returnVariables",
"inputParameters": [
{
"name": "g1",
"input": {
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "187282",
"name": "Group1"
},
"rawMeta": {
"type": 1
}
}
}
},
{
"name": "g2",
"input": {
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "187282",
"name": "Group2"
},
"rawMeta": {
"type": 2
}
}
}
}
]
}
}
},
{
"id": "187282",
"type": "32",
"meta": {
"position": {
"x": 390.5405535718591,
"y": -463.9387312795156
}
},
"data": {
"inputs": {
"mergeGroups": [
{
"name": "Group1",
"variables": [
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v1"
},
"rawMeta": {
"type": 1
}
}
},
{
"type": "string",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v11"
},
"rawMeta": {
"type": 1
}
}
}
]
},
{
"name": "Group2",
"variables": [
{
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v2"
},
"rawMeta": {
"type": 2
}
}
},
{
"type": "integer",
"value": {
"type": "ref",
"content": {
"source": "block-output",
"blockID": "100001",
"name": "v21"
},
"rawMeta": {
"type": 2
}
}
},
{
"type": "integer",
"value": {
"type": "literal",
"content": 100,
"rawMeta": {
"type": 2
}
}
}
]
}
]
},
"outputs": [
{
"type": "string",
"name": "Group1"
},
{
"type": "integer",
"name": "Group2"
}
],
"nodeMeta": {
"title": "变量聚合",
"icon": "https://lf3-static.bytednsdoc.com/obj/eden-cn/dvsmryvd_avi_dvsm/ljhwZthlaukjlkulzlp/icon/VariableMerge-icon.jpg",
"description": "对多个分支的输出进行聚合处理",
"mainColor": "#00B2B2",
"subTitle": "变量聚合"
}
}
}
],
"edges": [
{
"sourceNodeID": "100001",
"targetNodeID": "187282"
},
{
"sourceNodeID": "187282",
"targetNodeID": "900001"
}
],
"versions": {
"loop": "v2"
}
}

View File

@@ -0,0 +1,782 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package validate
import (
"context"
"fmt"
"regexp"
"strconv"
"github.com/coze-dev/coze-studio/backend/domain/workflow"
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/variable"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/adaptor"
"github.com/coze-dev/coze-studio/backend/pkg/sonic"
"github.com/coze-dev/coze-studio/backend/types/errno"
)
type Issue struct {
NodeErr *NodeErr
PathErr *PathErr
Message string
}
type NodeErr struct {
NodeID string `json:"nodeID"`
NodeName string `json:"nodeName"`
}
type PathErr struct {
StartNode string `json:"start"`
EndNode string `json:"end"`
}
type reachability struct {
reachableNodes map[string]*vo.Node
nestedReachability map[string]*reachability
}
type Config struct {
Canvas *vo.Canvas
AppID *int64
AgentID *int64
VariablesMetaGetter variable.VariablesMetaGetter
}
type CanvasValidator struct {
cfg *Config
reachability *reachability
}
func NewCanvasValidator(_ context.Context, cfg *Config) (*CanvasValidator, error) {
if cfg == nil {
return nil, fmt.Errorf("config is required")
}
if cfg.Canvas == nil {
return nil, fmt.Errorf("canvas is required")
}
reachability, err := analyzeCanvasReachability(cfg.Canvas)
if err != nil {
return nil, err
}
return &CanvasValidator{reachability: reachability, cfg: cfg}, nil
}
func (cv *CanvasValidator) DetectCycles(_ context.Context) (issues []*Issue, err error) {
issues = make([]*Issue, 0)
nodeIDs := make([]string, 0)
for _, node := range cv.cfg.Canvas.Nodes {
nodeIDs = append(nodeIDs, node.ID)
}
controlSuccessors := map[string][]string{}
for _, e := range cv.cfg.Canvas.Edges {
controlSuccessors[e.TargetNodeID] = append(controlSuccessors[e.TargetNodeID], e.SourceNodeID)
}
cycles := detectCycles(nodeIDs, controlSuccessors)
if len(cycles) == 0 {
return issues, nil
}
for _, cycle := range cycles {
n := len(cycle)
for i := 0; i < n; i++ {
if cycle[i] == cycle[(i+1)%n] {
continue
}
issues = append(issues, &Issue{
PathErr: &PathErr{
StartNode: cycle[i],
EndNode: cycle[(i+1)%n],
},
Message: "line connections do not allow parallel lines to intersect and form loops with each other",
})
}
}
return issues, nil
}
func (cv *CanvasValidator) ValidateConnections(ctx context.Context) (issues []*Issue, err error) {
issues, err = validateConnections(ctx, cv.cfg.Canvas)
if err != nil {
return issues, err
}
return issues, nil
}
func (cv *CanvasValidator) CheckRefVariable(ctx context.Context) (issues []*Issue, err error) {
issues = make([]*Issue, 0)
var checkRefVariable func(reachability *reachability, reachableNodes map[string]bool) error
checkRefVariable = func(reachability *reachability, parentReachableNodes map[string]bool) error {
currentReachableNodes := make(map[string]bool)
combinedReachable := make(map[string]bool)
for _, node := range reachability.reachableNodes {
currentReachableNodes[node.ID] = true
combinedReachable[node.ID] = true
}
if parentReachableNodes != nil {
for id := range parentReachableNodes {
combinedReachable[id] = true
}
}
var inputBlockVerify func(node *vo.Node, ref *vo.BlockInput) error
inputBlockVerify = func(node *vo.Node, inputBlock *vo.BlockInput) error {
if inputBlock.Value.Type != vo.BlockInputValueTypeRef {
return nil
}
ref, err := parseBlockInputRef(inputBlock.Value.Content)
if err != nil {
return err
}
if ref.Source == vo.RefSourceTypeGlobalApp || ref.Source == vo.RefSourceTypeGlobalSystem || ref.Source == vo.RefSourceTypeGlobalUser {
return nil
}
if ref.Source == vo.RefSourceTypeBlockOutput && ref.BlockID == "" {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: node.ID,
NodeName: node.Data.Meta.Title,
},
Message: `ref block error,[blockID] is empty`,
})
return nil
}
if _, exists := combinedReachable[ref.BlockID]; !exists {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: node.ID,
NodeName: node.Data.Meta.Title,
},
Message: fmt.Sprintf(`the node id "%s" on which node id "%s" depends does not exist`, node.ID, ref.BlockID),
})
}
return nil
}
for nodeID, node := range reachability.reachableNodes {
if node.Data != nil && node.Data.Inputs != nil && node.Data.Inputs.InputParameters != nil { // only validate InputParameters
parameters := node.Data.Inputs.InputParameters
for _, p := range parameters {
if p.Input != nil {
valid := validateInputParameterName(p.Name)
if !valid {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: nodeID,
NodeName: node.Data.Meta.Title,
},
Message: fmt.Sprintf(`parameter name only allows number or alphabet, and must begin with alphabet, but it's "%s"`, p.Name),
})
}
err = inputBlockVerify(node, p.Input)
if err != nil {
return err
}
}
if p.Left != nil {
err = inputBlockVerify(node, p.Left)
if err != nil {
return err
}
}
if p.Right != nil {
err = inputBlockVerify(node, p.Right)
if err != nil {
return err
}
}
}
}
}
for _, r := range reachability.nestedReachability {
err := checkRefVariable(r, currentReachableNodes)
if err != nil {
return err
}
}
return nil
}
err = checkRefVariable(cv.reachability, nil)
if err != nil {
return nil, err
}
return issues, nil
}
func (cv *CanvasValidator) ValidateNestedFlows(ctx context.Context) (issues []*Issue, err error) {
issues = make([]*Issue, 0)
for nodeID, node := range cv.reachability.reachableNodes {
if nestedReachableNodes, ok := cv.reachability.nestedReachability[nodeID]; ok && len(nestedReachableNodes.nestedReachability) > 0 {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: nodeID,
NodeName: node.Data.Meta.Title,
},
Message: "composite nodes such as batch/loop cannot be nested",
})
}
}
return issues, nil
}
func (cv *CanvasValidator) CheckGlobalVariables(ctx context.Context) (issues []*Issue, err error) {
if cv.cfg.AppID == nil && cv.cfg.AgentID == nil {
return issues, nil
}
type nodeVars struct {
node *vo.Node
vars map[string]*vo.TypeInfo
}
nVars := make([]*nodeVars, 0)
for _, node := range cv.cfg.Canvas.Nodes {
if node.Type == vo.BlockTypeBotComment {
continue
}
if node.Type == vo.BlockTypeBotAssignVariable {
v := &nodeVars{node: node, vars: make(map[string]*vo.TypeInfo)}
for _, p := range node.Data.Inputs.InputParameters {
v.vars[p.Name], err = adaptor.CanvasBlockInputToTypeInfo(p.Left)
if err != nil {
return nil, err
}
}
nVars = append(nVars, v)
}
}
if len(nVars) == 0 {
return issues, nil
}
var varsMeta map[string]*vo.TypeInfo
if cv.cfg.AppID != nil {
varsMeta, err = cv.cfg.VariablesMetaGetter.GetAppVariablesMeta(ctx, strconv.FormatInt(*cv.cfg.AppID, 10), "")
} else {
varsMeta, err = cv.cfg.VariablesMetaGetter.GetAgentVariablesMeta(ctx, *cv.cfg.AgentID, "")
}
for _, nodeVar := range nVars {
nodeName := nodeVar.node.Data.Meta.Title
nodeID := nodeVar.node.ID
for v, info := range nodeVar.vars {
vInfo, ok := varsMeta[v]
if !ok {
continue
}
if vInfo.Type != info.Type {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: nodeID,
NodeName: nodeName,
},
Message: fmt.Sprintf("node name %v,param [%s], type mismatch", nodeName, v),
})
}
if vInfo.Type == vo.DataTypeArray && info.Type == vo.DataTypeArray {
if vInfo.ElemTypeInfo.Type != info.ElemTypeInfo.Type {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: nodeID,
NodeName: nodeName,
},
Message: fmt.Sprintf("node name %v, param [%s], array element type mismatch", nodeName, v),
})
}
}
}
}
return issues, nil
}
func (cv *CanvasValidator) CheckSubWorkFlowTerminatePlanType(ctx context.Context) (issues []*Issue, err error) {
issues = make([]*Issue, 0)
subWfMap := make([]*vo.Node, 0)
var (
draftIDs []int64
subID2SubVersion = map[int64]string{}
)
var collectSubWorkFlowNodes func(nodes []*vo.Node)
collectSubWorkFlowNodes = func(nodes []*vo.Node) {
for _, n := range nodes {
if n.Type == vo.BlockTypeBotSubWorkflow {
subWfMap = append(subWfMap, n)
wID, err := strconv.ParseInt(n.Data.Inputs.WorkflowID, 10, 64)
if err != nil {
return
}
if len(n.Data.Inputs.WorkflowVersion) > 0 {
subID2SubVersion[wID] = n.Data.Inputs.WorkflowVersion
} else {
draftIDs = append(draftIDs, wID)
}
}
if len(n.Blocks) > 0 {
collectSubWorkFlowNodes(n.Blocks)
}
}
}
collectSubWorkFlowNodes(cv.cfg.Canvas.Nodes)
if len(subWfMap) == 0 {
return issues, nil
}
wfID2Canvas := make(map[int64]*vo.Canvas)
if len(draftIDs) > 0 {
wfs, _, err := workflow.GetRepository().MGetDrafts(ctx, &vo.MGetPolicy{
MetaQuery: vo.MetaQuery{
IDs: draftIDs,
},
})
if err != nil {
return nil, err
}
for _, draft := range wfs {
var canvas vo.Canvas
if err = sonic.UnmarshalString(draft.Canvas, &canvas); err != nil {
return nil, err
}
wfID2Canvas[draft.ID] = &canvas
}
}
if len(subID2SubVersion) > 0 {
for id, version := range subID2SubVersion {
v, err := workflow.GetRepository().GetVersion(ctx, id, version)
if err != nil {
return nil, err
}
var canvas vo.Canvas
if err = sonic.UnmarshalString(v.Canvas, &canvas); err != nil {
return nil, err
}
wfID2Canvas[id] = &canvas
}
}
for _, node := range subWfMap {
wfID, err := strconv.ParseInt(node.Data.Inputs.WorkflowID, 10, 64)
if err != nil {
return nil, err
}
if c, ok := wfID2Canvas[wfID]; !ok {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: node.ID,
NodeName: node.Data.Meta.Title,
},
Message: "sub workflow has been modified, please refresh the page",
})
} else {
_, endNode, err := findStartAndEndNodes(c.Nodes)
if err != nil {
return nil, err
}
if endNode != nil {
if string(*endNode.Data.Inputs.TerminatePlan) != toTerminatePlan(node.Data.Inputs.TerminationType) {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: node.ID,
NodeName: node.Data.Meta.Title,
},
Message: "sub workflow has been modified, please refresh the page",
})
}
}
}
}
return issues, nil
}
func validateConnections(ctx context.Context, c *vo.Canvas) (issues []*Issue, err error) {
issues = make([]*Issue, 0)
nodeMap := buildNodeMap(c)
for _, node := range nodeMap {
if len(node.Blocks) > 0 && len(node.Edges) > 0 {
n := &vo.Node{
ID: node.ID,
Type: node.Type,
Data: node.Data,
}
nestedCanvas := &vo.Canvas{
Nodes: append(node.Blocks, n),
Edges: node.Edges,
}
is, err := validateConnections(ctx, nestedCanvas)
if err != nil {
return nil, err
}
issues = append(issues, is...)
}
}
outDegree := make(map[string]int)
selectorPorts := make(map[string]map[string]bool)
for nodeID, node := range nodeMap {
switch node.Type {
case vo.BlockTypeCondition:
branches := node.Data.Inputs.Branches
if _, exists := selectorPorts[nodeID]; !exists {
selectorPorts[nodeID] = make(map[string]bool)
}
selectorPorts[nodeID]["false"] = true
for index := range branches {
if index == 0 {
selectorPorts[nodeID]["true"] = true
} else {
selectorPorts[nodeID][fmt.Sprintf("true_%v", index)] = true
}
}
case vo.BlockTypeBotIntent:
intents := node.Data.Inputs.Intents
if _, exists := selectorPorts[nodeID]; !exists {
selectorPorts[nodeID] = make(map[string]bool)
}
for index := range intents {
selectorPorts[nodeID][fmt.Sprintf("branch_%v", index)] = true
}
selectorPorts[nodeID]["default"] = true
if node.Data.Inputs.SettingOnError != nil && node.Data.Inputs.SettingOnError.ProcessType != nil &&
*node.Data.Inputs.SettingOnError.ProcessType == vo.ErrorProcessTypeExceptionBranch {
selectorPorts[nodeID]["branch_error"] = true
}
case vo.BlockTypeQuestion:
if node.Data.Inputs.QA.AnswerType == vo.QAAnswerTypeOption {
if _, exists := selectorPorts[nodeID]; !exists {
selectorPorts[nodeID] = make(map[string]bool)
}
if node.Data.Inputs.QA.OptionType == vo.QAOptionTypeStatic {
for index := range node.Data.Inputs.QA.Options {
selectorPorts[nodeID][fmt.Sprintf("branch_%v", index)] = true
}
}
if node.Data.Inputs.QA.OptionType == vo.QAOptionTypeDynamic {
selectorPorts[nodeID][fmt.Sprintf("branch_%v", 0)] = true
}
}
default:
if node.Data.Inputs != nil && node.Data.Inputs.SettingOnError != nil &&
node.Data.Inputs.SettingOnError.ProcessType != nil &&
*node.Data.Inputs.SettingOnError.ProcessType == vo.ErrorProcessTypeExceptionBranch {
if _, exists := selectorPorts[nodeID]; !exists {
selectorPorts[nodeID] = make(map[string]bool)
}
selectorPorts[nodeID]["branch_error"] = true
selectorPorts[nodeID]["default"] = true
} else {
outDegree[node.ID] = 0
}
}
}
for _, edge := range c.Edges {
outDegree[edge.SourceNodeID]++
}
portOutDegree := make(map[string]map[string]int) // 节点ID -> 端口 -> 出度
for _, edge := range c.Edges {
if _, ok := selectorPorts[edge.SourceNodeID]; !ok {
continue
}
if _, exists := portOutDegree[edge.SourceNodeID]; !exists {
portOutDegree[edge.SourceNodeID] = make(map[string]int)
}
portOutDegree[edge.SourceNodeID][edge.SourcePortID]++
}
for nodeID, node := range nodeMap {
nodeName := node.Data.Meta.Title
switch node.Type {
case vo.BlockTypeBotStart:
if outDegree[nodeID] == 0 {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: nodeID,
NodeName: nodeName,
},
Message: `node "start" not connected`,
})
}
case vo.BlockTypeBotEnd:
default:
if ports, isSelector := selectorPorts[nodeID]; isSelector {
selectorIssues := &Issue{NodeErr: &NodeErr{
NodeID: node.ID,
NodeName: nodeName,
}}
message := ""
for port := range ports {
if portOutDegree[nodeID][port] == 0 {
message += fmt.Sprintf(`node "%v"'s port "%v" not connected;`, nodeName, port)
}
}
if len(message) > 0 {
selectorIssues.Message = message
issues = append(issues, selectorIssues)
}
} else {
// break, continue 不检查出度
if node.Type == vo.BlockTypeBotBreak || node.Type == vo.BlockTypeBotContinue {
continue
}
if outDegree[nodeID] == 0 {
issues = append(issues, &Issue{
NodeErr: &NodeErr{
NodeID: node.ID,
NodeName: nodeName,
},
Message: fmt.Sprintf(`node "%v" not connected`, nodeName),
})
}
}
}
}
return issues, nil
}
func analyzeCanvasReachability(c *vo.Canvas) (*reachability, error) {
nodeMap := buildNodeMap(c)
reachable := &reachability{}
if err := processNestedReachability(c, reachable); err != nil {
return nil, err
}
startNode, endNode, err := findStartAndEndNodes(c.Nodes)
if err != nil {
return nil, err
}
edgeMap := make(map[string][]string)
for _, edge := range c.Edges {
edgeMap[edge.SourceNodeID] = append(edgeMap[edge.SourceNodeID], edge.TargetNodeID)
}
reachable.reachableNodes, err = performReachabilityAnalysis(nodeMap, edgeMap, startNode, endNode)
if err != nil {
return nil, err
}
return reachable, nil
}
func buildNodeMap(c *vo.Canvas) map[string]*vo.Node {
nodeMap := make(map[string]*vo.Node, len(c.Nodes))
for _, node := range c.Nodes {
nodeMap[node.ID] = node
}
return nodeMap
}
func processNestedReachability(c *vo.Canvas, r *reachability) error {
for _, node := range c.Nodes {
if len(node.Blocks) > 0 && len(node.Edges) > 0 {
nestedCanvas := &vo.Canvas{
Nodes: append([]*vo.Node{
{
ID: node.ID,
Type: vo.BlockTypeBotStart,
Data: node.Data,
},
{
ID: node.ID,
Type: vo.BlockTypeBotEnd,
},
}, node.Blocks...),
Edges: node.Edges,
}
nestedReachable, err := analyzeCanvasReachability(nestedCanvas)
if err != nil {
return fmt.Errorf("processing nested canvas for node %s: %w", node.ID, err)
}
if r.nestedReachability == nil {
r.nestedReachability = make(map[string]*reachability)
}
r.nestedReachability[node.ID] = nestedReachable
}
}
return nil
}
func findStartAndEndNodes(nodes []*vo.Node) (*vo.Node, *vo.Node, error) {
var startNode, endNode *vo.Node
for _, node := range nodes {
switch node.Type {
case vo.BlockTypeBotStart:
startNode = node
case vo.BlockTypeBotEnd:
endNode = node
}
}
if startNode == nil {
return nil, nil, fmt.Errorf("start node not found")
}
if endNode == nil {
return nil, nil, fmt.Errorf("end node not found")
}
return startNode, endNode, nil
}
func performReachabilityAnalysis(nodeMap map[string]*vo.Node, edgeMap map[string][]string, startNode *vo.Node, endNode *vo.Node) (map[string]*vo.Node, error) {
result := make(map[string]*vo.Node)
result[startNode.ID] = startNode
queue := []string{startNode.ID}
visited := make(map[string]bool)
visited[startNode.ID] = true
for len(queue) > 0 {
currentID := queue[0]
queue = queue[1:]
for _, targetNodeID := range edgeMap[currentID] {
if !visited[targetNodeID] {
visited[targetNodeID] = true
node, ok := nodeMap[targetNodeID]
if !ok {
return nil, fmt.Errorf("node not found for %s in nodeMap", targetNodeID)
}
result[targetNodeID] = node
queue = append(queue, targetNodeID)
}
}
}
return result, nil
}
func toTerminatePlan(p int) string {
switch p {
case 0:
return "returnVariables"
case 1:
return "useAnswerContent"
default:
return ""
}
}
func detectCycles(nodes []string, controlSuccessors map[string][]string) [][]string {
visited := map[string]bool{}
var dfs func(path []string) [][]string
dfs = func(path []string) [][]string {
var ret [][]string
pathEnd := path[len(path)-1]
successors, ok := controlSuccessors[pathEnd]
if !ok {
return nil
}
for _, successor := range successors {
visited[successor] = true
var looped bool
for i, node := range path {
if node == successor {
ret = append(ret, append(path[i:], successor))
looped = true
break
}
}
if looped {
continue
}
ret = append(ret, dfs(append(path, successor))...)
}
return ret
}
var ret [][]string
for _, node := range nodes {
if !visited[node] {
ret = append(ret, dfs([]string{node})...)
}
}
return ret
}
func parseBlockInputRef(content any) (*vo.BlockInputReference, error) {
m, ok := content.(map[string]any)
if !ok {
return nil, fmt.Errorf("invalid content type: %T when parse BlockInputRef", content)
}
marshaled, err := sonic.Marshal(m)
if err != nil {
return nil, vo.WrapError(errno.ErrSerializationDeserializationFail, err)
}
p := &vo.BlockInputReference{}
if err = sonic.Unmarshal(marshaled, p); err != nil {
return nil, vo.WrapError(errno.ErrSerializationDeserializationFail, err)
}
return p, nil
}
var validateNameRegex = regexp.MustCompile(`^[A-Za-z_][A-Za-z0-9_]*$`)
func validateInputParameterName(name string) bool {
return validateNameRegex.Match([]byte(name))
}