BaseEnhancedTool 增强工具的基础实现 提供默认行为,简化自定义工具开发
| 223 | // BaseEnhancedTool 增强工具的基础实现 |
| 224 | // 提供默认行为,简化自定义工具开发 |
| 225 | type BaseEnhancedTool struct { |
| 226 | name string |
| 227 | description string |
| 228 | schema *types.ToolSchema |
| 229 | isLongRunning bool |
| 230 | timeout time.Duration |
| 231 | requireApproval bool |
| 232 | priority int |
| 233 | retryPolicy *RetryPolicy |
| 234 | metadata map[string]any |
| 235 | } |
| 236 | |
| 237 | func NewBaseEnhancedTool(name, description string) *BaseEnhancedTool { |
| 238 | return &BaseEnhancedTool{ |
nothing calls this directly
no outgoing calls
no test coverage detected