|
@@ -131,6 +131,12 @@ var (
|
|
},
|
|
},
|
|
"error": "permission denied, you need to enable storage access in plugin manifest",
|
|
"error": "permission denied, you need to enable storage access in plugin manifest",
|
|
},
|
|
},
|
|
|
|
+ dify_invocation.INVOKE_TYPE_SUMMARY: {
|
|
|
|
+ "func": func(declaration *plugin_entities.PluginDeclaration) bool {
|
|
|
|
+ return declaration.Resource.Permission.AllowInvokeLLM()
|
|
|
|
+ },
|
|
|
|
+ "error": "permission denied, you need to enable llm access in plugin manifest",
|
|
|
|
+ },
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|
|
@@ -218,6 +224,9 @@ var (
|
|
dify_invocation.INVOKE_TYPE_STORAGE: func(handle *BackwardsInvocation) {
|
|
dify_invocation.INVOKE_TYPE_STORAGE: func(handle *BackwardsInvocation) {
|
|
genericDispatchTask(handle, executeDifyInvocationStorageTask)
|
|
genericDispatchTask(handle, executeDifyInvocationStorageTask)
|
|
},
|
|
},
|
|
|
|
+ dify_invocation.INVOKE_TYPE_SUMMARY: func(handle *BackwardsInvocation) {
|
|
|
|
+ genericDispatchTask(handle, executeDifyInvocationSummaryTask)
|
|
|
|
+ },
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|
|
@@ -492,3 +501,16 @@ func executeDifyInvocationStorageTask(
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+func executeDifyInvocationSummaryTask(
|
|
|
|
+ handle *BackwardsInvocation,
|
|
|
|
+ request *dify_invocation.InvokeSummaryRequest,
|
|
|
|
+) {
|
|
|
|
+ response, err := handle.backwardsInvocation.InvokeSummary(request)
|
|
|
|
+ if err != nil {
|
|
|
|
+ handle.WriteError(fmt.Errorf("invoke summary failed: %s", err.Error()))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ handle.WriteResponse("struct", response)
|
|
|
|
+}
|