mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-22 01:35:24 -04:00
b286be778e
* chore: remove JSON schema validation from tool and agent services - Remove bindAgentStrategyValidator and bindToolValidator functions - Remove gojsonschema dependency - Simplify InvokeAgentStrategy by removing validation logic - Consolidate tool invocation into generated code - Remove redundant tool_service.go and related test files - Move InvokeTool to generated files for consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: remove duplicated routes --------- Co-authored-by: Claude <noreply@anthropic.com>
51 lines
1.3 KiB
Go
51 lines
1.3 KiB
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 InvokeTool(config *app.Config) gin.HandlerFunc {
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeTool]
|
|
|
|
return func(c *gin.Context) {
|
|
BindPluginDispatchRequest(
|
|
c,
|
|
func(itr request) {
|
|
service.InvokeTool(&itr, c, config.PluginMaxExecutionTimeout)
|
|
},
|
|
)
|
|
}
|
|
}
|
|
|
|
func ValidateToolCredentials(config *app.Config) gin.HandlerFunc {
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestValidateToolCredentials]
|
|
|
|
return func(c *gin.Context) {
|
|
BindPluginDispatchRequest(
|
|
c,
|
|
func(itr request) {
|
|
service.ValidateToolCredentials(&itr, c, config.PluginMaxExecutionTimeout)
|
|
},
|
|
)
|
|
}
|
|
}
|
|
|
|
func GetToolRuntimeParameters(config *app.Config) gin.HandlerFunc {
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestGetToolRuntimeParameters]
|
|
|
|
return func(c *gin.Context) {
|
|
BindPluginDispatchRequest(
|
|
c,
|
|
func(itr request) {
|
|
service.GetToolRuntimeParameters(&itr, c, config.PluginMaxExecutionTimeout)
|
|
},
|
|
)
|
|
}
|
|
}
|