mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-23 10:15:22 -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>
50 lines
1.3 KiB
Go
50 lines
1.3 KiB
Go
// Code generated by controller generator. DO NOT EDIT.
|
|
|
|
package plugin_daemon
|
|
|
|
import (
|
|
"github.com/langgenius/dify-plugin-daemon/internal/core/session_manager"
|
|
"github.com/langgenius/dify-plugin-daemon/internal/utils/stream"
|
|
"github.com/langgenius/dify-plugin-daemon/pkg/entities/requests"
|
|
"github.com/langgenius/dify-plugin-daemon/pkg/entities/tool_entities"
|
|
)
|
|
|
|
func InvokeTool(
|
|
session *session_manager.Session,
|
|
request *requests.RequestInvokeTool,
|
|
) (
|
|
*stream.Stream[tool_entities.ToolResponseChunk], error,
|
|
) {
|
|
return GenericInvokePlugin[requests.RequestInvokeTool, tool_entities.ToolResponseChunk](
|
|
session,
|
|
request,
|
|
1024,
|
|
)
|
|
}
|
|
|
|
func ValidateToolCredentials(
|
|
session *session_manager.Session,
|
|
request *requests.RequestValidateToolCredentials,
|
|
) (
|
|
*stream.Stream[tool_entities.ValidateCredentialsResult], error,
|
|
) {
|
|
return GenericInvokePlugin[requests.RequestValidateToolCredentials, tool_entities.ValidateCredentialsResult](
|
|
session,
|
|
request,
|
|
1,
|
|
)
|
|
}
|
|
|
|
func GetToolRuntimeParameters(
|
|
session *session_manager.Session,
|
|
request *requests.RequestGetToolRuntimeParameters,
|
|
) (
|
|
*stream.Stream[tool_entities.GetToolRuntimeParametersResponse], error,
|
|
) {
|
|
return GenericInvokePlugin[requests.RequestGetToolRuntimeParameters, tool_entities.GetToolRuntimeParametersResponse](
|
|
session,
|
|
request,
|
|
1,
|
|
)
|
|
}
|