102 lines
3.2 KiB
JSON
102 lines
3.2 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": "Prompt",
|
||
"DataValidationInfo": {
|
||
"IgnoreBlank": false
|
||
},
|
||
"TestData": "生成一个封面图片,用于描述:Clue、有绪、综合管理系统,使用真实摄影风格,具有商务、工作的特点,色彩清爽、低饱和度。"
|
||
}
|
||
],
|
||
"InvokeTriggerTestData": {
|
||
"UserName": "Administrator"
|
||
}
|
||
}
|
||
],
|
||
"Commands": [
|
||
{
|
||
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
|
||
"TryCommandPart": {
|
||
"CommandList": [
|
||
{
|
||
"$type": "OPENAIFORGUNCY.CreateImage, OPENAIFORGUNCY",
|
||
"URL": "https://openai.api2d.net",
|
||
"APIKEY": "fk211858-C6yKrsealBkvHao04yT9Ypg6GR0NVPyh",
|
||
"ORGANIZATION": "",
|
||
"Prompt": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=Prompt"
|
||
},
|
||
"Size": "512x512",
|
||
"Number": 1,
|
||
"Style": "natural",
|
||
"Quality": "standard",
|
||
"UserName": "Administrator",
|
||
"FileName": "新生成的图片",
|
||
"ResultTo": "result"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "0",
|
||
"Message": "生成完毕",
|
||
"CustomReturns": [
|
||
{
|
||
"ReturnPropertyName": "图片地址",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=result.0"
|
||
}
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"CatchCommandPart": {
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=ExceptionCode"
|
||
},
|
||
"Message": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=ExceptionMessage"
|
||
},
|
||
"CustomReturns": [
|
||
{
|
||
"ReturnPropertyName": "图片地址"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"ReturnProperties": [
|
||
{
|
||
"Name": "图片地址"
|
||
}
|
||
]
|
||
} |