MCPcopy Create free account
hub / github.com/aurora-develop/aurora / toolCallingEnabled

Function toolCallingEnabled

initialize/handlers.go:2269–2274  ·  view source on GitHub ↗

toolCallingEnabled 根据 ENV + Tools 列表判定是否启用工具调用模拟。 默认启用(只要客户端传了 tools);设置 TOOL_CALLING_ENABLED=false 可强制关闭。

(tools []officialtypes.Tool)

Source from the content-addressed store, hash-verified

2267// toolCallingEnabled 根据 ENV + Tools 列表判定是否启用工具调用模拟。
2268// 默认启用(只要客户端传了 tools);设置 TOOL_CALLING_ENABLED=false 可强制关闭。
2269func toolCallingEnabled(tools []officialtypes.Tool) bool {
2270 if env := strings.ToLower(strings.TrimSpace(os.Getenv("TOOL_CALLING_ENABLED"))); env == "false" || env == "0" || env == "no" {
2271 return false
2272 }
2273 return len(tools) > 0
2274}
2275
2276// handleToolCalling 工具调用模式的主流程:
2277// 1. 把 OpenAI 请求转换并注入 <tool_call> 协议;

Callers 1

nightmareMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected