{"Message":"新增项目图片AI生成功能","MessageType":2,"Modules":[{"State":1,"Type":1,"Name":"PCPage/项目信息"},{"State":1,"Type":15,"Name":"ServerCommand/AI对话"},{"State":1,"Type":40,"Name":"Plugin"},{"State":1,"Type":15,"Name":"ServerCommand/生成图片"},{"State":3,"Type":15,"Name":"ServerCommand/生成项目封面"}],"Version":"v1"}
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
"ParamNameToSaveNewRowValue": "主题信息"
|
||||
}
|
||||
],
|
||||
"ID": "d6c5daec-d717-4b22-8215-9379e8c3ba49"
|
||||
"ID": "d6b8fb4a-01bd-4371-99f1-18aaa3b4c169"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -343,7 +343,7 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"ID": "dcb2c40e-7342-4438-8034-5ff4d3a55bbf"
|
||||
"ID": "03d86005-473f-46ad-b5e1-b31f48cef5c1"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -353,7 +353,7 @@
|
||||
"Message": "回答完毕"
|
||||
}
|
||||
],
|
||||
"ID": "012d2a10-875b-40e8-b595-d86228756ec6"
|
||||
"ID": "6c2da05e-4900-40ba-8eb5-96411b30c69e"
|
||||
},
|
||||
{
|
||||
"CommandList": [
|
||||
@@ -363,7 +363,7 @@
|
||||
"Message": "请输入消息"
|
||||
}
|
||||
],
|
||||
"ID": "d9d8d0df-a096-48b9-8943-62021295df07"
|
||||
"ID": "ee0ed562-635a-4011-9c69-4b9266f42647"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -48,13 +48,12 @@
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=Prompt"
|
||||
},
|
||||
"Model": "dall-e-3",
|
||||
"Size": "512x512",
|
||||
"Number": 1,
|
||||
"Style": "natural",
|
||||
"Quality": "standard",
|
||||
"Response_format": "b64_json",
|
||||
"UserName": "Administrator",
|
||||
"FileName": "新生成的图片",
|
||||
"ResultTo": "result"
|
||||
},
|
||||
{
|
||||
|
||||
374
ServerCommands/AI/生成项目封面.json
Normal file
374
ServerCommands/AI/生成项目封面.json
Normal file
@@ -0,0 +1,374 @@
|
||||
{
|
||||
"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": "2"
|
||||
}
|
||||
],
|
||||
"InvokeTriggerTestData": {
|
||||
"UserName": "Administrator"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||||
"ParameterName": "当前用户",
|
||||
"ParameterValue": "%CurrentUser%",
|
||||
"ID": "28b1de6dd9b246fe8ab029030e502ed0"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||||
"ParameterName": "项目",
|
||||
"TableValue": {
|
||||
"TableName": "项目表",
|
||||
"TableValueType": 1,
|
||||
"BindingInfos": [
|
||||
{
|
||||
"GUID": "d2c29a63-a2e8-413c-b1d0-56474a78b2b2",
|
||||
"BindingInfo": {
|
||||
"TableName": "项目表",
|
||||
"ColumnName": "项目名称",
|
||||
"GUID": "2e422ab6-d64e-4a2e-9ff2-9878808d3c5c"
|
||||
},
|
||||
"ColumnName": "项目名称"
|
||||
},
|
||||
{
|
||||
"GUID": "8163ca70-051a-4cb2-ae0f-bedd0b91de5c",
|
||||
"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": "fc63a37bbd2c40148f97f2f337607c77"
|
||||
},
|
||||
{
|
||||
"$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.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": "=LEN(项目.项目简介)"
|
||||
}
|
||||
},
|
||||
"value": "12",
|
||||
"compareType": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"CommandList": [
|
||||
{
|
||||
"$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英文关键词,用来描述这张图片,以便AI能够准确生成,你可以根据我提供的项目信息,来生成合适的图片描述,以职业、商务、工作主题为主,风格为真实摄影,场景可以是办公楼、办公室、工作场景等,灯光明亮自然,可以抽象一些,而且不要包含明显人物。需要注意的是,你的回复应该只包含我需要的描述,不需要任何其他引导性、说明性文字。",
|
||||
"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": "655e2ed0116d42d1910e21f5c52be130"
|
||||
},
|
||||
{
|
||||
"$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": "31fe719227d54079a1094a6ba7a1d41c"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "0",
|
||||
"Message": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=图片地址"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ID": "41779c76-11b9-47f0-8622-79c68cf20051"
|
||||
},
|
||||
{
|
||||
"CommandList": [
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "400",
|
||||
"Message": "项目资料不全,请在项目简介中尽量详细说明项目背景、使用场景、使用人群等。"
|
||||
}
|
||||
],
|
||||
"ID": "6ce09b77-fba4-4287-b7b9-4cd5e7aad5f5"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ID": "510729d7-9775-49ea-8844-c5f9cbe070b6"
|
||||
},
|
||||
{
|
||||
"CommandList": [
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "400",
|
||||
"Message": "项目不存在"
|
||||
}
|
||||
],
|
||||
"ID": "e4f3d3d5-142b-41d4-99f8-74fb9f34e138"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user