{ "Name": "AI内容转报工数据", "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": "汇报人", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "夏超" }, { "Name": "汇报日期", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "2024-04-16" }, { "Name": "汇报内容", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "今天和报价系统部门做了沟通,了解了关于成本的细节,2小时;\r\n另外针对旭升的需求,对发票标准版系统进行了升级;\r\n抽空研究了一下时间轮的插件,做了一些测试,花了2小时;\r\n今天计划:\r\n继续测试时间轮插件、把发票标准版系统的离线发布文件更新以下,让恃舷部署到测试服务器\r\n把PMS抽空完善一下,预计1小时" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "获取返回数据", "ID": "1160201db9ab4885af5731b6a4f0c15e" }, { "$type": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit", "OutParamaterName": "聊天记录" }, { "$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit", "OperationParamaterPairs": [ { "Name": "role", "Value": "user" }, { "Name": "content", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报内容" } } ], "OutParamaterName": "我的消息" }, { "$type": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit", "InParamater": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=聊天记录" }, "Operation": 4, "OperationParamaterAName": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=我的消息" }, "OutParamaterName": "聊天记录" }, { "$type": "OPENAIFORGUNCY.Completions, OPENAIFORGUNCY", "URL": "https://oa.api2d.net", "APIKEY": "fk211858-C6yKrsealBkvHao04yT9Ypg6GR0NVPyh", "ORGANIZATION": "", "IsDataSource": "json", "MessageJSON": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=聊天记录" }, "Parameter": { "Model": 43, "Temperature": 1.0, "TopP": 1.0, "MaxTokens": 3000, "SystemContent": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"我稍后将发送一篇关于工作日报的内容,汇报人为:\"&汇报人&\"汇报日期为:\"&汇报日期&\"请帮我将工作内容帮我整理成结构化标准数据,我用来写入数据表,通过调用[生成日报数据]命令来想我传递结果参数。\"" }, "Response_format": "text" }, "OpenTools": true, "Tools": [ { "$type": "OPENAIFORGUNCY.FunctionCallObj, OPENAIFORGUNCY", "Name": "CreateReportData", "Description": "通过一段自然语言文本,生成结构化的日报数据,用于写到数据表。", "Properties": [ { "$type": "OPENAIFORGUNCY.PropertiesObj, OPENAIFORGUNCY", "Name": "reportList", "PropertiesType": 4, "Description": "工作日报数据数组,每一个成员都代表一项工作数据", "Properties": [], "Items": { "Name": "工作日报数据对象", "PropertiesType": 3, "Description": "工作日报数据对象,包含工作日报的各个属性和值", "Required": "type,content", "Properties": [ { "$type": "OPENAIFORGUNCY.PropertiesObj, OPENAIFORGUNCY", "Name": "type", "Description": "日报代表对昨日工作的汇报,计划为今日还未执行的计划", "Enum": "日报,计划", "Properties": [] }, { "$type": "OPENAIFORGUNCY.PropertiesObj, OPENAIFORGUNCY", "Name": "content", "Description": "指具体某一项工作内容,你可以进行适当润色,对所耗时长的内容请放置time参数里,这里需要删掉。", "Properties": [] }, { "$type": "OPENAIFORGUNCY.PropertiesObj, OPENAIFORGUNCY", "Name": "time", "PropertiesType": 2, "Description": "某一项工作内容的工作时长,单位为小时,不可自行推测和修改,如果内容中没有就为空。", "Properties": [] } ] } } ], "Required": "type,content", "CallFunctionCommand": { "$type": "GrapeCity.Forguncy.Commands.CustomCommandObject, Forguncy.Commands", "Commands": [ { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=参数对象.reportList" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报子表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报ID", "GUID": "39d1011f-77d2-4106-b28c-a0b3bcadaebf" }, "Value": "1" }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报类型", "GUID": "8168f28d-1cd9-4747-92ac-ccb24b01cbf7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.type" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报内容", "GUID": "7cd850b0-866e-4b35-b100-d7619a225767" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.content" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "工时", "GUID": "5867bc71-06f3-4adb-93e2-9cb407b6929a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.time" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联任务", "GUID": "fb41bf88-a680-4215-851f-53cb228334c4" }, "Value": "1" }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联项目", "GUID": "d8b6a211-6d0c-4826-9474-748a3de364f6" }, "Value": "1" } ] } ], "Disabled": true }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "ok", "CustomReturns": [ { "ReturnPropertyName": "日报JSON" } ], "Disabled": true } ], "ParamProperties": { "arguments": "参数对象" } } } ], "ResultTo": "result", "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": "=result.tool_calls" } }, "value": "%Null%", "compareType": 1 }, { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=result.tool_calls.Count" } }, "value": "0", "compareType": 2 } ] }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "function", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=result.tool_calls.0.function" }, "ID": "bf1604d840c5489ba3eea9adeb21f391" }, { "$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": "=function.name" } }, "value": "CreateReportData" }, "CommandList": [ { "$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand", "JsonString": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=function.arguments" }, "SampleJson": "{\r\n \"reportList\": [\r\n {\r\n \"type\": \"日报\",\r\n \"content\": \"今天和报价系统部门做了沟通,了解了关于成本的细节\",\r\n \"time\": 120\r\n },\r\n {\r\n \"type\": \"日报\",\r\n \"content\": \"对发票标准版系统进行了升级\",\r\n \"time\": 0\r\n },\r\n {\r\n \"type\": \"日报\",\r\n \"content\": \"研究了时间轮插件,并进行了测试\",\r\n \"time\": 120\r\n },\r\n {\r\n \"type\": \"计划\",\r\n \"content\": \"继续测试时间轮插件\",\r\n \"time\": 0\r\n },\r\n {\r\n \"type\": \"计划\",\r\n \"content\": \"更新发票标准版系统的离线发布文件,并部署到测试服务器\",\r\n \"time\": 0\r\n },\r\n {\r\n \"type\": \"计划\",\r\n \"content\": \"完善PMS\",\r\n \"time\": 60\r\n }\r\n ]\r\n}", "ToParameter": "arguments" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "reportList", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=arguments.reportList" }, "ID": "46466e3f3c5a40a8a27b326072688b5e" } ], "ID": "83f655b6-6792-4b26-8c7b-c8cf03cd1021" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=第一条消息.content" }, "CustomReturns": [ { "ReturnPropertyName": "日报JSON" } ] } ], "ID": "d737a346-e417-43a0-bd4e-1d45eed4e55b" } ] } ], "ID": "efe9d79b-9703-4c7d-80ab-9830f2479857" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=第一条消息.content" }, "CustomReturns": [ { "ReturnPropertyName": "日报JSON" } ] } ], "ID": "f94d1f38-7f06-4f49-a1e2-cd59c2b31eab" } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "生成完毕", "CustomReturns": [ { "ReturnPropertyName": "日报JSON", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=reportList" } } ] } ] }, "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": "日报JSON" } ] } ] } } ], "ReturnProperties": [ { "Name": "日报JSON" } ] }