{"Message":"1. 增加AI生成项目图片功能(尚未测试通);","MessageType":2,"Modules":[{"State":1,"Type":1,"Name":"PCPage/项目信息"},{"State":1,"Type":15,"Name":"ServerCommand/AI对话"},{"State":1,"Type":40,"Name":"Plugin"},{"State":3,"Type":15,"Name":"ServerCommand/生成图片"}],"Version":"v1"}
This commit is contained in:
103
ServerCommands/AI/生成图片.json
Normal file
103
ServerCommands/AI/生成图片.json
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"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"
|
||||
},
|
||||
"Model": "dall-e-3",
|
||||
"Size": "512x512",
|
||||
"Number": 1,
|
||||
"Style": "natural",
|
||||
"Quality": "standard",
|
||||
"Response_format": "b64_json",
|
||||
"UserName": "Administrator",
|
||||
"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": "图片地址"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user