CodeExecuteTool 代码执行工具 支持 LLM 生成代码并执行,用于程序化工具调用场景
| 14 | // CodeExecuteTool 代码执行工具 |
| 15 | // 支持 LLM 生成代码并执行,用于程序化工具调用场景 |
| 16 | type CodeExecuteTool struct { |
| 17 | runtimeManager *bridge.RuntimeManager |
| 18 | toolBridge *bridge.ToolBridge |
| 19 | |
| 20 | // PTC 支持 |
| 21 | httpServer *bridge.HTTPBridgeServer |
| 22 | bridgeURL string |
| 23 | serverStarted bool |
| 24 | mu sync.Mutex |
| 25 | } |
| 26 | |
| 27 | // NewCodeExecuteTool 创建代码执行工具 |
| 28 | func NewCodeExecuteTool(config map[string]any) (tools.Tool, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected