mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-22 17:56:00 -04:00
3d28e0ceed
* feat: Add code generation for plugin controllers and services - Introduced a code generation mechanism for plugin controllers and services, allowing for automatic generation based on defined dispatchers. - Created new files for generated controllers, services, and templates to streamline the plugin invocation process. - Removed outdated functions related to tool validation and runtime parameters, consolidating functionality into generated files. - Updated dependencies in go.mod and go.sum to include necessary packages for the new code generation features. * fix
25 lines
713 B
Go
25 lines
713 B
Go
// Code generated by controller generator. DO NOT EDIT.
|
|
|
|
package controllers
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/langgenius/dify-plugin-daemon/internal/service"
|
|
"github.com/langgenius/dify-plugin-daemon/internal/types/app"
|
|
"github.com/langgenius/dify-plugin-daemon/pkg/entities/plugin_entities"
|
|
"github.com/langgenius/dify-plugin-daemon/pkg/entities/requests"
|
|
)
|
|
|
|
func InvokeAgentStrategy(config *app.Config) gin.HandlerFunc {
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeAgentStrategy]
|
|
|
|
return func(c *gin.Context) {
|
|
BindPluginDispatchRequest(
|
|
c,
|
|
func(itr request) {
|
|
service.InvokeAgentStrategy(&itr, c, config.PluginMaxExecutionTimeout)
|
|
},
|
|
)
|
|
}
|
|
}
|