534 lines
25 KiB
JSON
534 lines
25 KiB
JSON
{
|
||
"Name": "生成项目封面",
|
||
"Enabled": true,
|
||
"Triggers": [
|
||
{
|
||
"$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon",
|
||
"Parameters": [
|
||
{
|
||
"Name": "项目ID",
|
||
"DataValidationInfo": {
|
||
"IgnoreBlank": false
|
||
},
|
||
"TestData": "13"
|
||
},
|
||
{
|
||
"Name": "当前用户",
|
||
"DataValidationInfo": {}
|
||
}
|
||
],
|
||
"InvokeTriggerTestData": {
|
||
"UserName": "Administrator",
|
||
"RequestTimeout": 200
|
||
}
|
||
}
|
||
],
|
||
"Commands": [
|
||
{
|
||
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
|
||
"TryCommandPart": {
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "项目",
|
||
"TableValue": {
|
||
"TableName": "项目表",
|
||
"TableValueType": 1,
|
||
"BindingInfos": [
|
||
{
|
||
"GUID": "d7dd533a-f61e-493e-970b-c75065b89c4c",
|
||
"BindingInfo": {
|
||
"TableName": "项目表",
|
||
"ColumnName": "项目名称",
|
||
"GUID": "2e422ab6-d64e-4a2e-9ff2-9878808d3c5c"
|
||
},
|
||
"ColumnName": "项目名称"
|
||
},
|
||
{
|
||
"GUID": "291e03d0-3fe3-4844-82dd-0269f040abac",
|
||
"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": "4258d9cad0ab46759a779ee7d5e19d41"
|
||
},
|
||
{
|
||
"$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",
|
||
"ORGANIZATION": "",
|
||
"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.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.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": "34a32d9791db4e28a98c3e124753d6d8"
|
||
}
|
||
],
|
||
"ID": "de0eb037-cdf2-4ffc-aeda-68cb21f5c194"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "0",
|
||
"Message": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=图片地址"
|
||
}
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "29c417ad-acc1-4090-8c57-b4488d70f42d"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": "项目资料不全,请在项目简介中尽量详细说明项目背景、使用场景、使用人群等。"
|
||
}
|
||
],
|
||
"ID": "c55858dc-490a-46df-8089-7cbc9e0d3dd6"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "d10f1f75-7727-46fd-804b-b4465a8a0b81"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": "项目不存在"
|
||
}
|
||
],
|
||
"ID": "3af87cd0-555b-40ce-bcaa-3d3248a1276d"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"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.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.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": "36f09bdad8db44d69c390c4231083668"
|
||
}
|
||
],
|
||
"ID": "c4cdfa84-d611-4e46-b043-3654cdfc720b"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
}
|
||
]
|
||
} |