{"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:
超哥
2024-06-16 18:37:40 +08:00
parent 0080f24090
commit 9307528f5e
6 changed files with 642 additions and 422 deletions

View File

@@ -43,7 +43,7 @@
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "a9b60d4b-d619-4d43-b6f0-b94a360cadbc",
"GUID": "7279057e-3b7f-4107-ba4a-e3a05dd993be",
"BindingInfo": {
"TableName": "对话主题",
"ColumnName": "ID",
@@ -52,7 +52,7 @@
"ColumnName": "ID"
},
{
"GUID": "5ce898a4-1e9b-47df-ba38-92acdf04fcb0",
"GUID": "b75193c7-b3cf-4a34-b095-f00dc18cf561",
"BindingInfo": {
"TableName": "对话主题",
"ColumnName": "主题",
@@ -75,7 +75,7 @@
},
"NullFormulaValueQueryPolicy": 0
},
"ID": "227381e6e4ba4eea943dd8ac970fd44e"
"ID": "6b4bb154d8474e388bad84d8baa146aa"
},
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
@@ -119,7 +119,7 @@
"ParamNameToSaveNewRowValue": "主题信息"
}
],
"ID": "5669d718-dd46-494d-90d8-c78b3378dad5"
"ID": "d6c5daec-d717-4b22-8215-9379e8c3ba49"
}
]
},
@@ -343,7 +343,7 @@
]
}
],
"ID": "78ccadab-639c-4382-946e-5d22769fab8c"
"ID": "dcb2c40e-7342-4438-8034-5ff4d3a55bbf"
}
]
},
@@ -353,7 +353,7 @@
"Message": "回答完毕"
}
],
"ID": "2d20d7f3-ed29-4761-9e57-8aa7f650d36c"
"ID": "012d2a10-875b-40e8-b595-d86228756ec6"
},
{
"CommandList": [
@@ -363,7 +363,7 @@
"Message": "请输入消息"
}
],
"ID": "6a4ee3b1-3c29-4f84-a595-1034dd561bf9"
"ID": "d9d8d0df-a096-48b9-8943-62021295df07"
}
]
}

View 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": "图片地址"
}
]
}