507 lines
23 KiB
JSON
507 lines
23 KiB
JSON
{
|
||
"Name": "生成项目封面",
|
||
"Enabled": true,
|
||
"Triggers": [
|
||
{
|
||
"$type": "Forguncy.SaveLoad.PostRequestTriggerSaveData, ServerDesignerCommon",
|
||
"Permission": {
|
||
"PermissionData": {
|
||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionData, Forguncy.RbacPermission.Core",
|
||
"permissionResource": {
|
||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionResource, Forguncy.RbacPermission.Core"
|
||
},
|
||
"permissionBindings": [
|
||
{
|
||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core",
|
||
"roleNames": [
|
||
"FGC_LoginUser"
|
||
]
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"Parameters": [
|
||
{
|
||
"Name": "项目ID",
|
||
"DataValidationInfo": {
|
||
"IgnoreBlank": false
|
||
},
|
||
"TestData": "13"
|
||
}
|
||
],
|
||
"InvokeTriggerTestData": {
|
||
"UserName": "Administrator",
|
||
"RequestTimeout": 200
|
||
}
|
||
}
|
||
],
|
||
"Commands": [
|
||
{
|
||
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
|
||
"TryCommandPart": {
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "当前用户",
|
||
"ParameterValue": "%CurrentUser%",
|
||
"ID": "b9907689a4444b30ab6f2863f9702dda"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "项目",
|
||
"TableValue": {
|
||
"TableName": "项目表",
|
||
"TableValueType": 1,
|
||
"BindingInfos": [
|
||
{
|
||
"GUID": "0c6372c7-35b2-4d8f-9a28-fddaf84330ec",
|
||
"BindingInfo": {
|
||
"TableName": "项目表",
|
||
"ColumnName": "项目名称",
|
||
"GUID": "2e422ab6-d64e-4a2e-9ff2-9878808d3c5c"
|
||
},
|
||
"ColumnName": "项目名称"
|
||
},
|
||
{
|
||
"GUID": "20c6bf15-496b-4ac0-822a-9c3df517f53c",
|
||
"BindingInfo": {
|
||
"TableName": "项目表",
|
||
"ColumnName": "项目简介",
|
||
"GUID": "cc7282d1-923f-4221-b499-88fbf12d02ab"
|
||
},
|
||
"ColumnName": "项目简介"
|
||
}
|
||
],
|
||
"SqlCondition": {
|
||
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
||
"ColumnBindingInfo": {
|
||
"TableName": "项目表",
|
||
"ColumnName": "ID",
|
||
"GUID": "deb5d689-0982-43f4-a5c0-7daeebaee349"
|
||
},
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目ID"
|
||
}
|
||
},
|
||
"TopCount": "1"
|
||
},
|
||
"ID": "e91db780eb764a39bb3c08fe95083c24"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
|
||
"ConditionAndCommandPairList": [
|
||
{
|
||
"Condition": {
|
||
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
||
"param": {
|
||
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
||
"ParamObject": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目"
|
||
}
|
||
},
|
||
"value": "%Null%",
|
||
"compareType": 1
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "简介字数",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=LEN(项目.项目简介)"
|
||
},
|
||
"ID": "1c3d13eac3964aeaa4e075aaa233ebc1"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
|
||
"ConditionAndCommandPairList": [
|
||
{
|
||
"Condition": {
|
||
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
|
||
"SubConditions": [
|
||
{
|
||
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
||
"param": {
|
||
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
||
"ParamObject": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目.项目名称"
|
||
}
|
||
},
|
||
"value": "%Null%",
|
||
"compareType": 1
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
||
"param": {
|
||
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
||
"ParamObject": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目.项目简介"
|
||
}
|
||
},
|
||
"value": "%Null%",
|
||
"compareType": 1
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
||
"param": {
|
||
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
||
"ParamObject": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=简介字数"
|
||
}
|
||
},
|
||
"value": "12",
|
||
"compareType": 2
|
||
}
|
||
]
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "MustachePlugin.Render, MustachePlugin",
|
||
"DataSrouce": "我的软件需要一个封面图片,项目的名称叫“{{项目名称}}”,简介:{{项目简介}},请根据项目信息,推测它所在的行业和适合作为封面的场景,为我生成Prompt。我希望图片不要太花哨,颜色要纯净、高级。",
|
||
"UseCustomsDataHash": true,
|
||
"CustomsDataHash": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目"
|
||
},
|
||
"SetMaxRecursionDepth": 512,
|
||
"ResultTo": "输出结果"
|
||
},
|
||
{
|
||
"$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit",
|
||
"OperationParamaterPairs": [
|
||
{
|
||
"Name": "role",
|
||
"Value": "user"
|
||
},
|
||
{
|
||
"Name": "content",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=输出结果"
|
||
}
|
||
}
|
||
],
|
||
"OutParamaterName": "user"
|
||
},
|
||
{
|
||
"$type": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit",
|
||
"InParamater": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=user"
|
||
},
|
||
"Operation": 15,
|
||
"OutParamaterName": "消息列表"
|
||
},
|
||
{
|
||
"$type": "OPENAIFORGUNCY.Completions, OPENAIFORGUNCY",
|
||
"URL": "https://openai.api2d.net",
|
||
"APIKEY": "fk211858-C6yKrsealBkvHao04yT9Ypg6GR0NVPyh",
|
||
"IsDataSource": "json",
|
||
"MessageJSON": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=消息列表"
|
||
},
|
||
"Parameter": {
|
||
"Model": 38,
|
||
"Temperature": 1.0,
|
||
"TopP": 1.0,
|
||
"MaxTokens": 100,
|
||
"SystemContent": "你是一个专业的图片Prompt创意专家,你需要根据我给出的要求,生成一段英文Prompt,用于给AI生成图片。Prompt中你需要用英文关键词,对主题、场景、风格、灯光、角度、颜色、质感等等做详细描述,你的回复中只能包含最终生成的Prompt,不能有任何引导语、描述语。",
|
||
"Response_format": "text"
|
||
},
|
||
"Tools": [],
|
||
"ResultTo": "result",
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "Prompt",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=result.content"
|
||
},
|
||
"ID": "4cf035c0b1844b09a0afa97dd93b2a68"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon",
|
||
"ServerCommandName": "生成图片",
|
||
"Parameters": [
|
||
{
|
||
"$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon",
|
||
"ParamName": "Prompt",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=Prompt"
|
||
}
|
||
}
|
||
],
|
||
"ResultErrorCodeTo": {
|
||
"SerializeProperty": "code"
|
||
},
|
||
"ResultMessageTo": {
|
||
"SerializeProperty": "msg"
|
||
},
|
||
"ReturnPropertiesTo": [
|
||
{
|
||
"ResultPropertyName": "图片地址",
|
||
"ResultTo": {
|
||
"SerializeProperty": "图片地址"
|
||
}
|
||
}
|
||
],
|
||
"RefreshAfterFinish": true,
|
||
"CheckDataValidation": true
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
||
"TableName": "项目表",
|
||
"ShowConfirm": false,
|
||
"RowsToUpdate": 1,
|
||
"RowsToUpdateCondition": {
|
||
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
||
"ColumnBindingInfo": {
|
||
"TableName": "项目表",
|
||
"ColumnName": "ID",
|
||
"GUID": "e97813c0-1ef7-4799-9af9-b2e4b8af270a"
|
||
},
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目ID"
|
||
}
|
||
},
|
||
"UpdateBindingValues": [
|
||
{
|
||
"BindingInfo": {
|
||
"TableName": "项目表",
|
||
"ColumnName": "项目封面",
|
||
"GUID": "b723f549-8cc0-4816-981e-9754b294aa55"
|
||
},
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=图片地址"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit",
|
||
"OperationParamaterPairs": [
|
||
{
|
||
"Name": "页面名称",
|
||
"Value": "项目首页"
|
||
},
|
||
{
|
||
"Name": "打开方式",
|
||
"Value": "跳转页面"
|
||
},
|
||
{
|
||
"Name": "打开样式"
|
||
},
|
||
{
|
||
"Name": "主题",
|
||
"Value": "成功"
|
||
},
|
||
{
|
||
"Name": "传值",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目ID"
|
||
}
|
||
},
|
||
{
|
||
"Name": "目标单元格",
|
||
"Value": "项目ID"
|
||
}
|
||
],
|
||
"OutParamaterName": "参数对象"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.NotificationMessageCommand, ServerDesignerCommon",
|
||
"NotificationName": "提醒通知",
|
||
"SendType": 1,
|
||
"UserNames": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=当前用户"
|
||
},
|
||
"Params": [
|
||
{
|
||
"Name": "标题",
|
||
"Value": "任务完成"
|
||
},
|
||
{
|
||
"Name": "内容",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=\"项目\"&项目.项目名称&\"的封面已经生成完毕,记得看看哦~\""
|
||
}
|
||
},
|
||
{
|
||
"Name": "类型",
|
||
"Value": "打开页面",
|
||
"Remark": "分为:打开页面、执行命令..."
|
||
},
|
||
{
|
||
"Name": "参数对象",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=参数对象"
|
||
}
|
||
}
|
||
],
|
||
"ID": "2f75ccf37baf40af82ba7be5d052a5d6"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "0",
|
||
"Message": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=图片地址"
|
||
}
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "8313122a-ccd7-4205-a4c0-ccaa96b07fd9"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": "项目资料不全,请在项目简介中尽量详细说明项目背景、使用场景、使用人群等。"
|
||
}
|
||
],
|
||
"ID": "64bb754c-3f26-4d67-a73b-9c5e23c57a1b"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "dc5669cc-9c9a-4cb6-91cd-77e47f09e9c9"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": "项目不存在"
|
||
}
|
||
],
|
||
"ID": "1d51bd03-17f8-43f5-a9f2-b0de38ec89df"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"CatchCommandPart": {
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
||
"TableName": "日志表",
|
||
"UpdateType": "add",
|
||
"ShowConfirm": false,
|
||
"UpdateBindingValues": [
|
||
{
|
||
"BindingInfo": {
|
||
"TableName": "日志表",
|
||
"ColumnName": "标题",
|
||
"GUID": "409f3d0c-1e3c-409f-89fa-e35284eed38d"
|
||
},
|
||
"Value": "AI生成项目封面"
|
||
},
|
||
{
|
||
"BindingInfo": {
|
||
"TableName": "日志表",
|
||
"ColumnName": "内容",
|
||
"GUID": "427eb193-17cd-49c5-8b8a-c81d83289c47"
|
||
},
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=ExceptionMessage"
|
||
}
|
||
},
|
||
{
|
||
"BindingInfo": {
|
||
"TableName": "日志表",
|
||
"ColumnName": "类型",
|
||
"GUID": "6c1b5b7d-3076-4feb-8917-2e3ba41e4bb2"
|
||
},
|
||
"Value": "错误"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit",
|
||
"OperationParamaterPairs": [
|
||
{
|
||
"Name": "页面名称",
|
||
"Value": "项目首页"
|
||
},
|
||
{
|
||
"Name": "打开方式",
|
||
"Value": "跳转页面"
|
||
},
|
||
{
|
||
"Name": "打开样式"
|
||
},
|
||
{
|
||
"Name": "主题",
|
||
"Value": "成功"
|
||
},
|
||
{
|
||
"Name": "传值",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=项目ID"
|
||
}
|
||
},
|
||
{
|
||
"Name": "目标单元格",
|
||
"Value": "项目ID"
|
||
}
|
||
],
|
||
"OutParamaterName": "参数对象"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.NotificationMessageCommand, ServerDesignerCommon",
|
||
"NotificationName": "提醒通知",
|
||
"SendType": 1,
|
||
"UserNames": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=当前用户"
|
||
},
|
||
"Params": [
|
||
{
|
||
"Name": "标题",
|
||
"Value": "生成项目图片失败"
|
||
},
|
||
{
|
||
"Name": "内容",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=ExceptionMessage"
|
||
}
|
||
},
|
||
{
|
||
"Name": "类型",
|
||
"Value": "打开页面",
|
||
"Remark": "分为:打开页面、执行命令..."
|
||
},
|
||
{
|
||
"Name": "参数对象",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=参数对象"
|
||
}
|
||
}
|
||
],
|
||
"ID": "cfd62bd647df4e64ba3428d7f54370d9"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
]
|
||
} |