package flow import ( flowDto "ai-agent/workflow/model/dto/flow" "context" "fmt" ) // HttpLambda 构建HTTP(S)接口 func HttpLambda(ctx context.Context, input any) (any, error) { nodeInput, ok := input.(*flowDto.NodeExecutionInput) if !ok { return nil, fmt.Errorf("入参类型错误") } outputRes, err := HttpCallResultLambda(ctx, nodeInput) if err != nil { return nil, err } nodeInput.Config.OutputResult = outputRes return nodeInput, nil }